Skip to content

Instantly share code, notes, and snippets.

@manijshrestha
Created October 14, 2018 19:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manijshrestha/859afac6c1407155aec86d53d916f2e6 to your computer and use it in GitHub Desktop.
Save manijshrestha/859afac6c1407155aec86d53d916f2e6 to your computer and use it in GitHub Desktop.
kotlin multiplatform build.gradle
apply plugin: 'kotlin-multiplatform'
kotlin {
targets {
final def iOSTarget = System.getenv('SDK_NAME')?.startsWith("iphoneos") \
? presets.iosArm64 : presets.iosX64
fromPreset(iOSTarget, 'iOS') {
compilations.main.outputKinds('FRAMEWORK')
}
fromPreset(presets.jvm, 'android')
}
sourceSets {
commonMain.dependencies {
api 'org.jetbrains.kotlin:kotlin-stdlib-common'
}
androidMain.dependencies {
api 'org.jetbrains.kotlin:kotlin-stdlib'
}
}
}
// workaround for https://youtrack.jetbrains.com/issue/KT-27170
configurations {
compileClasspath
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment