gradle-play-publisher: Could not get unknown property 'ReleaseStatus' for extension 'play'
Describe the bug
I’ve recently migrated from 2.3.0 to 3.0.0 and I changed my build.gradle file accordingly going from this
play {
track = "beta"
releaseStatus = "inProgress"
userFraction = 1
serviceAccountCredentials = file("credentials.json")
}
to this
play {
track.set("beta")
userFraction.set(new Double(1))
releaseStatus.set(ReleaseStatus.IN_PROGRESS)
serviceAccountCredentials.set(file("credentials.json"))
}
But when I try to build my app I am presented with the following error
Could not get unknown property 'ReleaseStatus' for extension 'play' of type com.github.triplet.gradle.play.PlayPublisherExtension.
How To Reproduce
Include the play closure to the build.gradle file and sync
Versions
- Gradle Play Publisher: 3.0.0
- Gradle Wrapper: 6.5-all
- Android Gradle Plugin: 4.1.1
Tasks executed
It fails when syncing after modifying the play closure
Expected behavior
I would expect the sync to be successful
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 4
- Comments: 16
Commits related to this issue
- Add imports for enums in docs (fixes #885) Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com> — committed to sebokopter/gradle-play-publisher by SUPERCILEX 4 years ago
I know this issue has been closed. But about the
red lintwas raised here , properly could be resovled by something like thisRight I forgot, I also use the plugin block
If I simply add the line
import com.github.triplet.gradle.androidpublisher.ReleaseStatusin the file it does sync and build, though the line has theReleaseStatuscoloured in red and, despite the file syncing and allowing me to perform./gradlewcommands, it still shows as faulty with a wiggly red line under its filenameFor anyone having the same issue and using Triple-T plugin in
buildSrc, this might help you.We put the plugin on classpath in
buildSrc/build.gradle.ktslike this:To have
ReleaseStatusconstants available you need to add aditionalandroid-publishermodule on classpath inbuildSrc/build.gradle.kts:Note to self: also add comment about user fraction needing a d in groovy.