Skip to content

Commit

Permalink
Upgrade Gradle 8.4 to 8.5 and upgrade related Gradle Plugins (#805)
Browse files Browse the repository at this point in the history
Gradle 8.5 brings performance updates and full Java 21 support.
Some plugins are already incompatible with Gradle 8.4,
so updating them to be in line with the latest Gradle release.

Minor changes:

 * Add `.gitattributes` lines for Gradle files,
to ensure they're not clobbered during git operations.
 * Remove `com.google.jimfs:jimfs`'s automatic module name,
because it's already defined and errors after bumping extra-java-module-info.
 * Added property to tell Sonar to work in a future-proof way.
 * Removed unused `:demo` project.

PR: #805
  • Loading branch information
TWiStErRob committed Feb 7, 2024
1 parent e9f160e commit 2753134
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 19 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Expand Up @@ -5,3 +5,6 @@
# force all text files on the working dir to have LF line endings
# https://git-scm.com/docs/gitattributes#_eol
* text eol=lf

*.bat text eol=crlf
*.jar binary
5 changes: 5 additions & 0 deletions README.adoc
Expand Up @@ -121,7 +121,12 @@ Thank you for your efforts! ?

The least we can do is to thank them and list some of their accomplishments here (in lexicographic order).

==== 2024

* https://github.com/TWiStErRob[Papp Róbert (TWiStErRob)] updated Gradle and GitHub Actions tooling to latest. (#803 / #804 / #805)

==== 2023

* https://github.com/eeverman[Eric Everman] added `@RestoreSystemProperties` and `@RestoreEnvironmentVariables` annotations to the https://junit-pioneer.org/docs/system-properties/[System Properties] and https://junit-pioneer.org/docs/environment-variables/[Environment Variables] extensions (#574 / #700)
* https://github.com/meredrica[Florian Westreicher] contributed to the JSON argument source extension (#704 / #724)
* https://github.com/IlyasYOY[Ilya Ilyinykh] found unused demo tests (#791)
Expand Down
22 changes: 8 additions & 14 deletions build.gradle.kts
Expand Up @@ -4,14 +4,14 @@ plugins {
checkstyle
`maven-publish`
signing
id("com.diffplug.spotless") version "6.21.0"
id("com.diffplug.spotless") version "6.25.0"
id("at.zierler.yamlvalidator") version "1.5.0"
id("org.sonarqube") version "4.3.1.3277"
id("org.shipkit.shipkit-changelog") version "1.2.0"
id("org.shipkit.shipkit-github-release") version "1.2.0"
id("com.github.ben-manes.versions") version "0.48.0"
id("io.github.gradle-nexus.publish-plugin") version "1.3.0"
id("org.gradlex.extra-java-module-info") version "1.4.2"
id("org.sonarqube") version "4.4.1.3373"
id("org.shipkit.shipkit-changelog") version "2.0.1"
id("org.shipkit.shipkit-github-release") version "2.0.1"
id("com.github.ben-manes.versions") version "0.51.0"
id("io.github.gradle-nexus.publish-plugin") version "2.0.0-rc-2"
id("org.gradlex.extra-java-module-info") version "1.7"
}

plugins.withType<JavaPlugin>().configureEach {
Expand Down Expand Up @@ -173,7 +173,7 @@ signing {
}

nexusPublishing {
this.repositories {
repositories {
sonatype()
}
}
Expand All @@ -184,7 +184,6 @@ extraJavaModuleInfo {
automaticModule("com.google.guava:listenablefuture", "com.google.guava.listenablefuture")
automaticModule("com.google.code.findbugs:jsr305", "com.google.code.findbugs.jsr305")
automaticModule("com.google.j2objc:j2objc-annotations", "com.google.j2objc.annotations")
automaticModule("com.google.jimfs:jimfs", "com.google.jimfs")
}

tasks {
Expand All @@ -198,11 +197,6 @@ tasks {
runtimeClasspath += sourceSets.main.get().output
}
}
project(":demo") {
this.sonar {
isSkipProject = true
}
}
// Adds all dependencies of main to demo sourceSet
configurations["demoImplementation"].extendsFrom(configurations.testImplementation.get())
// Ensures JUnit 5 engine is available to demo at runtime
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
12 changes: 9 additions & 3 deletions settings.gradle.kts
@@ -1,13 +1,19 @@
rootProject.name = "junit-pioneer"
include("demo")

plugins {
id("com.gradle.enterprise") version "3.14.1"
id("com.gradle.enterprise") version "3.16.2"
id("org.gradle.toolchains.foojay-resolver-convention") version("0.8.0")
}

gradleEnterprise {
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
}
}
}

// TODO move this to a better place once https://sonarsource.atlassian.net/browse/SONARGRADL-134 is resolved.
// > The 'sonar' / 'sonarqube' task depends on compile tasks.
// > This behavior is now deprecated and will be removed in version 5.x.
// > To avoid implicit compilation, set property 'sonar.gradle.skipCompile' to 'true' and make sure your project is compiled, before analysis has started.
System.setProperty("sonar.gradle.skipCompile", "true")
2 changes: 1 addition & 1 deletion src/test/java/module-info.java
Expand Up @@ -50,7 +50,7 @@
requires org.mockito;
requires org.assertj.core;
requires nl.jqno.equalsverifier;
requires com.google.jimfs;
requires com.google.common.jimfs;

// via org.assertj.core
requires java.instrument;
Expand Down

0 comments on commit 2753134

Please sign in to comment.