Closed neoxcorp closed 4 years ago
You'll need to use ReleaseStatus.DRAFT
:
https://github.com/Triple-T/gradle-play-publisher/blob/304b0fecba33e4457ad17e0703c4d9d638203793/play/plugin/src/test/kotlin/com/github/triplet/gradle/play/PlayPublisherPluginIntegrationTest.kt#L80-L100
Does that work without imports? Otherwise, you'll need to import com.github.triplet.gradle.androidpublisher.ReleaseStatus
.
It works. Thanks.
@SUPERCILEX Hi! After upgrade on com.github.triplet.gradle:play-publisher:3.0.0
and AGP v4.1.0 I got the error:
FAILURE: Build failed with an exception.
Where: Script '/home/.../app.gradle' line: 57
What went wrong: A problem occurred evaluating script. Could not get unknown property 'ReleaseStatus' for extension 'play' of type >com.github.triplet.gradle.play.PlayPublisherExtension.
Gradle build script:
apply plugin: 'com.github.triplet.play'
play {
serviceAccountCredentials.set(file("$rootDir/credentials/google-play-service-account-key.json"))
defaultToAppBundles.set(true)
track.set("production")
userFraction.set(0.01d)
releaseStatus.set(ReleaseStatus.IN_PROGRESS) // <-- line 57 here
}
If you don't use the plugins block, I think you have to import that class:
import com.github.triplet.gradle.androidpublisher.ReleaseStatus
apply plugin: 'com.github.triplet.play'
...
@SUPERCILEX Thx for yout so quickly reply. Yeah, I've already tried to do that but got the error
Where: Script '/home/.../app.gradle' line: 5
What went wrong: Could not compile script '/home/.../app.gradle'. startup failed: script '/home/.../app.gradle': 5: unable to resolve class com.github.triplet.gradle.androidpublisher.ReleaseStatus @ line 5, column 1. import com.github.triplet.gradle.androidpublisher.ReleaseStatus ^
1 error
Oh, I guess you have to put it below the apply plugin
?
It's strange but seems build with --no-build-cache
helped for me. It works with both import ...
positions. Thank you for your help!
build.gradle - project
build.gradle - app
When I try to build: `A problem occurred evaluating project ':app'.
How to set 'releaseStatus' ?