Skip to content

Commit

Permalink
Fix android lib publishing with Kotlin multiplatform to prevent overr…
Browse files Browse the repository at this point in the history
…iding each other
  • Loading branch information
hfhbd committed Mar 20, 2024
1 parent 48e6cca commit 05fc698
Showing 1 changed file with 10 additions and 18 deletions.
28 changes: 10 additions & 18 deletions kotlinx-uuid-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,6 @@ android {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

publishing {
multipleVariants {
allVariants()
withJavadocJar()
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
Expand All @@ -81,17 +74,16 @@ android {
}
}

kotlin.sourceSets {
named("androidInstrumentedTest") {
dependencies {
implementation("androidx.test:runner:1.5.2")
implementation("androidx.test.ext:junit-ktx:1.1.4")
}
kotlin {
androidTarget {
publishAllLibraryVariants()
}
}

publishing.publications.register("androidLib", MavenPublication::class) {
afterEvaluate {
from(components["default"])
sourceSets {
named("androidInstrumentedTest") {
dependencies {
implementation("androidx.test:runner:1.5.2")
implementation("androidx.test.ext:junit-ktx:1.1.4")
}
}
}
}

0 comments on commit 05fc698

Please sign in to comment.