Roger Kreienbühl
08/30/2025, 7:22 AMMarkRS
08/30/2025, 9:21 AMbuildFlavour=<whatever>
and then in the build,gradle.kts of my common module I can access it with
val buildFlavour: String by project
Roger Kreienbühl
08/30/2025, 5:17 PMproductFlavors {}
. With a small script on build time I read the flavor. This works also just fine.
On the iOS side I added additional targets in xcode and changed the script for the Compile Kotlin Framework. For each Target there is a run configuration, that is present in Xcode and in Android Studio.
When running one of these configurations from Xcode, gradle gets all the infos it needs to build the right flavor. But if I run one of these configs from Android Studio, it builds the default configuration and doesn’t gets the right flavor, but the iOS App itself gets built with the right flavor.
Somehow the additional Info doesn’t get set for the gradle build.
I also tried to add an ENV variable in the task directly and read this, but also ENV variables from the task aren’t passed to gradle build.