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.1k stars 339 forks source link

Support gradle 7.4 #1037

Closed b95505017 closed 2 years ago

b95505017 commented 2 years ago

Describe the bug

A clear and concise description of what the bug is.

How To Reproduce

Versions

\--- com.github.triplet.play:com.github.triplet.play.gradle.plugin:3.7.0
     \--- com.github.triplet.gradle:play-publisher:3.7.0
          +--- com.github.triplet.gradle:android-publisher:3.7.0
          |    +--- com.github.triplet.gradle:common-utils:3.7.0
          +--- com.github.triplet.gradle:common-utils:3.7.0
          +--- com.github.triplet.gradle:common-validation:3.7.0
Gradle 7.4
+--- com.android.tools.build:gradle:7.1.1
|    \--- com.android.tools.build:gradle:3.5.1 -> 7.1.1 (*)
|    +--- com.android.tools.build:gradle:7.0.4 -> 7.1.1 (*)
* What went wrong:
@Option 'resolution-strategy' linked to multiple elements in class 'com.github.triplet.gradle.play.tasks.PublishBundle_Decorated'.
ZacSweers commented 2 years ago

This appears due to these two using the same resolution-strategy value

@get:OptionValues("resolution-strategy")
val resolutionStrategyOptions: List<String>

@get:Internal
@set:Option(
        option = "resolution-strategy",
        description = "Set the version conflict resolution strategy."
)
var resolutionStrategyOption: ResolutionStrategy
SUPERCILEX commented 2 years ago

Hmmm, no idea how to fix this without copying all our options into every task. Also, the resolution strategy stuff is a red herring, it'll fail at other options if you remove that one. Definitely seems like a Gradle bug though. Filed https://github.com/gradle/gradle/issues/19868

ZacSweers commented 2 years ago

I don't think that's a gradle bug, there are indeed two different options defining the same argument name

SUPERCILEX commented 2 years ago

No, OptionValues is not an option. It specifies a list of valid strings to be passed into some other option. Just to be 100% sure, I commented out resolutionStrategyOptions and the bug still occurs.

github-actions[bot] commented 2 years 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.

SUPERCILEX commented 2 years ago

Keeping this open until it's resolved in the Gradle side.

SUPERCILEX commented 2 years ago

Fixed on the Gradle side.

Calldorado-com commented 1 year ago

Works for us, thanks. Updated to Gradle 7.6