diff --git a/core/build.gradle.kts b/core/build.gradle.kts index a819c55ab..977c06c8b 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -8,115 +8,43 @@ plugins { id("com.vanniktech.maven.publish") } -/* ``` - * common - * |-- js - * |-- android - * '-- apple - * |-- ios - * '-- macos - * ``` - */ kotlin { explicitApi() jvmToolchain(libs.versions.jvm.toolchain.get().toInt()) androidTarget().publishAllLibraryVariants() - js().browser() - iosX64() - macosArm64() iosArm64() iosSimulatorArm64() + iosX64() + js().browser() + macosArm64() macosX64() sourceSets { - val commonMain by getting { - dependencies { - api(project(":exceptions")) - api(libs.kotlinx.coroutines.core) - api(libs.uuid) - implementation(libs.tuulbox.collections) - } - } - - val commonTest by getting { - dependencies { - implementation(kotlin("test-common")) - implementation(kotlin("test-annotations-common")) - implementation(libs.tuulbox.logging) - implementation(libs.kotlinx.coroutines.test) - } - } - - val jsTest by getting { - dependencies { - implementation(kotlin("test-js")) - } - } - - val androidMain by getting { - dependencies { - api(libs.kotlinx.coroutines.android) - implementation(libs.androidx.core) - implementation(libs.androidx.startup) + commonMain.dependencies { + api(project(":exceptions")) + api(libs.kotlinx.coroutines.core) + api(libs.uuid) + implementation(libs.tuulbox.collections) - // Workaround for AtomicFU plugin not automatically adding JVM dependency for Android. - // https://github.com/Kotlin/kotlinx-atomicfu/issues/145 - implementation(libs.atomicfu) - - implementation(libs.tuulbox.coroutines) - } - } - - val androidUnitTest by getting { - dependencies { - implementation(kotlin("test-junit")) - } } - val appleMain by creating { - dependsOn(commonMain) + commonTest.dependencies { + implementation(kotlin("test")) + implementation(libs.tuulbox.logging) + implementation(libs.kotlinx.coroutines.test) } - val appleTest by creating + androidMain.dependencies { + api(libs.kotlinx.coroutines.android) + implementation(libs.androidx.core) + implementation(libs.androidx.startup) - val macosX64Main by getting { - dependsOn(appleMain) - } + // Workaround for AtomicFU plugin not automatically adding JVM dependency for Android. + // https://github.com/Kotlin/kotlinx-atomicfu/issues/145 + implementation(libs.atomicfu) - val macosX64Test by getting { - dependsOn(appleTest) - } - - val macosArm64Main by getting { - dependsOn(appleMain) - } - - val macosArm64Test by getting { - dependsOn(appleTest) - } - - val iosX64Main by getting { - dependsOn(appleMain) - } - - val iosX64Test by getting { - dependsOn(appleTest) - } - - val iosArm64Main by getting { - dependsOn(appleMain) - } - - val iosArm64Test by getting { - dependsOn(appleTest) - } - - val iosSimulatorArm64Main by getting { - dependsOn(appleMain) - } - val iosSimulatorArm64Test by getting { - dependsOn(appleTest) + implementation(libs.tuulbox.coroutines) } all { diff --git a/exceptions/build.gradle.kts b/exceptions/build.gradle.kts index c7bf8d965..8531a6ccf 100644 --- a/exceptions/build.gradle.kts +++ b/exceptions/build.gradle.kts @@ -5,95 +5,21 @@ plugins { id("com.vanniktech.maven.publish") } -/* ``` - * common - * |-- js - * |-- jvm - * '-- apple - * |-- ios - * '-- macos - * ``` - */ kotlin { explicitApi() jvmToolchain(libs.versions.jvm.toolchain.get().toInt()) - jvm() - js().browser() - iosX64() - macosArm64() iosArm64() iosSimulatorArm64() + iosX64() + js().browser() + jvm() + macosArm64() macosX64() sourceSets { - val commonMain by getting { - dependencies { - } - } - - val commonTest by getting { - dependencies { - implementation(kotlin("test-common")) - implementation(kotlin("test-annotations-common")) - } - } - - val jsTest by getting { - dependencies { - implementation(kotlin("test-js")) - } - } - - val jvmTest by getting { - dependencies { - implementation(kotlin("test-junit")) - } - } - - val appleMain by creating { - dependsOn(commonMain) - } - - val appleTest by creating - - val macosX64Main by getting { - dependsOn(appleMain) - } - - val macosX64Test by getting { - dependsOn(appleTest) - } - - val macosArm64Main by getting { - dependsOn(appleMain) - } - - val macosArm64Test by getting { - dependsOn(appleTest) - } - - val iosX64Main by getting { - dependsOn(appleMain) - } - - val iosX64Test by getting { - dependsOn(appleTest) - } - - val iosArm64Main by getting { - dependsOn(appleMain) - } - - val iosArm64Test by getting { - dependsOn(appleTest) - } - - val iosSimulatorArm64Main by getting { - dependsOn(appleMain) - } - val iosSimulatorArm64Test by getting { - dependsOn(appleTest) + commonTest.dependencies { + implementation(kotlin("test")) } } } diff --git a/log-engine-tuulbox/build.gradle.kts b/log-engine-tuulbox/build.gradle.kts index 00d8ff48e..3a2902852 100644 --- a/log-engine-tuulbox/build.gradle.kts +++ b/log-engine-tuulbox/build.gradle.kts @@ -12,19 +12,16 @@ kotlin { jvmToolchain(libs.versions.jvm.toolchain.get().toInt()) androidTarget().publishAllLibraryVariants() - js().browser() - - iosX64() iosArm64() - macosX64() + iosX64() + js().browser() macosArm64() + macosX64() sourceSets { - val commonMain by getting { - dependencies { - api(project(":core")) - api(libs.tuulbox.logging) - } + commonMain.dependencies { + api(project(":core")) + api(libs.tuulbox.logging) } } }