Triple-T / gradle-play-publisher

GPP is Android's unofficial release automation Gradle Plugin. It can do anything from building, uploading, and then promoting your App Bundle or APK to publishing app listings and other metadata.
MIT License
4.09k stars 339 forks source link

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

Closed AndreasBoehm closed 7 months ago

AndreasBoehm commented 1 year ago

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

github-actions[bot] commented 11 months ago

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.

AndreasBoehm commented 11 months ago

This was closed without being fixed.

syslogic commented 10 months ago

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 {}.

https://github.com/Triple-T/gradle-play-publisher/blob/df4eadf1ca6b5bad50e21be0b21816722ed50342/play/plugin/src/main/kotlin/com/github/triplet/gradle/play/PlayPublisherPlugin.kt#L78-L88

edharkhimich commented 9 months ago

Any updates on this?

Goooler commented 7 months ago

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

https://github.com/Triple-T/gradle-play-publisher/blob/19dc9a6e712f3a839b59b90cee8697f15de0df70/play/plugin/src/main/kotlin/com/github/triplet/gradle/play/PlayPublisherPlugin.kt#L181

check

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

SUPERCILEX commented 7 months ago

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

PavelSynek commented 6 months ago

I confirm that the warning is fixed with snapshot build.