https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
s

spierce7

05/19/2019, 4:31 AM
If I have a source-set that other source-sets depend on, it seems that source-set is assumed to be common. Is there a way to specify that a source set is a specific platform? If I don't specify the platform, then I lose the ability to import platform specific libs. To work around this currently I'm specifying an unused target.
Copy code
apply plugin: 'org.jetbrains.kotlin.multiplatform'

kotlin {
    jvm() // Have to have this so that jvmMain source set has jvm target
    jvm('dev')
    jvm('appengine')
    
    sourceSets {
        jvmMain {
        }
        
        devMain {
            dependsOn jvmMain
        }
        
        appengineMain {
            dependsOn jvmMain
        }
    }
}
y

yshrsmz

05/19/2019, 9:35 AM
s

spierce7

05/19/2019, 5:14 PM
thanks
g

Gunslingor

07/09/2020, 4:28 AM
So sorry for posting on old thread but I search and it looks so relevant... any idea how to make appengine gradle plugin work with multiplatform project in a kts?
2 Views