Upgrade to Gradle 7.0 (#3228)

This commit is contained in:
Anuraag Agrawal 2021-05-13 08:21:22 +09:00 committed by GitHub
parent ad6ceccc4c
commit 672330bf51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 69 additions and 44 deletions

View File

@ -2,7 +2,7 @@ plugins {
id("java-library")
id("maven-publish")
id("me.champeau.gradle.jmh")
id("me.champeau.jmh")
id("ru.vyarus.animalsniffer")
}

View File

@ -1,9 +1,10 @@
subprojects {
// Workaround https://github.com/gradle/gradle/issues/847
group = "io.opentelemetry.api"
val proj = this
plugins.withId("java") {
configure<BasePluginConvention> {
archivesBaseName = "opentelemetry-api-${project.name}"
archivesBaseName = "opentelemetry-api-${proj.name}"
}
}
}

View File

@ -2,7 +2,7 @@ plugins {
id("java-library")
id("maven-publish")
id("me.champeau.gradle.jmh")
id("me.champeau.jmh")
id("ru.vyarus.animalsniffer")
}

View File

@ -2,7 +2,7 @@ import com.diffplug.gradle.spotless.SpotlessExtension
import com.google.protobuf.gradle.*
import de.marcphilipp.gradle.nexus.NexusPublishExtension
import io.morethan.jmhreport.gradle.JmhReportExtension
import me.champeau.gradle.JMHPluginExtension
import me.champeau.jmh.JmhParameters
import me.champeau.gradle.japicmp.JapicmpTask
import nebula.plugin.release.git.opinion.Strategies
import net.ltgt.gradle.errorprone.CheckSeverity
@ -24,7 +24,7 @@ plugins {
id("com.google.protobuf") apply false
id("de.marcphilipp.nexus-publish") apply false
id("io.morethan.jmhreport") apply false
id("me.champeau.gradle.jmh") apply false
id("me.champeau.jmh") apply false
id("net.ltgt.errorprone") apply false
id("net.ltgt.nullaway") apply false
id("ru.vyarus.animalsniffer") apply false
@ -142,7 +142,7 @@ subprojects {
}
configure<JacocoPluginExtension> {
toolVersion = "0.8.6"
toolVersion = "0.8.7"
}
val javaToolchains = the<JavaToolchainService>()
@ -361,14 +361,19 @@ subprojects {
}
}
val dependencyManagement by configurations.creating {
isCanBeConsumed = false
isCanBeResolved = false
isVisible = false
}
dependencies {
configurations.configureEach {
// Gradle and newer plugins will set these configuration properties correctly.
if (isCanBeResolved && !isCanBeConsumed
// Older ones (like JMH) may not, so check the name as well.
// Kotlin compiler classpaths don't support BOM nor need it.
|| name.endsWith("Classpath") && !name.startsWith("kotlin")) {
add(name, platform(project(":dependencyManagement")))
add(dependencyManagement.name, platform(project(":dependencyManagement")))
afterEvaluate {
configurations.configureEach {
if (isCanBeResolved && !isCanBeConsumed) {
extendsFrom(dependencyManagement)
}
}
}
@ -442,7 +447,7 @@ subprojects {
}
}
plugins.withId("me.champeau.gradle.jmh") {
plugins.withId("me.champeau.jmh") {
// Always include the jmhreport plugin and run it after jmh task.
plugins.apply("io.morethan.jmhreport")
dependencies {
@ -453,16 +458,16 @@ subprojects {
// invoke jmh on a single benchmark class like so:
// ./gradlew -PjmhIncludeSingleClass=StatsTraceContextBenchmark clean :grpc-core:jmh
configure<JMHPluginExtension> {
failOnError = true
resultFormat = "JSON"
configure<JmhParameters> {
failOnError.set(true)
resultFormat.set("JSON")
// Otherwise an error will happen:
// Could not expand ZIP 'byte-buddy-agent-1.9.7.jar'.
isIncludeTests = false
profilers = listOf("gc")
includeTests.set(false)
profilers.add("gc")
val jmhIncludeSingleClass: String? by project
if (jmhIncludeSingleClass != null) {
include = listOf(jmhIncludeSingleClass)
includes.add(jmhIncludeSingleClass as String)
}
}
@ -472,6 +477,12 @@ subprojects {
}
tasks {
// TODO(anuraaga): Unclear why this is triggering even though there don't seem to
// be duplicates, possibly a bug in JMH plugin.
named<ProcessResources>("processJmhResources") {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
named("jmh") {
finalizedBy(named("jmhReport"))
}

View File

@ -2,7 +2,7 @@ plugins {
id("java-library")
id("maven-publish")
id("me.champeau.gradle.jmh")
id("me.champeau.jmh")
id("org.unbroken-dome.test-sets")
id("ru.vyarus.animalsniffer")
}

View File

@ -1,2 +1,10 @@
Comparing source compatibility of against
No changes.
=== UNCHANGED CLASS: PUBLIC FINAL io.opentelemetry.extension.kotlin.ContextExtensionsKt (not serializable)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
*** MODIFIED ANNOTATION: kotlin.Metadata
--- REMOVED ELEMENT: bv=1,0,3 (-)
*** MODIFIED ELEMENT: mv=1,5,1 (<- 1,4,1)
=== UNCHANGED ELEMENT: k=2
=== UNCHANGED ELEMENT: d1=<3D><>&#xA;<3B>&#xA;<3B><><EFBFBD>&#xA;<3B><><EFBFBD>&#xA;<3B><><EFBFBD>&#xA;<3B><><EFBFBD><EFBFBD>&#xA;<3B><><EFBFBD><EFBFBD>0<EFBFBD>*<2A>0<EFBFBD><30>&#xA;<3B><><EFBFBD><EFBFBD>0<EFBFBD>*<2A>0<EFBFBD><30>&#xA;<3B><><EFBFBD><EFBFBD>0<EFBFBD>*<2A>0<EFBFBD>¨<EFBFBD><C2A8>
=== UNCHANGED ELEMENT: d2=asContextElement,Lkotlin/coroutines/CoroutineContext;,Lio/opentelemetry/context/Context;,Lio/opentelemetry/context/ImplicitContextKeyed;,getOpenTelemetryContext,opentelemetry-extension-kotlin
+++ NEW ELEMENT: xi=48 (+)

View File

@ -1,9 +1,10 @@
subprojects {
// https://github.com/gradle/gradle/issues/847
group = "io.opentelemetry.exporters"
val proj = this
plugins.withId("java") {
configure<BasePluginConvention> {
archivesBaseName = "opentelemetry-exporter-${project.name}"
archivesBaseName = "opentelemetry-exporter-${proj.name}"
}
}
}

View File

@ -2,7 +2,7 @@ plugins {
`java-library`
`maven-publish`
id("me.champeau.gradle.jmh")
id("me.champeau.jmh")
id("ru.vyarus.animalsniffer")
}

View File

@ -1,7 +1,8 @@
subprojects {
val proj = this
plugins.withId("java") {
configure<BasePluginConvention> {
archivesBaseName = "opentelemetry-exporter-otlp-${project.name}"
archivesBaseName = "opentelemetry-exporter-otlp-${proj.name}"
}
}
}

View File

@ -2,7 +2,7 @@ plugins {
`java-library`
`maven-publish`
id("me.champeau.gradle.jmh")
id("me.champeau.jmh")
id("org.unbroken-dome.test-sets")
id("ru.vyarus.animalsniffer")
}

View File

@ -1,7 +1,8 @@
subprojects {
val proj = this
plugins.withId("java") {
configure<BasePluginConvention> {
archivesBaseName = "opentelemetry-extension-${project.name}"
archivesBaseName = "opentelemetry-extension-${proj.name}"
}
}
}

View File

@ -4,7 +4,7 @@ plugins {
`java-library`
`maven-publish`
id("me.champeau.gradle.jmh")
id("me.champeau.jmh")
id("org.jetbrains.kotlin.jvm")
id("org.unbroken-dome.test-sets")
id("ru.vyarus.animalsniffer")

View File

@ -3,7 +3,7 @@ plugins {
`maven-publish`
id("ru.vyarus.animalsniffer")
id("me.champeau.gradle.jmh")
id("me.champeau.jmh")
}
description = "OpenTelemetry Extension : Trace Propagators"

View File

@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
distributionSha256Sum=7faa7198769f872826c8ef4f1450f839ec27f0b4d5d1e51bade63667cbccd205
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.1-bin.zip
distributionSha256Sum=dccda8aa069563c8ba2f6cdfd0777df0e34a5b4d15138ca8b9757e94f4e8a8cb
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@ -2,7 +2,7 @@ plugins {
`java-library`
`maven-publish`
id("me.champeau.gradle.jmh")
id("me.champeau.jmh")
}
description = "OpenTelemetry SDK AWS Instrumentation Support"

View File

@ -1,7 +1,8 @@
subprojects {
val proj = this
plugins.withId("java") {
configure<BasePluginConvention> {
archivesBaseName = "opentelemetry-sdk-extension-${project.name}"
archivesBaseName = "opentelemetry-sdk-extension-${proj.name}"
}
}
}

View File

@ -2,7 +2,7 @@ plugins {
`java-library`
`maven-publish`
id("me.champeau.gradle.jmh")
id("me.champeau.jmh")
id("ru.vyarus.animalsniffer")
}

View File

@ -2,7 +2,7 @@ plugins {
`java-library`
`maven-publish`
id("me.champeau.gradle.jmh")
id("me.champeau.jmh")
}
description = "OpenTelemetry - zPages"

View File

@ -2,7 +2,7 @@ plugins {
id("java-library")
id("maven-publish")
id("me.champeau.gradle.jmh")
id("me.champeau.jmh")
id("ru.vyarus.animalsniffer")
}

View File

@ -1,9 +1,10 @@
subprojects {
// Workaround https://github.com/gradle/gradle/issues/847
group = "io.opentelemetry.sdk"
val proj = this
plugins.withId("java") {
configure<BasePluginConvention> {
archivesBaseName = "opentelemetry-sdk-${project.name}"
archivesBaseName = "opentelemetry-sdk-${proj.name}"
}
}
}

View File

@ -2,7 +2,7 @@ plugins {
id("java-library")
id("maven-publish")
id("me.champeau.gradle.jmh")
id("me.champeau.jmh")
// TODO(anuraaga): Enable animalsniffer by the time we are getting ready to release a stable
// version. Long/DoubleAdder are not part of Android API 21 which is our current target.

View File

@ -2,7 +2,7 @@ plugins {
id("java-library")
id("maven-publish")
id("me.champeau.gradle.jmh")
id("me.champeau.jmh")
id("ru.vyarus.animalsniffer")
}

View File

@ -2,20 +2,20 @@ pluginManagement {
plugins {
id("com.diffplug.spotless") version "5.11.1"
id("com.github.ben-manes.versions") version "0.38.0"
id("com.github.johnrengelman.shadow") version "6.1.0"
id("com.google.protobuf") version "0.8.15"
id("com.github.johnrengelman.shadow") version "7.0.0"
id("com.google.protobuf") version "0.8.16"
id("com.gradle.enterprise") version "3.6"
id("de.marcphilipp.nexus-publish") version "0.4.0"
id("de.undercouch.download") version "4.1.1"
id("io.codearte.nexus-staging") version "0.30.0"
id("io.morethan.jmhreport") version "0.9.0"
id("me.champeau.gradle.jmh") version "0.5.3"
id("me.champeau.jmh") version "0.6.4"
id("nebula.release") version "15.3.1"
id("net.ltgt.errorprone") version "2.0.1"
id("net.ltgt.nullaway") version "1.1.0"
id("org.checkerframework") version "0.5.20"
id("org.jetbrains.kotlin.jvm") version "1.4.21"
id("org.unbroken-dome.test-sets") version "3.0.1"
id("org.jetbrains.kotlin.jvm") version "1.5.0"
id("org.unbroken-dome.test-sets") version "4.0.0"
id("ru.vyarus.animalsniffer") version "1.5.3"
id("me.champeau.gradle.japicmp") version "0.2.9"
}