Skip to content

Commit

Permalink
Configure shared java source set in applyDefaultHierarchyTemplate
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergej Shafarenka committed Jul 29, 2024
1 parent 89b79bb commit cf4cfa2
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions logger/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,15 @@ kotlin {
iosArm64()
iosSimulatorArm64()

applyDefaultHierarchyTemplate()
@OptIn(ExperimentalKotlinGradlePluginApi::class)
applyDefaultHierarchyTemplate {
common {
group("java") {
withJvm()
withAndroidNative()
}
}
}

sourceSets {
commonMain.dependencies {
Expand All @@ -71,21 +79,6 @@ kotlin {
commonTest.dependencies {
implementation(libs.kotlin.test)
}

val androidUnitTest by getting

val javaMain by creating {
dependsOn(commonMain.get())
androidMain.get().dependsOn(this)
jvmMain.get().dependsOn(this)
}
val javaTest by creating {
androidUnitTest.dependsOn(this)
jvmTest.get().dependsOn(this)
dependencies {
implementation(libs.kotlin.test.junit)
}
}
}
}

Expand Down

0 comments on commit cf4cfa2

Please sign in to comment.