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.1k stars 339 forks source link

Add support for google-api-client 2.x.x #1074

Closed frmz closed 1 year ago

frmz commented 1 year ago

Problem description

Current version does't support google-api-client 2.x.x

Potential solutions/workarounds

Upgrade android play store API to latest

Additional context

Current failure message

Caused by: java.lang.ExceptionInInitializerError at com.google.api.services.androidpublisher.AndroidPublisher$Builder.build(AndroidPublisher.java:11864) at com.github.triplet.gradle.androidpublisher.internal.AndroidPublisherKt.createPublisher(AndroidPublisher.kt:39) at com.github.triplet.gradle.androidpublisher.internal.DefaultPlayPublisher$Factory.create(DefaultPlayPublisher.kt:244) at com.github.triplet.gradle.androidpublisher.PlayPublisher$Companion.invoke(PlayPublisher.kt:109) at com.github.triplet.gradle.play.tasks.internal.PlayApiService$publisher$2.invoke(PlayApiService.kt:26) at com.github.triplet.gradle.play.tasks.internal.PlayApiService$publisher$2.invoke(PlayApiService.kt:21) at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74) at com.github.triplet.gradle.play.tasks.internal.PlayApiService.getPublisher(PlayApiService.kt) at com.github.triplet.gradle.play.tasks.internal.PlayApiService.getOrCreateEditId(PlayApiService.kt:79) at com.github.triplet.gradle.play.tasks.internal.PlayApiService.access$getOrCreateEditId(PlayApiService.kt:21) at com.github.triplet.gradle.play.tasks.internal.PlayApiService$edits$2.invoke(PlayApiService.kt:30) at com.github.triplet.gradle.play.tasks.internal.PlayApiService$edits$2.invoke(PlayApiService.kt:21) at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74) at com.github.triplet.gradle.play.tasks.internal.PlayApiService.getEdits(PlayApiService.kt) at com.github.triplet.gradle.play.tasks.PublishBundle$BundleUploader.upload(PublishBundle.kt:103) ... 30 more Caused by: java.lang.IllegalStateException: You are currently running with version 2.1.1 of google-api-client. You need at least version 1.31.1 of google-api-client to run version 1.32.1 of the Google Play Android Developer API library. at com.google.common.base.Preconditions.checkState(Preconditions.java:534) at com.google.api.client.util.Preconditions.checkState(Preconditions.java:113) at com.google.api.services.androidpublisher.AndroidPublisher.<clinit>(AndroidPublisher.java:44)