Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use default hierarchy template #599

Merged
merged 2 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 20 additions & 92 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
86 changes: 6 additions & 80 deletions exceptions/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
}
}
}
15 changes: 6 additions & 9 deletions log-engine-tuulbox/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}
Expand Down