Merge pull request #1091 from DataDog/mar-kolya/upgrade-gradle

Upgradle to gradle 6.0
This commit is contained in:
Nikolay Martynov 2019-11-13 15:14:41 -05:00 committed by GitHub
commit 57e5b3899f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 52 additions and 61 deletions

View File

@ -12,7 +12,3 @@ dependencies {
compile group: 'org.slf4j', name: 'slf4j-simple', version: versions.slf4j compile group: 'org.slf4j', name: 'slf4j-simple', version: versions.slf4j
// ^ Generally a bad idea for libraries, but we're shadowing. // ^ Generally a bad idea for libraries, but we're shadowing.
} }
jar {
classifier = 'unbundled'
}

View File

@ -27,10 +27,6 @@ shadowJar {
} }
} }
jar {
classifier = 'unbundled'
}
tasks.register("submodulesUpdate", Exec) { tasks.register("submodulesUpdate", Exec) {
group 'Build Setup' group 'Build Setup'
description 'Initializes and updates integrations-core git submodule' description 'Initializes and updates integrations-core git submodule'

View File

@ -1,5 +1,5 @@
plugins { plugins {
id "me.champeau.gradle.jmh" version "0.4.8" id "me.champeau.gradle.jmh" version "0.5.0"
} }
apply from: "${rootDir}/gradle/java.gradle" apply from: "${rootDir}/gradle/java.gradle"

View File

@ -1,5 +1,5 @@
plugins { plugins {
id "com.github.johnrengelman.shadow" version "4.0.4" id "com.github.johnrengelman.shadow" version "5.2.0"
} }
description = 'dd-java-agent' description = 'dd-java-agent'
@ -20,7 +20,7 @@ def includeShadowJar(subproject, jarname) {
def agent_project = project def agent_project = project
subproject.afterEvaluate { subproject.afterEvaluate {
agent_project.processResources { agent_project.processResources {
from(zipTree(subproject.tasks.shadowJar.archivePath)) { from(zipTree(subproject.tasks.shadowJar.archiveFile)) {
into jarname into jarname
rename '(^.*)\\.class$', '$1.classdata' rename '(^.*)\\.class$', '$1.classdata'
// Rename LICENSE file since it clashes with license dir on non-case sensitive FSs (i.e. Mac) // Rename LICENSE file since it clashes with license dir on non-case sensitive FSs (i.e. Mac)
@ -30,8 +30,6 @@ def includeShadowJar(subproject, jarname) {
agent_project.processResources.dependsOn subproject.tasks.shadowJar agent_project.processResources.dependsOn subproject.tasks.shadowJar
subproject.shadowJar { subproject.shadowJar {
classifier null
mergeServiceFiles() mergeServiceFiles()
exclude '**/module-info.class' exclude '**/module-info.class'
@ -58,7 +56,7 @@ includeShadowJar(project(':dd-java-agent:instrumentation'), 'agent-tooling-and-i
includeShadowJar(project(':dd-java-agent:agent-jmxfetch'), 'agent-jmxfetch.isolated') includeShadowJar(project(':dd-java-agent:agent-jmxfetch'), 'agent-jmxfetch.isolated')
jar { jar {
classifier = 'unbundled' archiveClassifier = 'unbundled'
manifest { manifest {
attributes( attributes(
@ -74,7 +72,7 @@ jar {
shadowJar { shadowJar {
configurations = [project.configurations.shadowInclude] configurations = [project.configurations.shadowInclude]
classifier null archiveClassifier = ''
mergeServiceFiles() mergeServiceFiles()
@ -111,7 +109,7 @@ dependencies {
testCompile deps.testLogging testCompile deps.testLogging
testCompile deps.guava testCompile deps.guava
shadowInclude project(':dd-java-agent:agent-bootstrap') shadowInclude project(path: ':dd-java-agent:agent-bootstrap')
} }
tasks.withType(Test).configureEach { tasks.withType(Test).configureEach {

View File

@ -11,7 +11,7 @@ buildscript {
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.6' classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.10'
} }
} }

View File

@ -89,6 +89,3 @@ shadowJar {
} }
} }
jar {
classifier = 'unbundled'
}

View File

@ -1,5 +1,5 @@
plugins { plugins {
id "com.github.johnrengelman.shadow" version "4.0.4" id "com.github.johnrengelman.shadow" version "5.2.0"
} }
apply from: "${rootDir}/gradle/java.gradle" apply from: "${rootDir}/gradle/java.gradle"
description = 'Command Line Application Smoke Tests.' description = 'Command Line Application Smoke Tests.'

View File

@ -1,5 +1,5 @@
plugins { plugins {
id "com.github.johnrengelman.shadow" version "4.0.4" id "com.github.johnrengelman.shadow" version "5.2.0"
} }
apply from: "${rootDir}/gradle/java.gradle" apply from: "${rootDir}/gradle/java.gradle"
description = 'SpringBoot Smoke Tests.' description = 'SpringBoot Smoke Tests.'

View File

@ -10,8 +10,11 @@ ext {
repositories { repositories {
ivy { ivy {
url 'https://download.jboss.org/' url 'https://download.jboss.org/'
layout 'pattern', { patternLayout {
artifact '/[organisation]/[revision]/[module]/[organisation]-[module]-[revision].[ext]' artifact '/[organisation]/[revision]/[module]/[organisation]-[module]-[revision].[ext]'
metadataSources {
artifact()
}
} }
} }
} }

View File

@ -1,15 +1,15 @@
plugins { plugins {
id 'io.franzbecker.gradle-lombok' version '1.14' // Last to support Java 7 id 'io.franzbecker.gradle-lombok' version '1.14' // Last to support Java 7
id 'com.jfrog.artifactory' version '4.8.1'
id 'com.jfrog.bintray' version '1.8.4'
id 'org.unbroken-dome.test-sets' version '2.1.1'
id 'com.github.ben-manes.versions' version '0.21.0'
id 'com.gradle.build-scan' version '2.2.1' id 'com.jfrog.artifactory' version '4.10.0'
id 'com.jfrog.bintray' version '1.8.4'
id 'org.unbroken-dome.test-sets' version '2.2.1'
id 'com.github.ben-manes.versions' version '0.27.0'
// Not applying google java format by default because it gets confused by stray java build // Not applying google java format by default because it gets confused by stray java build
// files in 'workspace' build directory in CI // files in 'workspace' build directory in CI
id 'com.github.sherter.google-java-format' version '0.8' apply false id 'com.github.sherter.google-java-format' version '0.8' apply false
id 'com.dorongold.task-tree' version '1.3.1' id 'com.dorongold.task-tree' version '1.4'
} }
def isCI = System.getenv("CI") != null def isCI = System.getenv("CI") != null
@ -39,18 +39,6 @@ tasks.register("latestDepTest")
// Applied here to allow publishing of artifactory build info // Applied here to allow publishing of artifactory build info
apply from: "${rootDir}/gradle/publish.gradle" apply from: "${rootDir}/gradle/publish.gradle"
def skipBuildscan = Boolean.valueOf(System.getenv("SKIP_BUILDSCAN"))
buildScan {
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
termsOfServiceAgree = 'yes'
if (isCI && !skipBuildscan) {
publishAlways()
tag 'CI'
}
}
wrapper { wrapper {
distributionType = Wrapper.DistributionType.ALL distributionType = Wrapper.DistributionType.ALL
} }

View File

@ -1,5 +1,5 @@
plugins { plugins {
id "me.champeau.gradle.jmh" version "0.5.0-rc-2" id "me.champeau.gradle.jmh" version "0.5.0"
} }
description = 'dd-trace-ot' description = 'dd-trace-ot'

View File

@ -1,7 +1,7 @@
apply plugin: "jacoco" apply plugin: "jacoco"
jacoco { jacoco {
toolVersion = "0.8.4" toolVersion = "0.8.5"
} }
jacocoTestReport { jacocoTestReport {

Binary file not shown.

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.3-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-6.0-all.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

29
gradlew vendored
View File

@ -154,19 +154,19 @@ if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
else else
eval `echo args$i`="\"$arg\"" eval `echo args$i`="\"$arg\""
fi fi
i=$((i+1)) i=`expr $i + 1`
done done
case $i in case $i in
(0) set -- ;; 0) set -- ;;
(1) set -- "$args0" ;; 1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;; 2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;; 3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;; 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac esac
fi fi
@ -175,14 +175,9 @@ save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " " echo " "
} }
APP_ARGS=$(save "$@") APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules # Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@" exec "$JAVACMD" "$@"

View File

@ -1,3 +1,21 @@
plugins {
id 'com.gradle.enterprise' version '3.0'
}
def isCI = System.getenv("CI") != null
def skipBuildscan = Boolean.valueOf(System.getenv("SKIP_BUILDSCAN"))
gradleEnterprise {
buildScan {
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
termsOfServiceAgree = 'yes'
if (isCI && !skipBuildscan) {
publishAlways()
tag 'CI'
}
}
}
rootProject.name = 'dd-trace-java' rootProject.name = 'dd-trace-java'
// external apis // external apis