Initial setup for publishing snapshots to OJO. (#523)
* Initial setup for publishing snapshots to OJO. * Oops, we need a TAB instead of spaces in Makefile.
This commit is contained in:
parent
b50ca87607
commit
87a0988f7a
|
|
@ -9,6 +9,9 @@ build_task: &build_task
|
|||
verify_task: &verify_task
|
||||
name: Verify Google Java Format
|
||||
command: make verify-format
|
||||
publish_snapshots_task: &publish_snapshots_task
|
||||
name: Publish Snapshot Artifacts
|
||||
command: make publish-snapshots
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
|
@ -31,6 +34,9 @@ jobs:
|
|||
- run:
|
||||
name: Publish coverage
|
||||
command: bash <(curl -s https://codecov.io/bash)
|
||||
# Publish the snapshots using Java 8 (and only from master).
|
||||
- run:
|
||||
<<: *publish_snapshots_task
|
||||
- save_cache:
|
||||
paths:
|
||||
- ~/.gradle
|
||||
|
|
|
|||
6
Makefile
6
Makefile
|
|
@ -12,3 +12,9 @@ init-git-submodules:
|
|||
.PHONY: verify-format
|
||||
verify-format:
|
||||
./gradlew verGJF
|
||||
|
||||
.PHONY: publish-snapshots
|
||||
publish-snapshots:
|
||||
ifeq ($(CIRCLE_BRANCH),master)
|
||||
./gradlew artifactoryPublish
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -5,12 +5,14 @@ buildscript {
|
|||
maven {
|
||||
url "https://plugins.gradle.org/m2/"
|
||||
}
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'ru.vyarus:gradle-animalsniffer-plugin:1.5.0'
|
||||
classpath 'net.ltgt.gradle:gradle-errorprone-plugin:0.0.16'
|
||||
classpath 'com.github.ben-manes:gradle-versions-plugin:0.20.0'
|
||||
classpath "gradle.plugin.com.github.sherter.google-java-format:google-java-format-gradle-plugin:0.8"
|
||||
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.9.8'
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -26,10 +28,12 @@ subprojects {
|
|||
apply plugin: 'idea'
|
||||
apply plugin: 'signing'
|
||||
apply plugin: 'jacoco'
|
||||
apply plugin: 'maven-publish'
|
||||
// The plugin only has an effect if a signature is specified
|
||||
apply plugin: 'ru.vyarus.animalsniffer'
|
||||
apply plugin: 'com.github.sherter.google-java-format'
|
||||
apply plugin: 'net.ltgt.errorprone'
|
||||
apply plugin: 'com.jfrog.artifactory'
|
||||
|
||||
group = "io.opentelemetry"
|
||||
version = "0.1.0-SNAPSHOT" // CURRENT_VERSION
|
||||
|
|
@ -217,4 +221,6 @@ subprojects {
|
|||
}
|
||||
maxHeapSize = '1500m'
|
||||
}
|
||||
|
||||
apply from: "${rootProject.projectDir}/gradle/publish.gradle"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,58 @@
|
|||
|
||||
publishing {
|
||||
publications {
|
||||
mavenPublication(MavenPublication) {
|
||||
version version
|
||||
groupId group
|
||||
|
||||
from components.java
|
||||
artifact sourcesJar
|
||||
artifact javadocJar
|
||||
|
||||
pom {
|
||||
name = 'OpenTelemetry Java'
|
||||
packaging = 'jar'
|
||||
description = 'OpenTelemetry for Java'
|
||||
url = 'https://github.com/open-telemetry/opentelemetry-java'
|
||||
licenses {
|
||||
license {
|
||||
name = 'The Apache License, Version 2.0'
|
||||
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
|
||||
}
|
||||
}
|
||||
developers {
|
||||
developer {
|
||||
id = 'opentelemetry'
|
||||
name = 'OpenTelemetry Gitter'
|
||||
url = 'https://gitter.im/open-telemetry/community'
|
||||
}
|
||||
}
|
||||
scm {
|
||||
connection = 'scm:git:git@github.com:open-telemetry/opentelemetry-java.git'
|
||||
developerConnection = 'scm:git:git@github.com:open-telemetry/opentelemetry-java.git'
|
||||
url = 'git@github.com:open-telemetry/opentelemetry-java.git'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Snapshot publishing.
|
||||
artifactory {
|
||||
contextUrl = 'https://oss.jfrog.org'
|
||||
publish {
|
||||
repository {
|
||||
repoKey = 'oss-snapshot-local'
|
||||
username = System.getenv("BINTRAY_USER")
|
||||
password = System.getenv("BINTRAY_KEY")
|
||||
}
|
||||
defaults {
|
||||
publications('mavenPublication')
|
||||
publishArtifacts = true
|
||||
publishPom = true
|
||||
}
|
||||
}
|
||||
resolve {
|
||||
repoKey = 'libs-release'
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue