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 to Gradle 7 #99

Closed
rainboyan opened this issue Mar 29, 2022 · 4 comments
Closed

Upgrade to Gradle 7 #99

rainboyan opened this issue Mar 29, 2022 · 4 comments

Comments

@rainboyan
Copy link
Contributor

Gradle 7.0 was released for a while. Gradle support JDK 16 and use Groovy 3 in Groovy DSL build scripts.
And here‘s a Gradle upgrade guide about upgrading build and plugins to be compatible with Groovy 3.

Upgrade to 7.0 will also remove some warnings from Gradle:

The AbstractArchiveTask.destinationDir property has been deprecated. This is scheduled to be removed in Gradle 7.0. Please use the destinationDirectory property instead. See https://docs.gradle.org/6.9.1/dsl/org.gradle.api.tasks.bundling.AbstractArchiveTask.html#org.gradle.api.tasks.bundling.AbstractArchiveTask:destinationDir for more details.
...
Adding a Configuration as a dependency is a confusing behavior which isn't recommended. This behaviour has been deprecated and is scheduled to be removed in Gradle 8.0. If you're interested in inheriting the dependencies from the Configuration you are adding, you should use Configuration#extendsFrom instead. See https://docs.gradle.org/7.2/dsl/org.gradle.api.artifacts.Configuration.html#org.gradle.api.artifacts.Configuration:extendsFrom(org.gradle.api.artifacts.Configuration[]) for more details.
...
The Report.enabled property has been deprecated. This is scheduled to be removed in Gradle 8.0. Please use the required property instead. See https://docs.gradle.org/7.2/dsl/org.gradle.api.reporting.Report.html#org.gradle.api.reporting.Report:enabled for more details.
...
The JavaExec.main property has been deprecated. This is scheduled to be removed in Gradle 8.0. Please use the mainClass property instead. See https://docs.gradle.org/7.2/dsl/org.gradle.api.tasks.JavaExec.html#org.gradle.api.tasks.JavaExec:main for more details.
...
The AbstractCompile.destinationDir property has been deprecated. This is scheduled to be removed in Gradle 8.0. Please use the destinationDirectory property instead. Consult the upgrading guide for further information: https://docs.gradle.org/7.2/userguide/upgrading_version_7.html#compile_task_wiring
...
The AbstractArchiveTask.appendix property has been deprecated. This is scheduled to be removed in Gradle 8.0. Please use the archiveAppendix property instead. See https://docs.gradle.org/7.2/dsl/org.gradle.api.tasks.bundling.AbstractArchiveTask.html#org.gradle.api.tasks.bundling.AbstractArchiveTask:appendix for more details.
@puneetbehl
Copy link
Contributor

I have tried to upgrade the plugin to use Gradle 7 in the past but I wasn’t able to do so due to some challenges around Gradle using an older version of Apache Groovy vs the plugin on higher (or latest) version of it. I think this is due to some changes around how a Gradle 7 plugin uses Groovy which results in the tight coupling between Groovy and Gradle. I don’t recall the specifics now and would need to spend more time to share the exact details. Moreover, I am waiting for the Gradle 7 version which uses Groovy 3.0.11.

@rainboyan
Copy link
Contributor Author

Moreover, I am waiting for the Gradle 7 version which uses Groovy 3.0.11.

Gradle 7.6 already published with Groovy 3.0.13. The main thing is to solve a lot of STC in Groovy 3.0.10+, GORM should be fixed with some STC errors first.

> gradle -v

------------------------------------------------------------
Gradle 7.6
------------------------------------------------------------

Build time:   2022-11-25 13:35:10 UTC
Revision:     daece9dbc5b79370cc8e4fd6fe4b2cd400e150a8

Kotlin:       1.7.10
Groovy:       3.0.13
Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:          1.8.0_345 (Azul Systems, Inc. 25.345-b01)

@rainboyan
Copy link
Contributor Author

@puneetbehl gradle-nexus-plugin reached end of life (EOL) status due to its incompatibility with Gradle 7.0.

https://github.com/bmuschko/gradle-nexus-plugin

This project reached end of life (EOL) status due to its incompatibility with Gradle 7.0. No more feature requests will be considered. Bug fixes will be accepted as long as they will be compatible with earlier versions of Gradle.

@puneetbehl
Copy link
Contributor

@rainboyan I think we can move away from gradle-nexus-plugin and use alternatives for pushing the artefacts to Maven Central. I believe we are already doing this on other repositories. Thanks!

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

No branches or pull requests

2 participants