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

Gradle 8.2 deprecated conventions and added nagging #226

Closed
5 tasks done
TWiStErRob opened this issue Jun 1, 2023 · 9 comments
Closed
5 tasks done

Gradle 8.2 deprecated conventions and added nagging #226

TWiStErRob opened this issue Jun 1, 2023 · 9 comments
Milestone

Comments

@TWiStErRob
Copy link
Collaborator

TWiStErRob commented Jun 1, 2023

From this plugin every user will get this:

> Configure project :
The Project.getConvention() method has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2-milestone-1/userguide/upgrading_version_8.html#deprecated_access_to_conventions
        at org.gradle.api.internal.project.DefaultProject.getConvention(DefaultProject.java:593)
        at io.github.gradlenexus.publishplugin.NexusPublishPlugin.addMavenRepositories(NexusPublishPlugin.kt:273)
        at io.github.gradlenexus.publishplugin.NexusPublishPlugin.access$addMavenRepositories(NexusPublishPlugin.kt:40)
        at io.github.gradlenexus.publishplugin.NexusPublishPlugin$configurePublishingForAllProjects$1$1$1.execute(NexusPublishPlugin.kt:157)
        at io.github.gradlenexus.publishplugin.NexusPublishPlugin$configurePublishingForAllProjects$1$1$1.execute(NexusPublishPlugin.kt:40)
The Project.getConvention() method has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2/userguide/upgrading_version_8.html#deprecated_access_to_conventions
	at org.gradle.api.internal.project.DefaultProject.getConvention(DefaultProject.java:593)
	at io.github.gradlenexus.publishplugin.NexusPublishPlugin.configureTaskDependencies(NexusPublishPlugin.kt:280)
	at io.github.gradlenexus.publishplugin.NexusPublishPlugin.access$configureTaskDependencies(NexusPublishPlugin.kt:40)
	at io.github.gradlenexus.publishplugin.NexusPublishPlugin$configurePublishingForAllProjects$1$1$1.execute(NexusPublishPlugin.kt:173)
	at io.github.gradlenexus.publishplugin.NexusPublishPlugin$configurePublishingForAllProjects$1$1$1.execute(NexusPublishPlugin.kt:40)

There isn't much to do to fix this, only we need to compile the project with Gradle 8.2 as suggested here:
gradle/gradle#25206

However, using Gradle 8.2 is not trivial, it requires these steps (and shows how useful it is to merge Renovate PRs soon-ish 😉):

@szpak Timeline to do this is a few weeks until Gradle 8.2 becomes stable.

@szpak
Copy link
Contributor

szpak commented Jun 1, 2023

Thanks @TWiStErRob . I will work on that "soon", after #222 is merged. Btw, what other (potentially non-backward incompatible) changes would you see before 2.0.0?

@maczikasz
Copy link
Contributor

FYI the PR #222 will actually fix that nagging for 8.2

@TWiStErRob
Copy link
Collaborator Author

Cool, good to hear @maczikasz. Note: there were 2 or 3 the calls. That means this is not urgent, but still would be nice to unblock contributions behind an epic PR :)

@TWiStErRob
Copy link
Collaborator Author

@szpak none of what I listed is backwards incompatible IMO. I don't think there's too much need to be afraid of backwards compatibility. Just provide a good migration guide, and then it takes 3 minutes to do a breaking upgrade. 😉 e.g. Stutter's 0.7 is a good example, it's totally changed, yet nothing really changed so it was easy.

@TWiStErRob
Copy link
Collaborator Author

Closing this as fixed by #222 (see diff), because that PR changed the .the<> calls to extension access. (This was the second option recommended by gradle/gradle#25206)

@szpak add milestone?

@szpak szpak added this to the 2.0.0 milestone Jun 4, 2023
@TWiStErRob
Copy link
Collaborator Author

@szpak Can you please release this? Gradle 8.2 is released stable. e.g. Mockito is affected.

@szpak
Copy link
Contributor

szpak commented Jul 5, 2023

Can you give 2.0.0-rc-1 as try? It was released a few weeks ago to test integration with Ivy (and I could push a tag with a release to GitHub...)

@TWiStErRob
Copy link
Collaborator Author

Oh, 🤦‍♂️ I forgot that was released. Please do mark it as pre-release so it shows in Releases view on GitHub.

@szpak
Copy link
Contributor

szpak commented Jul 6, 2023

Done. In fact the tag was there, but I needed to "generate" the changelog and create a pre-release.

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

3 participants