New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Wear 2.0 Apk uploads #217
Comments
Same here, would like to see a solution as well |
+1 here... A link for newcomers (like us): https://developer.android.com/training/wearables/apps/packaging.html |
+1! |
I see a few options here:
|
@SUPERCILEX - can you give an example of how to configure this use case? In my case there is a :mobile and :wear module that both have bundles generated with bundleRelease. |
@ItsCalebJones To be completely honest, I have a very limited understanding of how Wear OS artifacts are built and published. If I recall correctly, the idea is follow this guide. You want to set the |
@SUPERCILEX - so here's how it works. In one project directory I have multiple modules for simplicity i'll combine most into a :common library thats shared between both of the main app modules, then there is a :mobile module and a :wear module. When I go to create a release bundle/apk from the root of the project I usually simply run `./gradlew assembleBundle' this in essence runs both './gradle :mobile:assembleBundle' and './gradle :wear:assembleBundle'. In each corresponding module/build/output there will be a mobile.aab and a wear.aab that I then sign and upload. For now i've found that I can do the following as suggested. wear/build.gradle
mobile/build.gradle
And then invoke in order like this -> Source: https://github.com/ItsCalebJones/SpaceLaunchNow-Android/tree/build/SLN-A_Play_Publisher |
@ItsCalebJones Yup, that's the idea. To ensure things work properly, you'll want this stuff in the root project build file: gradle.projectsEvaluated {
project(":mobile").tasks.matching { it.name.startsWith("publish") }.configureEach {
mustRunAfter(project(":wear").tasks.matching { it.name.startsWith("publish") })
}
} Then you can just run |
Has someone a running example to publish a wear and a mobile apk together to play store ? Both are successful uploaded to PlayStore, but when I install and run app, nothing happens on wear. On wear nothing appears. |
We have a Wear 2.0 apk that we have to upload along with each regular phone apk release we do. I'm not sure the best way to support this case, as these apks are generated from different modules in our project. I've configured the plugin for each module, but what seems to happen is the second apk upload deactivates the previous one:
So in my case,
gradlew publishApkRelease
runswear:publishApkRelease
first and successfully uploads version code23612
. Right after this,app:publishApkRelease
runs and uploads version code23611
, deactivating the wear apk.The text was updated successfully, but these errors were encountered: