Skip to content
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

Task installRelease not found when publishing is disabled #1103

Open
PawelSmolarski opened this issue Oct 6, 2023 · 1 comment
Open

Task installRelease not found when publishing is disabled #1103

PawelSmolarski opened this issue Oct 6, 2023 · 1 comment
Labels
bug Indicates an unexpected problem or unintended behavior dontclose Prevents the stale bot from closing this issue/pr

Comments

@PawelSmolarski
Copy link

PawelSmolarski commented Oct 6, 2023

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.

@PawelSmolarski PawelSmolarski added the bug Indicates an unexpected problem or unintended behavior label Oct 6, 2023
@github-actions
Copy link

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.

@github-actions github-actions bot added the waiting-for-reply Indicates that an issue or pull request needs more information label Oct 14, 2023
@SUPERCILEX SUPERCILEX reopened this Oct 22, 2023
@SUPERCILEX SUPERCILEX added the dontclose Prevents the stale bot from closing this issue/pr label Oct 22, 2023
@github-actions github-actions bot removed the waiting-for-reply Indicates that an issue or pull request needs more information label Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior dontclose Prevents the stale bot from closing this issue/pr
Projects
None yet
Development

No branches or pull requests

2 participants