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.12k stars 340 forks source link

Compile Options Failed when run gradlew publish #881

Closed romankulykov closed 4 years ago

romankulykov commented 4 years ago

Problem description

I use classpath 'com.github.triplet.gradle:play-publisher:3.1.0-SNAPSHOT' when try to run task 'gradlew publish' this command become failed with an exception: e: D:*\ApiClientProvider.kt: (3, 46): Unresolved reference: API_BASE_URL e: D:*\ApiClientProvider.kt: (24, 18): Unresolved reference: API_BASE_URL e: D:*\ApiClientProvider.kt: (30, 26): Type mismatch: inferred type is ApiClientProvider but ApiEndpoint was expected e: D:*\apiclient\HttpClientProvider.kt: (100, 34): Unresolved reference: API_BASE_URL image

But when i try to generate my apk file with command 'gradlew assembleRelease' everything works fine.

Additional context

A bit earlier when I used to use play-publisher:2.7.0-SNAPSHOT, everything worked with command gradlew publishApkRelease.

SUPERCILEX commented 4 years ago

You probably aren't passing those buildConfig fields in all your variants. I'm assuming compilation also fails with ./gradlew assemble.

romankulykov commented 4 years ago

You probably aren't passing those buildConfig fields in all your variants. I'm assuming compilation also fails with ./gradlew assemble.

Yes 'gradlew asseble' doesn't work. But i passed buildConfigField in two build types. image

SUPERCILEX commented 4 years ago

Since this isn't related to the plugin, this question would be better served on stack overflow or some other forum.