Joey Heck
10/12/2018, 4:30 PMappToken { ApplicationVariant variant ->
switch (variant.buildType.name) {
case 'develop': 'XXXX'
break
case 'release': 'YYYY'
break
}
}
How can I access the same specific ApplicationVariant? The only thing I could think of was to use android.applicationVariants.first()
, but I get Build Failure error: Collection is empty.eskatos
10/12/2018, 5:11 PMappToken
in the snippet above?
Searching a bit on the interwebs I guess https://docs.bugsee.com/sdk/android/crashes/, correct?Joey Heck
10/15/2018, 4:18 AMeskatos
10/15/2018, 11:44 AMappToken
is a function from the bugsee plugin that takes a Groovy Closure expecting one parameter (the variant) and returning a string.appToken(Transformer<String, BaseVariant>)
would do.bugsee {
appToken(KotlinClosure1<BaseVariant, String>({
when(buildType.name) {
"develop" -> "XXXX"
"release" -> "YYYY"
else -> "ZZZZ"
}
}))
}