Closed underwindfall closed 3 years ago
I'm confused, do you want a task that prints out all the channel names? Or do you mean a programmatic API you'd use in the build script?
I want to have a that prints out all the channel names. Thx for the repsonse BTW.
Gotya, thanks for clarifying. I'll have to think about it, but I'm not sure that makes sense for this project. The goal is to enable automation, not provide a CLI for the play console.
For now, I've decided to forgo an official implementation. That said, if more people want one, I might reconsider.
In the meantime, with GPP v3.1.0 you can use this hack (as a KTS script):
tasks.register("printPlayTracks") {
val apiService = gradle.sharedServices.registrations
.named("playApi-com.supercilex.test")
.get().service.get()
doLast {
val publisher = apiService.withGroovyBuilder { "getPublisher"() }!!
val editId = publisher.withGroovyBuilder { "insertEdit"() }!!
.withGroovyBuilder { "getId"() }
val tracks = publisher.withGroovyBuilder { "listTracks"(editId) } as List<Any>
println(tracks.joinToString(",\n") {
it.withGroovyBuilder { "toPrettyString"() } as String
})
}
}
thx agagin, very greatful you deal with it.
Problem description
Here it the context , when I try to publish a
apk
from plugin I want to input an existedchannel name
from my current playstore. However I don't know what list ofchannel names
already existed in my project. I think it would be better to expose a new task to display all releases channel name for this feature.Potential solutions/workarounds
DefaultPlayPublisher
to get list of tracks and expose it thegradle plugin
taskAdditional context