https://kotlinlang.org logo
Title
p

PHondogo

12/10/2019, 6:22 PM
Hello! I have gradle multimodule project. Each module is a kotlin multiplaform
plugins {
    kotlin("multiplatform")
}
how can i set properties like jvmTarget to all submodules?
m

mbonnin

12/10/2019, 7:29 PM
You can do some common handling in your root
build.gradle
:
subprojects {
   // do things here
}
p

PHondogo

12/10/2019, 10:11 PM
Unfortunately i cant make it work for multiplatform using subprojects where i apply jvmTarget.
m

mbonnin

12/10/2019, 10:25 PM
Maybe try
afterEvaluate {}
?
j

Joffrey

12/11/2019, 11:05 AM
I believe you should also apply the multiplatform plugin from the
subprojects
block in the root
build.gradle
(use the plugins block with
apply false
, and then apply the plugin in the
subprojects
block)
g

gildor

12/11/2019, 12:21 PM
Why you cannot make it work using subprojects? You should use subprojects + plugins.withType
It's the same as in previous message in this channel, check discussion there