Closed chrisbanes closed 3 years ago
Sigh, keeping up with AGP is exhausting. I tried to upgrade, but couldn't figure out how to get debuggability info. Might try again this week, but probs not worth it since the next alpha is likely going to break something else anyway.
Maybe it would be great to support publish to GP officially by AGP
A possibility, but not likely. Plugin authors just need a stable public API and everything would be fine... but here we are. :man_shrugging:
Thanks for doing this @SUPERCILEX, very appreciated!
@SUPERCILEX apologies for the problems you're having. These kinds of breakages are exactly why the AGP team are working on a stable API right now. And even though they are doing everything they can to maintain binary and source compatibility with previous plugins, it's not always possible and unfortunately some of the new APIs that have been added in 4.1/4.2 canaries are still incubating, which means they have and will change while they iterate on them.
For instance, onVariant/onVariantProperties (and maybe some of the underlying types) are being rewritten right now, so... sorry about that, but it's for the best. We're aiming to have these stable in 4.2+1 version, whatever it will be (4.3, 5.0, who knows).
If I find some time I'll take a look at the issue you're seeing, but I don't currently have a checkout of your project handy, so it might take me a while until I get to it.
@wojtek-kalicinski I really do love the new APIs, so I'm sure it'll work out in the end. :) I guess my main concern is that these things will stay incubating forever -- reaching API stability in 4.3/5.0 would be awesome.
Hello,
I'm facing the same issue. May I know which version is working fine at this moment ? I need to publish apps. Gradle Play Publisher: ? Gradle Wrapper: ? Android Gradle Plugin: ?
I have tried upgrading, downgrading. But nothing is working. Is it broken for all releases ?
I run into the same problem today but still wanted to publish my app to the Play Store. Because I wanted to use Jetpack Compose I upgraded the Android Gradle Plugin to 4.2.0-alpha13. To work around this problem I downgraded to AGP 4.1.0-rc03. Work also with Jetpack Compose and with GPP 3.0.0.
Working combination: Gradle Play Publisher: 3.0.0 Gradle Wrapper: 6.6.1 Android Gradle Plugin: 4.1.0-rc03 Jetpack Compose: 1.0.0-alpha03
I hope this helps until the issue gets resolved.
@SUPERCILEX I haven't had time to look into the issue yet unfortunately, but I suspect the problem might be because two classes were renamed in one of recent the AGP releases:
Variant
became VariantBuilder
VariantProperties
became Variant
Made a bit of progress. The real issue is that you can no longer access VariantBuilder
and Variant
at the same time. This doesn't work anymore:
android.onVariantProperties {
onProperties { ... }
}
So I have to resort to hacks again that will inevitably break: https://github.com/Triple-T/gradle-play-publisher/commit/048191a19c3739d3d5c22802b40aa7b120721f9f#diff-ef31e97b4dbf7e13d2c288d8464199a3.
Currently I'm stuck because I can't figure out a way to order output.versionCode.set(...)
overrides. Something was changed and now the plugin gets run first which means anybody trying to initialize version codes themselves first will break the auto version code resolution. The failing test in question is here:
https://github.com/Triple-T/gradle-play-publisher/blob/354812b6d789abee4d2c22c598424f73962b54c5/play/plugin/src/test/kotlin/com/github/triplet/gradle/play/tasks/ProcessArtifactVersionCodesIntegrationTest.kt#L59-L92
@SUPERCILEX Hey Alex, have you made any progress on this? @wojtek-kalicinski Can you assist somehow?
Nah, still haven't figured out the ordering. That said, I'd like to unblock people so I released an unofficial 3.2.0 snapshot. It's compatible with alpha12 and alpha13.
Just confirming, 3.2.0-SNAPSHOT
works for me. Thanks Alex! 🙌
3.2.0-SNAPSHOT
also works for me. I'm on AGP 4.2.0-alpha14
.
I've just updated to the new Android Studio beta (4.2.0-beta01
) and ran into the same issue. For me, both are working: 3.2.0-SNAPSHOT
and 3.1.0-SNAPSHOT
.
Am I'm right that those versions are "compiling" but not "working"? What is not working? Or why is this issue still open and no new official release available?
Auto resolution with apk splits is broken, but I'm guessing close to no one is using that.
See #892
I'll have time to get all this going in a few weeks.
Describe the bug
Plugin doesn't currently work with AGP 4.2.0-alpha12
Versions