-
-
Notifications
You must be signed in to change notification settings - Fork 338
Description
Describe the bug
When play publishing is disabled in configuration then task installRelease can not be found when there are no publishing keys. Without using this 'enabled' parameter it is possible to use this task and install unsigned apk.
When dev have locally set publishing keys it works fine.
How To Reproduce
Having configuration like this:
play {
if (isInLocalEnv()) {
enabled = false
}
track = 'internal'
serviceAccountCredentials = rootProject.file('keystores/google-play-publisher-api-key.json')
}
where isInLocalEnv() is our local function which checks if current build is done on local dev machine.
Then using ./gradlew installRelease we are getting:
`
FAILURE: Build failed with an exception.
- What went wrong:
Cannot locate tasks that match ':app:installRelease' as task 'installRelease' not found in project ':app'. Some candidates are: 'uninstallRelease'.
`
what is more interesing task assembleRelease still can be used correctly.
When
if (isInLocalEnv()) { enabled = false }
is removed then it works fine.
Versions
+--- com.github.triplet.gradle:play-publisher:3.8.4
| +--- com.github.triplet.gradle:android-publisher:3.8.4
| | +--- com.github.triplet.gradle:common-utils:3.8.4
| +--- com.github.triplet.gradle:common-utils:3.8.4
| +--- com.github.triplet.gradle:common-validation:3.8.4
Gradle 8.0
+--- com.android.tools.build:gradle:8.1.2
| --- com.android.tools.build:gradle:3.6.1 -> 8.1.2 ()
| +--- com.android.tools.build:gradle:7.0.4 -> 8.1.2 ()
| +--- com.android.tools.build:gradle:7.1.0 -> 8.1.2 (*)
Tasks executed
installRelease
Expected behavior
Using installRelease should be also possible when dev has not publishing keys set.