Skip to content

Instantly share code, notes, and snippets.

@wongk
Last active February 18, 2020 20:58
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 wongk/b53b7346df5fc9b5fe894ea88b4c4918 to your computer and use it in GitHub Desktop.
Save wongk/b53b7346df5fc9b5fe894ea88b4c4918 to your computer and use it in GitHub Desktop.
Blog - KMP publishing - target configuration
kotlin {
android {
publishAllLibraryVariants()
}
iosX64("ios") {
mavenPublication {
artifactId = "${project.name}-iosx64"
}
}
iosArm64 {
compilations["main"].defaultSourceSet {
dependsOn(sourceSets["iosMain"])
}
// Remove the test compilation for Arm64, because it is not needed.
compilations.remove(compilations["test"])
}
targets.withType<KotlinNativeTarget> {
binaries.framework(listOf(RELEASE))
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment