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

Update Gradle Wrapper 8.5 to 8.7 #807

Merged
merged 5 commits into from
Oct 6, 2024
Merged

Update Gradle Wrapper 8.5 to 8.7 #807

merged 5 commits into from
Oct 6, 2024

Conversation

beatngu13
Copy link
Member

@beatngu13 beatngu13 commented Mar 29, 2024

At the moment, the build causes a new warning because of:

https://docs.gradle.org/current/userguide/upgrading_version_8.html#deprecate_register_feature_main_source_set

I first have to read through this, which is why I marked this PR as a draft. Simply doing the changes suggested in the Gradle docs:

--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -29,6 +29,12 @@ val releaseBuild : Boolean = project.version != "unspecified"
 
 val targetJavaVersion = JavaVersion.VERSION_11
 
+val jacksonFeature = "jackson"
+
+sourceSets {
+       create(jacksonFeature)
+}
+
 java {
        if (experimentalBuild) {
                toolchain {
@@ -39,8 +45,8 @@ java {
        }
        withJavadocJar()
        withSourcesJar()
-       registerFeature("jackson") {
-               usingSourceSet(sourceSets["main"])
+       registerFeature(jacksonFeature) {
+               usingSourceSet(sourceSets[jacksonFeature])
        }
 }

Yields 2 errors due to our modular setup:

> Task :compileJava FAILED
/Users/kruse/dev/workspaces/private/junit-pioneer/src/main/java/module-info.java:18: error: module not found: com.fasterxml.jackson.core
        requires static com.fasterxml.jackson.core;
                                             ^
/Users/kruse/dev/workspaces/private/junit-pioneer/src/main/java/module-info.java:19: error: module not found: com.fasterxml.jackson.databind
        requires static com.fasterxml.jackson.databind;
                                             ^
2 errors

Proposed commit message:

Update Gradle Wrapper 8.5 to 8.10 (#807)

See: https://github.com/gradle/gradle/releases/tag/v8.10.2

This PR also updates the experimental Java version 21 to 24, since
21 is no longer available via `oracle-actions/setup-java` (and also is
no longer "experimental"…).

PR: #807

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)

@Bukama
Copy link
Member

Bukama commented Mar 31, 2024

Hm Jackson should already been buildable with the moditec file (FasterXML/jackson-databind#2273) which is labeled as implemented in 2.10 (we are using 2.14) 🤔

@beatngu13
Copy link
Member Author

@Bukama @Michael1993 fixing the aforementioned warning isn't straightforward (at least I don't get it right now). However, it is a warning and only becomes an error in Gradle 9.x. Meanwhile, I updated to Gradle 8.10.1 locally, and the build passes. We would then get Java 23 support, which would allow us to extend the CI build. I suggest:

  1. Create a separate issue for the Gradle warning.
  2. Update this PR to include Gradle 8.10.1.
  3. Have a separate PR to update the CI build with Java 23 (and JUnit).

WDYT?

@Bukama
Copy link
Member

Bukama commented Sep 23, 2024

I think this is a valid consideration - let's do it this way. I think we might even get an easier migration to 9 then.

@beatngu13 beatngu13 added the full-build Triggers full build suite on PR label Sep 23, 2024
Since 21 is no longer available for download (and is also no longer experimental…).
Copy link
Member

@Bukama Bukama left a comment

Choose a reason for hiding this comment

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

Thanks for the update!

@Bukama Bukama merged commit f5dca5e into main Oct 6, 2024
33 checks passed
@Bukama Bukama deleted the lab/gradle-8.7 branch October 6, 2024 04:50
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.

3 participants