mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 22:17:03 +05:30
build: cleanup sourceSet handling to drop unused vals
This commit is contained in:
parent
fde4e01697
commit
76c46b4229
3 changed files with 27 additions and 61 deletions
|
@ -8,21 +8,9 @@ plugins {
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
android() { compilations.all { kotlinOptions.jvmTarget = "11" } }
|
android { compilations.all { kotlinOptions.jvmTarget = "11" } }
|
||||||
jvm("desktop") { compilations.all { kotlinOptions.jvmTarget = "11" } }
|
jvm("desktop") { compilations.all { kotlinOptions.jvmTarget = "11" } }
|
||||||
sourceSets {
|
sourceSets["commonMain"].apply {
|
||||||
// Workaround for:
|
|
||||||
//
|
|
||||||
// The Kotlin source set androidAndroidTestRelease was configured but not added to any
|
|
||||||
// Kotlin compilation. You can add a source set to a target's compilation by connecting it
|
|
||||||
// with the compilation's default source set using 'dependsOn'.
|
|
||||||
// See
|
|
||||||
// https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#connecting-source-sets
|
|
||||||
//
|
|
||||||
// This workaround includes `dependsOn(androidAndroidTestRelease)` in the `androidTest`
|
|
||||||
// sourceSet.
|
|
||||||
val androidAndroidTestRelease by getting
|
|
||||||
val commonMain by getting {
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api(compose.runtime)
|
api(compose.runtime)
|
||||||
api(compose.foundation)
|
api(compose.foundation)
|
||||||
|
@ -30,17 +18,13 @@ kotlin {
|
||||||
api(projects.database)
|
api(projects.database)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
val commonTest by getting
|
sourceSets["androidMain"].apply {
|
||||||
val androidMain by getting {
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(libs.androidx.browser)
|
implementation(libs.androidx.browser)
|
||||||
implementation(libs.coil.compose)
|
implementation(libs.coil.compose)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
val androidTest by getting { dependsOn(androidAndroidTestRelease) }
|
sourceSets["desktopMain"].apply { dependencies { implementation(libs.kamel.image) } }
|
||||||
val desktopMain by getting { dependencies { implementation(libs.kamel.image) } }
|
|
||||||
val desktopTest by getting
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType<KotlinCompile> {
|
tasks.withType<KotlinCompile> {
|
||||||
|
|
|
@ -13,31 +13,15 @@ kotlin {
|
||||||
kotlinOptions.freeCompilerArgs + listOf("-Xopt-in=kotlin.RequiresOptIn")
|
kotlinOptions.freeCompilerArgs + listOf("-Xopt-in=kotlin.RequiresOptIn")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sourceSets {
|
sourceSets["androidMain"].apply { dependencies { implementation(libs.sqldelight.androidDriver) } }
|
||||||
// Workaround for:
|
sourceSets["desktopMain"].apply { dependencies { implementation(libs.sqldelight.jvmDriver) } }
|
||||||
//
|
sourceSets["desktopTest"].apply {
|
||||||
// The Kotlin source set androidAndroidTestRelease was configured but not added to any
|
|
||||||
// Kotlin compilation. You can add a source set to a target's compilation by connecting it
|
|
||||||
// with the compilation's default source set using 'dependsOn'.
|
|
||||||
// See
|
|
||||||
// https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#connecting-source-sets
|
|
||||||
//
|
|
||||||
// This workaround includes `dependsOn(androidAndroidTestRelease)` in the `androidTest`
|
|
||||||
// sourceSet.
|
|
||||||
val androidAndroidTestRelease by getting
|
|
||||||
val commonMain by getting
|
|
||||||
val commonTest by getting
|
|
||||||
val androidMain by getting { dependencies { implementation(libs.sqldelight.androidDriver) } }
|
|
||||||
val androidTest by getting { dependsOn(androidAndroidTestRelease) }
|
|
||||||
val desktopMain by getting { dependencies { implementation(libs.sqldelight.jvmDriver) } }
|
|
||||||
val desktopTest by getting {
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(libs.kotlin.coroutines.core)
|
implementation(libs.kotlin.coroutines.core)
|
||||||
implementation(kotlin("test-junit"))
|
implementation(kotlin("test-junit"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdk = 31
|
compileSdk = 31
|
||||||
|
|
|
@ -12,9 +12,9 @@ version = "1.0"
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
jvm { compilations.all { kotlinOptions.jvmTarget = "11" } }
|
jvm { compilations.all { kotlinOptions.jvmTarget = "11" } }
|
||||||
sourceSets {
|
sourceSets["jvmMain"].apply {
|
||||||
val jvmMain by getting {
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
implementation(projects.api)
|
||||||
implementation(projects.common)
|
implementation(projects.common)
|
||||||
implementation(libs.aurora.component)
|
implementation(libs.aurora.component)
|
||||||
implementation(libs.aurora.skin)
|
implementation(libs.aurora.skin)
|
||||||
|
@ -22,8 +22,6 @@ kotlin {
|
||||||
implementation(compose.desktop.currentOs)
|
implementation(compose.desktop.currentOs)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
val jvmTest by getting
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
compose.desktop {
|
compose.desktop {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue