-
Notifications
You must be signed in to change notification settings - Fork 61
Upgrade Gradle to v9.5.1 from v8.5 #278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2de46bb
46c5ebc
d99854a
16b97ff
e701b6c
dd88e6e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,9 +6,9 @@ import java.net.http.HttpRequest | |
| import java.net.http.HttpResponse | ||
|
|
||
| plugins { | ||
| id "me.champeau.jmh" version "0.6.6" apply false | ||
| id 'com.gradleup.shadow' version '8.3.6' apply false | ||
| id 'io.freefair.lombok' version '8.2.2' apply false | ||
| id "me.champeau.jmh" version "0.7.3" apply false | ||
| id 'com.gradleup.shadow' version '9.4.1' apply false | ||
| id 'io.freefair.lombok' version '8.14.2' apply false | ||
| } | ||
|
|
||
| // After sunsetting OSSRH, we need to publish artifacts on Sonatype Central Publisher Portal, after | ||
|
|
@@ -19,7 +19,7 @@ plugins { | |
| // create deployment on the portal, so we need to upload artifacts to the portal manually by | ||
| // calling API. | ||
| // This task is used to upload artifacts to the portal after publishing artifacts to OSSRH staging service. | ||
| task sonatypeUpload { | ||
| tasks.register('sonatypeUpload') { | ||
| description = "Uploads artifacts to Sonatype Portal from OSSRH staging service." | ||
| doLast { | ||
| def token = findProperty("sonatypeUsername") + ':' + findProperty("sonatypePassword") | ||
|
|
@@ -56,8 +56,10 @@ subprojects { | |
| group = "com.linecorp.decaton" | ||
| version = "${version}" + (snapshot.toBoolean() ? "-SNAPSHOT" : "") | ||
|
|
||
| sourceCompatibility = JavaVersion.VERSION_1_8 | ||
| targetCompatibility = JavaVersion.VERSION_1_8 | ||
| java { | ||
| sourceCompatibility = JavaVersion.VERSION_1_8 | ||
| targetCompatibility = JavaVersion.VERSION_1_8 | ||
| } | ||
|
|
||
| repositories { | ||
| mavenCentral() | ||
|
|
@@ -83,10 +85,19 @@ subprojects { | |
| } | ||
| } | ||
|
|
||
| sourceSets.create('it') { | ||
| compileClasspath += sourceSets.main.output | ||
| runtimeClasspath += sourceSets.main.output | ||
| compileClasspath += sourceSets.testFixtures.output | ||
| runtimeClasspath += sourceSets.testFixtures.output | ||
| } | ||
|
Comment on lines
+88
to
+93
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The order here is important. Since Gradle 8.14.4, accessing reserved configuration names derived from Without this change, the following error occurs: |
||
|
|
||
| configurations { | ||
| shade | ||
| api.extendsFrom(shade) | ||
| itImplementation.extendsFrom(implementation) | ||
| } | ||
| configurations.named('itImplementation') { | ||
| extendsFrom(configurations.named('implementation').get()) | ||
| } | ||
|
|
||
| dependencies { | ||
|
|
@@ -95,36 +106,31 @@ subprojects { | |
|
|
||
| // Likely be used for most modules | ||
| testImplementation libs.junitJupiter | ||
| testRuntimeOnly libs.junitPlatformLauncher | ||
| testImplementation libs.mockitoCore | ||
| testImplementation libs.mockitoJunitJupiter | ||
| itImplementation libs.junitJupiter | ||
| itRuntimeOnly libs.junitPlatformLauncher | ||
| } | ||
|
|
||
| sourceSets.create('it') { | ||
| compileClasspath += sourceSets.main.output | ||
| runtimeClasspath += sourceSets.main.output | ||
| compileClasspath += sourceSets.testFixtures.output | ||
| runtimeClasspath += sourceSets.testFixtures.output | ||
| } | ||
|
|
||
| task integrationTest(type: Test) { | ||
| tasks.register('integrationTest', Test) { | ||
| testClassesDirs = sourceSets.it.output.classesDirs | ||
| classpath = sourceSets.it.runtimeClasspath | ||
| } | ||
|
|
||
| tasks.withType(Test) { | ||
| tasks.withType(Test).configureEach { | ||
| useJUnitPlatform() | ||
| testLogging { | ||
| // set options for log level LIFECYCLE | ||
| events TestLogEvent.FAILED, | ||
| TestLogEvent.PASSED, | ||
| TestLogEvent.SKIPPED, | ||
| TestLogEvent.STANDARD_OUT | ||
| exceptionFormat TestExceptionFormat.FULL | ||
| showExceptions true | ||
| showCauses true | ||
| showStackTraces true | ||
| showStandardStreams false | ||
| exceptionFormat = TestExceptionFormat.FULL | ||
| showExceptions = true | ||
| showCauses = true | ||
| showStackTraces = true | ||
| showStandardStreams = false | ||
| } | ||
| def testJavaVersion = findProperty("test.java.major.version") | ||
| if (testJavaVersion != null) { | ||
|
|
@@ -141,13 +147,13 @@ subprojects { | |
| repositories { | ||
| maven { | ||
| if (isReleaseVersion) { | ||
| url("https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/") | ||
| url = uri("https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/") | ||
| } else { | ||
| url("https://central.sonatype.com/repository/maven-snapshots/") | ||
| url = uri("https://central.sonatype.com/repository/maven-snapshots/") | ||
| } | ||
| credentials { | ||
| username findProperty("sonatypeUsername") | ||
| password findProperty("sonatypePassword") | ||
| username = findProperty("sonatypeUsername") | ||
| password = findProperty("sonatypePassword") | ||
| } | ||
| } | ||
| } | ||
|
|
@@ -249,26 +255,29 @@ subprojects { | |
| } | ||
| assemble.dependsOn(shadowJar) | ||
|
|
||
| tasks.withType(PublishToMavenRepository) { | ||
| tasks.withType(PublishToMavenRepository).configureEach { | ||
| onlyIf { | ||
| !publishOnlyLocal | ||
| } | ||
| } | ||
|
|
||
| task sourcesJar(type: Jar, dependsOn: classes) { | ||
| def sourcesJar = tasks.register('sourcesJar', Jar) { | ||
| dependsOn(tasks.named('classes')) | ||
| archiveClassifier.set('sources') | ||
| from sourceSets.main.allSource | ||
| } | ||
|
|
||
| javadoc { | ||
| tasks.named('javadoc', Javadoc) { | ||
| source = delombok | ||
| options.encoding = 'UTF-8' | ||
| options.locale = 'en_US' | ||
| } | ||
|
|
||
| task javadocJar(type: Jar) { | ||
| def javadocJar = tasks.register('javadocJar', Jar) { | ||
| archiveClassifier.set('javadoc') | ||
| from javadoc | ||
| from tasks.named('javadoc') | ||
| } | ||
| tasks.named('build') { | ||
| dependsOn(tasks.named('javadoc')) | ||
| } | ||
| build.dependsOn(javadoc) | ||
| } | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| plugins { | ||
| id 'com.google.protobuf' version '0.8.18' | ||
| id 'com.google.protobuf' version '0.10.0' | ||
| } | ||
|
|
||
| dependencies { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eskatos/gradle-command-actionhas been moved togradle/actions/setup-gradlefinally.