Enable publishing of artifactory build info
MODIFY
dd-trace-java.gradle
dd-trace-java.gradle
@@ -21,6 +21,11 @@ repositories {
jcenter()
}
+description = 'dd-trace-java'
+
+// Applied here to allow publishing of artifactory build info
+apply from: "${rootDir}/gradle/publish.gradle"
+
task wrapper(type: Wrapper) {
gradleVersion = '4.0'
}

MODIFY
gradle/publish.gradle
gradle/publish.gradle
// Source: https://github.com/ratpack/ratpack/blob/master/gradle/publish.gradle
-apply plugin: 'maven'
+apply plugin: "maven"
apply plugin: "com.jfrog.artifactory"
apply plugin: "signing"
-apply from: "$rootDir/gradle/version.gradle"
-apply from: "${rootDir}/gradle/pom.gradle"
-
afterEvaluate {
assert description: "Project $project.path is published, must have a description"
}
@@ -33,6 +30,10 @@ tasks.withType(Upload).matching { it.name != "install" }.all {
}
}
+if (project.rootProject != project) {
+ apply from: "$rootDir/gradle/version.gradle"
+ apply from: "${rootDir}/gradle/pom.gradle"
+
def isCI = Boolean.parseBoolean("$System.env.CI")
signing {
@@ -57,12 +58,20 @@ configurations {
}
}
}
+}
def isSnapshot = version.endsWith("-SNAPSHOT")
// define in ~/.gradle/gradle.properties to override for testing
def forceLocal = project.hasProperty('forceLocal') && forceLocal
artifactoryPublish { task ->
+ gradle.taskGraph.whenReady { taskGraph ->
+ def startParameter = project.gradle.startParameter
+ if (taskGraph.hasTask(task) && startParameter.parallelProjectExecutionEnabled && startParameter.maxWorkerCount > 1) {
+ throw new IllegalStateException("cannot run " + task + " with --parallel and --max-workers > 1")
+ }
+ }
+
artifactory {
publish {
contextUrl = forceLocal ? 'http://localhost:8080/artifactory' : 'https://oss.jfrog.org'

Enable publishing of artifactory build info