Any way to get Gradle to temporarily ignore one of...
# multiplatform
d
Any way to get Gradle to temporarily ignore one of the targeted platforms in Kotlin / MP ?
g
Wrap initialization of those platforms to
if(someGradleProperty)
condition and than pass this property true/false value as command line key -PsomeGradleProperty or to gradle.properties file (local for your project or in ~/.gradle/gradle.propertties)
m
Would that make InteliJ ignore iOS kotlin code? I guess refactoring common code wouldn't affect iOS code then
k
define a local '.properties' file and read it from settings.gradle
then you can put all your iOS target blocks in a conditional
k
May be able to try this as well, although I’m not sure when these are evaluated: https://github.com/Autodesk/coroutineworker/blob/master/build.gradle.kts#L115
Copy code
targets {
        jvm()
if (HostManager.hostIsMac) {
        iosX64()
        iosArm64()
        iosArm32()
}
if (HostManager.hostIsMingw) {
        mingwX64()
}
    }
Something like that?
c