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.13k stars 341 forks source link

Update apk + bundle task dependencies on artifactDir change propagation #649

Closed abhimaanmadhav closed 4 years ago

abhimaanmadhav commented 5 years ago

Describe the bug

gradle task uploadReleasePrivateBundle does not honor --artifact-dir /pathname instead it builds everything instead of using the given path argument

How To Reproduce

./gradlew uploadReleasePrivateBundle --artifact-dir /Users/abhimaanmadhav/Android/work\ space/build/outputs/bundle/release/test-release.aab

Versions

Run this command to get all the version info you need: 5.4.1 +--- com.android.tools.build:gradle:3.5.0-rc02 | | +--- com.android.tools.build:gradle:3.0.0 -> 3.5.0-rc02 (*)

Tasks executed

./gradlew uploadReleasePrivateBundle --artifact-dir /Users/abhimaanmadhav/Android/work\ space/build/outputs/bundle/release/test-release.aab

Expected behavior

it should not build the artifact instead should take artifact given as a parameter

SUPERCILEX commented 5 years ago

I've heard this one before, but I can't repro unfortunately. Can you search your build files for dependsOn and see if there's anything related to GPP. If not, what other plugins are you applying?

abhimaanmadhav commented 5 years ago

der no depends on in the whoel project

below are all the plugin used by me in order of its applied

plugin { id("com.android.application") id("kotlin-android") id("kotlin-kapt") id("kotlin-android-extensions") id("com.github.triplet.play") id("io.fabric") id("newrelic") id("com.google.firebase.firebase-perf") }

all the usual stuff in gradle

............. .............

last line of gradle file

apply plugin: 'com.google.gms.google-services'

abhimaanmadhav commented 5 years ago

note : another interesting thing is the artifacts work if you we add the artifact path in build.gradle file example play { serviceAccountCredentials = file("/data/dev/credentials/api-service account.json") track = "internal" defaultToAppBundles = true resolutionStrategy = "ignore" artifactDir = file("path/to/apk-or-app-bundle/dir") }

SUPERCILEX commented 5 years ago

Oh, I got it. The issue is that you're calling some sort of eager task configurator method. In the short term, fix those issue (so no tasks.all, no tasks.onEach, etc).

Long term, I should be able to fix this issue by creating a callback for when the artifactDir property changes, wiping out all deps with setDependsOn(null), and then re-adding deps without the full app build.

abhimaanmadhav commented 5 years ago

i believe i am not calling any eager task config methods.Maybe other plugins like playservice, firebase performance etc plugins.do we have a work around to try for this until we get a fix?

SUPERCILEX commented 5 years ago
SUPERCILEX commented 5 years ago

Depends on #652