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

Deprecation warning about Project.getConvention() when run using gradle 8.2.1 #1094

Closed
AndreasBoehm opened this issue Jul 18, 2023 · 7 comments · Fixed by #1113
Closed

Deprecation warning about Project.getConvention() when run using gradle 8.2.1 #1094

AndreasBoehm opened this issue Jul 18, 2023 · 7 comments · Fixed by #1113
Labels
dontclose Prevents the stale bot from closing this issue/pr enhancement Indicates new feature requests

Comments

@AndreasBoehm
Copy link

Problem description

The Project.getConvention() method has been deprecated.
This is scheduled to be removed in Gradle 9.0.
Documentation
Plugin: com.github.triplet.play

at org.gradle.api.internal.project.DefaultProject.getConvention(DefaultProject.java:593)	
at com.github.triplet.gradle.play.PlayPublisherPlugin.applyInternal(PlayPublisherPlugin.kt:904)	
at com.github.triplet.gradle.play.PlayPublisherPlugin.access$applyInternal(PlayPublisherPlugin.kt:71)	
at com.github.triplet.gradle.play.PlayPublisherPlugin$apply$2.invoke(PlayPublisherPlugin.kt:87)	
at com.github.triplet.gradle.play.PlayPublisherPlugin$apply$2.invoke(PlayPublisherPlugin.kt:86)	
at com.github.triplet.gradle.play.PlayPublisherPlugin$inlined$sam$i$org_gradle_api_Action$0.execute(DomainObjectCollectionExtensions.kt)	
•••
at com.github.triplet.gradle.play.PlayPublisherPlugin.apply(PlayPublisherPlugin.kt:689)	
at com.github.triplet.gradle.play.PlayPublisherPlugin.apply(PlayPublisherPlugin.kt:71)

Additional context

I used gradle 8.2.1 and Gradle Play Publisher 3.8.4

@AndreasBoehm AndreasBoehm added the enhancement Indicates new feature requests label Jul 18, 2023
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent
activity. It will be closed if no further activity occurs. Thank you for your
contributions.

@github-actions github-actions bot added the waiting-for-reply Indicates that an issue or pull request needs more information label Jul 26, 2023
@github-actions github-actions bot closed this as completed Aug 3, 2023
@AndreasBoehm
Copy link
Author

This was closed without being fixed.

@SUPERCILEX SUPERCILEX added the dontclose Prevents the stale bot from closing this issue/pr label Aug 3, 2023
@SUPERCILEX SUPERCILEX reopened this Aug 3, 2023
@SUPERCILEX SUPERCILEX removed the waiting-for-reply Indicates that an issue or pull request needs more information label Aug 3, 2023
@syslogic
Copy link

syslogic commented Sep 7, 2023

It seems to be the way, how the PlayPublisherExtension is being configured, which possibly can be avoided, when the PlayPublisherExtension knows these default values already; don't .apply {}.

project.extensions.create<PlayPublisherExtension>(PLAY_PATH, "default").apply {
enabled.convention(true)
defaultToAppBundles.convention(false)
commit.convention(true)
track.convention("internal")
resolutionStrategy.convention(ResolutionStrategy.FAIL)
}
project.plugins.withType<AppPlugin> {
applyInternal(project)
}

@edharkhimich
Copy link

Any updates on this?

@Goooler
Copy link
Contributor

Goooler commented Dec 13, 2023

Fixing this in #1113. I don't see the line in your stacktrace (PlayPublisherPlugin.kt:904), but I guess this is due to

check

https://github.com/gradle/gradle/blob/1cf537a851c635c364a4214885f8b9798051175b/subprojects/kotlin-dsl/src/main/kotlin/org/gradle/kotlin/dsl/ProjectExtensions.kt#L100-L112

@SUPERCILEX
Copy link
Collaborator

Can someone confirm with snapshot builds that this is fixed? (Those should go out within the hour.)

@PavelSynek
Copy link

I confirm that the warning is fixed with snapshot build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dontclose Prevents the stale bot from closing this issue/pr enhancement Indicates new feature requests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants