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 340 forks source link

Issues upgrading to 3.0.0 #886

Closed crysxd closed 3 years ago

crysxd commented 3 years ago

Describe the bug

I tried to upgrade to 3.0.0 as 2.8.0 does not seem to be compatible with Android gradle plugin 4.1+. I followed the instructions I found around the repo and replaced all = with set and looked up the example configurations in the readme.

I get two errors:

The first one is especially odd as I use userFraction.set(1.0) which for some reason is a BigDecimal. The second one is a missing import I guess but the readme does not state any import requirements.

Thanks for your support!

How To Reproduce

The code is available here, configuration in app/build.gradle. https://gitlab.com/crysxd/octoapp/-/tree/235-upadte-google-play-publisher

play {
    serviceAccountCredentials.set(file("service-account.json"))
    track.set("beta")
    defaultToAppBundles.set(true)
    resolutionStrategy.set(ResolutionStrategy.IGNORE)
    updatePriority.set(2)
    userFraction.set(1.0)
}

Versions

Tasks executed

Failes to sync, so all tasks :)

SUPERCILEX commented 3 years ago

Yeah, see #885.

You'll want to import com.github.triplet.gradle.androidpublisher.ResolutionStrategy and slap a d on the number to make it work for whatever reason: 1.0d. Sidenote: setting the user fraction to 1 is unnecessary.