-
-
Save manijshrestha/859afac6c1407155aec86d53d916f2e6 to your computer and use it in GitHub Desktop.
kotlin multiplatform build.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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