Skip to content

Update Gradle Wrapper to Support Java 21 #99

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

Open
3 tasks done
hasanravda opened this issue Apr 7, 2025 · 1 comment · May be fixed by #103
Open
3 tasks done

Update Gradle Wrapper to Support Java 21 #99

hasanravda opened this issue Apr 7, 2025 · 1 comment · May be fixed by #103

Comments

@hasanravda
Copy link

hasanravda commented Apr 7, 2025

Is your feature request related to a problem?

  • Yes, it is related to a problem

Description:

The current gradle-wrapper.properties file uses an outdated Gradle version that is not fully compatible with Java 21. This may cause build issues or prevent the project from compiling on systems using Java 21.

Proposed Solution:

Update the distributionUrl in gradle-wrapper.properties to a Gradle version that supports Java 21 (e.g., 8.4 or higher).

Old version, current version in code (that supports java 19 or lesser)

distributionUrl=https://services.gradle.org/distributions/gradle-8.2.1-all.zip

Version to update

distributionUrl=https://services.gradle.org/distributions/gradle-8.5-all.zip

Record

  • I agree to follow this project's Code of Conduct
  • I want to work on implementing this feature
@Swetanshu575
Copy link

The current gradle-wrapper.properties file uses Gradle 8.2.1, which is not fully compatible with Java 21.

Gradle 8.2.1 supports up to Java 20, but Java 21 support was introduced in Gradle 8.4 and improved in later versions.

The proposed solution is to update the distributionUrl in gradle-wrapper.properties to a Gradle version that supports Java 21, specifically suggesting Gradle 8.5.

Why This Matters
Java 21 is a long-term support (LTS) version, and many developers may use it for modern projects.

Gradle 8.2.1 can compile code for Java 21 using toolchains, but running Gradle itself on Java 21 may cause issues due to compatibility limitations (e.g., Kotlin DSL or internal Gradle components may fail).

Updating to a compatible Gradle version ensures the build process is stable and supports Java 21 for both compilation and runtime.

@hasanravda hasanravda linked a pull request Apr 8, 2025 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants