spierce7
04/24/2023, 3:11 PM./gradlew :app:run
compose seems to be targeting the internal variant. I've changed the order, and no matter what it seems to choose the internal variant.
Is there a way to choose what variant is run?val flavorAttribute = Attribute.of("com.example.flavor", String::class.java)
kotlin {
jvm("jvmInternal") {
attributes.attribute(flavorAttribute, "internal")
compilations.all {
kotlinOptions.jvmTarget = "17"
}
}
jvm("jvmProduction") {
attributes.attribute(flavorAttribute, "production")
compilations.all {
kotlinOptions.jvmTarget = "17"
}
}
Oleksandr Karpovich [JB]
04/24/2023, 3:37 PMcompose.desktop {
application {
....
from(kotlin.targets.getByName("jvmProduction"))
}
}
To avoid the hardcoding, you’ll need to add some gradle property and if..else.spierce7
04/24/2023, 4:06 PM