Skip to content
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

Upgrade Gradle 8.4 to 8.5 and upgrade related Gradle Plugins #805

Merged
merged 11 commits into from Feb 7, 2024

Conversation

TWiStErRob
Copy link
Contributor

@TWiStErRob TWiStErRob commented Jan 28, 2024

See individual commits. Let me know how this should be done if this YOLO PR is too broad.

Proposed commit message:

Upgrade Gradle 8.4 to 8.5 and upgrade related Gradle Plugins

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

PR checklist

The following checklist shall help the PR's author, the reviewers and maintainers to ensure the quality of this project.
It is based on our contributors guidelines, especially the "writing code" section.
It shall help to check for completion of the listed points.
If a point does not apply to the given PR's changes, the corresponding entry can be simply marked as done.

Documentation (general)

  • There is documentation (Javadoc and site documentation; added or updated)
  • There is implementation information to describe why a non-obvious source code / solution got implemented
  • Site documentation has its own .adoc file in the docs folder, e.g. docs/report-entries.adoc
  • Site documentation in .adoc file references demo in src/demo/java instead of containing code blocks as text
  • Only one sentence per line (especially in .adoc files)
  • Javadoc uses formal style, while sites documentation may use informal style

Documentation (new extension)

  • The docs/docs-nav.yml navigation has an entry for the new extension
  • The package-info.java contains information about the new extension

Code (general)

  • Code adheres to code style, naming conventions etc.
  • Successful tests cover all changes
  • There are checks which validate correct / false usage / configuration of a functionality and there are tests to verify those checks
  • Tests use AssertJ or our own PioneerAssert (which are based on AssertJ)

Code (new package)

  • The new package is exported in module-info.java
  • The new package is also present in the tests
  • The new package is opened for reflection to JUnit 5 in module-info.java
  • The new package is listed in the contribution guide

Contributing

  • A prepared commit message exists
  • The list of contributions inside README.adoc mentions the new contribution (real name optional)

Configuring project ':demo' without an existing directory is deprecated. The configured projectDirectory 'P:\projects\contrib\github-junit-pioneer\demo' does not exist, can't be written to or is not a directory. This behavior has been deprecated. This will fail with an error in Gradle 9.0. Make sure the project directory exists and can be written. Consult the upgrading guide for further information: https://docs.gradle.org/8.5/userguide/upgrading_version_8.html#deprecated_missing_project_directory
> Configure project :
The '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.
The 'sonar' 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.
Execution failed for task ':compileTestJava'.
> Could not resolve all files for configuration ':testCompileClasspath'.
   > Failed to transform jimfs-1.3.0.jar (com.google.jimfs:jimfs:1.3.0) to match attributes {artifactType=jar, javaModule=true, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-api}.
      > Execution failed for ExtraJavaModuleInfoTransform: Z:\caches\gradle\caches\modules-2\files-2.1\com.google.jimfs\jimfs\1.3.0\93096472c3654a761c40c8e5d4ad82a7c1a0fd54\jimfs-1.3.0.jar.
         > 'com.google.jimfs' already has the Automatic-Module-Name 'com.google.common.jimfs'; explicitly allow override via 'overrideName()'
@Michael1993 Michael1993 added the full-build Triggers full build suite on PR label Jan 28, 2024
Copy link
Member

@Michael1993 Michael1993 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this! Could you open an issue where we can discuss all your different changes and PRs with the other maintainers?

Comment on lines -201 to -205
project(":demo") {
this.sonar {
isSkipProject = true
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you delete this part?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See 299c95e

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the :demo project used in any way? I couldn't find any scripts or references to it in the repo other than definition and exclusion from sonar.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Bukama please answer #805 (comment), and/or resolve this. From the code alone I don't see :demo usages.

settings.gradle.kts Outdated Show resolved Hide resolved
build.gradle.kts Show resolved Hide resolved
.gitattributes Show resolved Hide resolved
@TWiStErRob
Copy link
Contributor Author

Could you open an issue where we can discuss all your different changes and PRs with the other maintainers?

I'm not sure how to action this. The umbrella would be "CI uses outdated tools", but that might also increase the scope. These are 3 small isolated updates (similar to what Dependabot/Renovate would do + fixing deprecations) each target what's in the title.

@TWiStErRob TWiStErRob changed the title Gradle 8.5 + Upgrade Gradle Plugins Upgrade Gradle 8.4 to 8.5 and upgrade related Gradle Plugins Jan 29, 2024
@Bukama
Copy link
Member

Bukama commented Jan 29, 2024

Hey, thanks for the PR. @Michael1993 already reviewed it. Therefore only one thing by me:

  • Removed unused :demo project.

The demo project is used as code base for the documentation

@TWiStErRob
Copy link
Contributor Author

The demo project is used as code base for the documentation

@Bukama Can you please show where it is used and how?
Note: the demo source source (src/demo/java) is not removed, and gradlew demoTests still works.

settings.gradle.kts Outdated Show resolved Hide resolved
build.gradle.kts Outdated Show resolved Hide resolved
@TWiStErRob
Copy link
Contributor Author

TWiStErRob commented Feb 2, 2024

@Michael1993 @Bukama @beatngu13 can I please get a re-review to resolve/continue conversations?

@beatngu13
Copy link
Member

BTW feel free to add yourself and your PRs to the contributors list:

https://github.com/junit-pioneer/junit-pioneer?tab=readme-ov-file#contributors

And if I haven't said it already: thank you! 😉

Copy link
Member

@Michael1993 Michael1993 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's fine for me, please coordinate with @beatngu13 about his requests.

Using a toolchain installed via auto-provisioning, but having no toolchain repositories configured. This behavior is deprecated. Consider defining toolchain download repositories, otherwise the build might fail in cle
an environments; see https://docs.gradle.org/8.5/userguide/toolchains.html#sub:download_repositories
@TWiStErRob
Copy link
Contributor Author

@beatngu13 please re-review.

@beatngu13 beatngu13 merged commit 2753134 into junit-pioneer:main Feb 7, 2024
33 checks passed
@TWiStErRob TWiStErRob deleted the gradle85 branch February 7, 2024 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
full-build Triggers full build suite on PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants