Hello! I have gradle multimodule project. Each mod...
# gradle
p
Hello! I have gradle multimodule project. Each module is a kotlin multiplaform
Copy code
plugins {
    kotlin("multiplatform")
}
how can i set properties like jvmTarget to all submodules?
m
You can do some common handling in your root
build.gradle
:
Copy code
subprojects {
   // do things here
}
p
Unfortunately i cant make it work for multiplatform using subprojects where i apply jvmTarget.
m
Maybe try
afterEvaluate {}
?
j
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
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