Closed sjaakiejj closed 2 years ago
Please delete the applicationVariants stuff and only keep the play block, a top level play block with AUTO resolution should work just fine. Or if you were trying to only configure release variants, use playConfigs
.
I believe the version codes for the watch and phone apks are supposed to be different: https://developer.android.com/training/wearables/packaging#specify-a-version-code. You can then follow this guide: https://github.com/Triple-T/gradle-play-publisher#combining-artifacts-into-a-single-release. For your case, you have seperate build files so I think that means you'll have to pick one Gradle module to do the commit and then lock in that ordering by adding the mustRunAfter logic inside the root build file.
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.
@sjaakiejj What did you end up doing? If you solved it, can you provide the needed code to upload the wear and mobile app to internal testing at the same time?
What are you having trouble with and how can we help you? I've been using Gradle Play Publisher to publish my Android app for some time now and I've recently added a dependent WearOS companion app.
My build.gradle looks as follows:
Android App:
WearOS App:
When running this, both the Android app and the WearOS app get uploaded to Google Play. The Android app will have a version code
68000
and the WearOS app will have a version code68001
.Gradle Play Publisher then automatically assigns the Android app as a new release in the 'Internal Testing' track, but this release does not include the WearOS APK. I can manually go into the Play console to then create a new release that includes both, after which the release is correctly available on both WearOS and Android, but I can't figure out how to get Gradle Play Publisher to do this for me.
To my understanding, product flavours aren't meant for this use case, and I've tried making use of
retain
but that results in the following error