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

Some problems were found with the configuration of task ':app:promoteArtifact' (type 'UpdatableTrackLifecycleTask') #1118

Open cosic opened 10 months ago

cosic commented 10 months ago

Describe the bug

When I try to rollout app I got error:

> Task :app:promoteArtifact FAILED

> Task :commitEditForComDotPetDotMain
Committing changes

FAILURE: Build failed with an exception.

* What went wrong:
Some problems were found with the configuration of task ':app:promoteArtifact' (type 'UpdatableTrackLifecycleTask').
  - In plugin 'com.github.triplet.gradle.play.PlayPublisherPlugin$Inject' type 'com.github.triplet.gradle.play.tasks.internal.UpdatableTrackLifecycleTask' property 'extension.commit' doesn't have a configured value.

    Reason: This property isn't marked as optional and no value has been configured.

    Possible solutions:
      1. Assign a value to 'extension.commit'.
      2. Mark property 'extension.commit' as optional.

    For more information, please refer to https://docs.gradle.org/8.5/userguide/validation_problems.html#value_not_set in the Gradle documentation.
  - In plugin 'com.github.triplet.gradle.play.PlayPublisherPlugin$Inject' type 'com.github.triplet.gradle.play.tasks.internal.UpdatableTrackLifecycleTask' property 'extension.defaultToAppBundles' doesn't have a configured value.

    Reason: This property isn't marked as optional and no value has been configured.

    Possible solutions:
      1. Assign a value to 'extension.defaultToAppBundles'.
      2. Mark property 'extension.defaultToAppBundles' as optional.

    For more information, please refer to https://docs.gradle.org/8.5/userguide/validation_problems.html#value_not_set in the Gradle documentation.
  - In plugin 'com.github.triplet.gradle.play.PlayPublisherPlugin$Inject' type 'com.github.triplet.gradle.play.tasks.internal.UpdatableTrackLifecycleTask' property 'extension.enabled' doesn't have a configured value.

    Reason: This property isn't marked as optional and no value has been configured.

    Possible solutions:
      1. Assign a value to 'extension.enabled'.
      2. Mark property 'extension.enabled' as optional.

    For more information, please refer to https://docs.gradle.org/8.5/userguide/validation_problems.html#value_not_set in the Gradle documentation.
  - In plugin 'com.github.triplet.gradle.play.PlayPublisherPlugin$Inject' type 'com.github.triplet.gradle.play.tasks.internal.UpdatableTrackLifecycleTask' property 'extension.resolutionStrategy' doesn't have a configured value.

    Reason: This property isn't marked as optional and no value has been configured.

    Possible solutions:
      1. Assign a value to 'extension.resolutionStrategy'.
      2. Mark property 'extension.resolutionStrategy' as optional.

    For more information, please refer to https://docs.gradle.org/8.5/userguide/validation_problems.html#value_not_set in the Gradle documentation.
  - In plugin 'com.github.triplet.gradle.play.PlayPublisherPlugin$Inject' type 'com.github.triplet.gradle.play.tasks.internal.UpdatableTrackLifecycleTask' property 'extension.track' doesn't have a configured value.

    Reason: This property isn't marked as optional and no value has been configured.

    Possible solutions:
      1. Assign a value to 'extension.track'.
      2. Mark property 'extension.track' as optional.

    For more information, please refer to https://docs.gradle.org/8.5/userguide/validation_problems.html#value_not_set in the Gradle documentation.

How To Reproduce

Plugin configuration from ./app/build.gradle.kts

   plugins {
        id("com.github.triplet.play")
   }

    configure<com.github.triplet.gradle.play.PlayPublisherExtension> {
        serviceAccountCredentials.set(file("$credentialDir/google-play-service-account-key.json"))
        defaultToAppBundles.set(true)
        enabled.set(true)
        commit.set(true)
        resolutionStrategy.set(com.github.triplet.gradle.androidpublisher.ResolutionStrategy.FAIL)
        track.set("beta")
    }

I publish aab into Beta channel as well by.

:app:publishReleaseBundle -Pp_track=beta

(1) After that I try to move and rollout on 5% in production channel:

./gradlew :app:promoteArtifact --from-track beta --promote-track production --release-status inProgress --user-fraction 0.05 --no-configuration-cache 

(2) and after that I try to rollout on 5.1% into production channel:

./gradlew :app:promoteArtifact --from-track production --promote-track production --release-status inProgress --user-fraction 0.051 --no-configuration-cache 

On (1) and (2) task I got the error wich described above.

Versions

Tasks executed

promoteArtifact

Expected behavior

Rollout the app without error.