Describe the bug
The com.github.triplet.gradle.androidpublisher.internal.DefaultEditManager#findMaxAppVersionCode ignores inactive bundles/apks. It only considers bundles/apks that are deployed in an active track. In my case I had an inactive bundle with the versionCode 19 - which was by coincidence the latest bundle. I use the com.github.triplet.gradle.androidpublisher.ResolutionStrategy.AUTO. So in my case the plugin determined, versionCode 19 was good to use for a new upload. This prevented uploading/publishing a new bundle via the plugin, because the Play Console returned an error about using an already used versionCode:
Execution failed for task ':androidApp:publishReleaseBundle' (registered by plugin 'com.android.internal.application').
> A failure occurred while executing com.github.triplet.gradle.play.tasks.PublishBundle$Processor
> There was a failure while executing work items
> A failure occurred while executing com.github.triplet.gradle.play.tasks.PublishBundle$BundleUploader
> Concurrent uploads for app my.app.id (version code already used). Make sure to synchronously upload your APKs such that they don't conflict. If this problem persists, delete your drafts in the Play Console's artifact library.
How To Reproduce
Have an inactive bundle in the Play Console and try to run publishReleaseBundle.
Versions
Tasks executed
What tasks did you run? For example, publishReleaseBundle.
Expected behavior
Don't ignore inactive bundles/apks when determining the next versionCode to use.
Describe the bug
The com.github.triplet.gradle.androidpublisher.internal.DefaultEditManager#findMaxAppVersionCode ignores inactive bundles/apks. It only considers bundles/apks that are deployed in an active track. In my case I had an inactive bundle with the versionCode 19 - which was by coincidence the latest bundle. I use the com.github.triplet.gradle.androidpublisher.ResolutionStrategy.AUTO. So in my case the plugin determined, versionCode 19 was good to use for a new upload. This prevented uploading/publishing a new bundle via the plugin, because the Play Console returned an error about using an already used versionCode:
How To Reproduce
Have an inactive bundle in the Play Console and try to run
publishReleaseBundle.Versions
Tasks executed
What tasks did you run? For example,
publishReleaseBundle.Expected behavior
Don't ignore inactive bundles/apks when determining the next versionCode to use.