From 878c2ae720ab616ba48c6fc62f2a4b99a4c802a5 Mon Sep 17 00:00:00 2001 From: GerardPaligot Date: Fri, 18 Oct 2024 21:14:00 +0200 Subject: [PATCH] chore: remove os check to add ios targets. --- shared/core-api/build.gradle.kts | 19 +++++++-------- shared/core-db/build.gradle.kts | 22 +++++++---------- shared/core-di/build.gradle.kts | 37 +++++++++++++---------------- shared/core-fs/build.gradle.kts | 17 ++++++------- shared/core-kvalue/build.gradle.kts | 19 +++++++-------- shared/core/build.gradle.kts | 37 +++++++++++++---------------- shared/models/build.gradle.kts | 17 ++++++------- shared/resources/build.gradle.kts | 17 ++++++------- shared/ui-models/build.gradle.kts | 17 ++++++------- 9 files changed, 87 insertions(+), 115 deletions(-) diff --git a/shared/core-api/build.gradle.kts b/shared/core-api/build.gradle.kts index 1336a482d..669e97cd7 100644 --- a/shared/core-api/build.gradle.kts +++ b/shared/core-api/build.gradle.kts @@ -1,4 +1,3 @@ -import org.gradle.internal.os.OperatingSystem import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl plugins { @@ -20,16 +19,14 @@ kotlin { browser() } - if (OperatingSystem.current().isMacOsX) { - listOf( - iosArm64(), - iosSimulatorArm64() - ).forEach { - it.binaries.framework { - baseName = "SharedApi" - isStatic = false - export(projects.shared.models) - } + listOf( + iosArm64(), + iosSimulatorArm64() + ).forEach { + it.binaries.framework { + baseName = "SharedApi" + isStatic = false + export(projects.shared.models) } } diff --git a/shared/core-db/build.gradle.kts b/shared/core-db/build.gradle.kts index 195225e01..25a46166f 100644 --- a/shared/core-db/build.gradle.kts +++ b/shared/core-db/build.gradle.kts @@ -1,5 +1,3 @@ -import org.gradle.internal.os.OperatingSystem - plugins { id("confily.multiplatform.library") id("confily.quality") @@ -19,17 +17,15 @@ kotlin { browser() } - if (OperatingSystem.current().isMacOsX) { - listOf( - iosArm64(), - iosSimulatorArm64() - ).forEach { - it.binaries.framework { - baseName = "SharedDb" - isStatic = false - // Required https://github.com/cashapp/sqldelight/issues/1442 - linkerOpts.add("-lsqlite3") - } + listOf( + iosArm64(), + iosSimulatorArm64() + ).forEach { + it.binaries.framework { + baseName = "SharedDb" + isStatic = false + // Required https://github.com/cashapp/sqldelight/issues/1442 + linkerOpts.add("-lsqlite3") } } diff --git a/shared/core-di/build.gradle.kts b/shared/core-di/build.gradle.kts index 3ab0083ec..0ce2d13b9 100644 --- a/shared/core-di/build.gradle.kts +++ b/shared/core-di/build.gradle.kts @@ -1,4 +1,3 @@ -import org.gradle.internal.os.OperatingSystem import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl plugins { @@ -22,25 +21,23 @@ kotlin { browser() } - if (OperatingSystem.current().isMacOsX) { - listOf( - iosArm64(), - iosSimulatorArm64() - ).forEach { - it.binaries.framework { - baseName = "SharedDi" - isStatic = false - export(libs.settings) - export(projects.shared.coreApi) - export(projects.shared.coreDb) - export(projects.shared.core) - export(projects.shared.coreKvalue) - export(projects.shared.models) - export(projects.shared.uiModels) - export(projects.shared.resources) - // Required https://github.com/cashapp/sqldelight/issues/1442 - linkerOpts.add("-lsqlite3") - } + listOf( + iosArm64(), + iosSimulatorArm64() + ).forEach { + it.binaries.framework { + baseName = "SharedDi" + isStatic = false + export(libs.settings) + export(projects.shared.coreApi) + export(projects.shared.coreDb) + export(projects.shared.core) + export(projects.shared.coreKvalue) + export(projects.shared.models) + export(projects.shared.uiModels) + export(projects.shared.resources) + // Required https://github.com/cashapp/sqldelight/issues/1442 + linkerOpts.add("-lsqlite3") } } diff --git a/shared/core-fs/build.gradle.kts b/shared/core-fs/build.gradle.kts index 9c1753d61..776ca84f2 100644 --- a/shared/core-fs/build.gradle.kts +++ b/shared/core-fs/build.gradle.kts @@ -1,4 +1,3 @@ -import org.gradle.internal.os.OperatingSystem import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl plugins { @@ -20,15 +19,13 @@ kotlin { browser() } - if (OperatingSystem.current().isMacOsX) { - listOf( - iosArm64(), - iosSimulatorArm64() - ).forEach { - it.binaries.framework { - baseName = "SharedFs" - isStatic = false - } + listOf( + iosArm64(), + iosSimulatorArm64() + ).forEach { + it.binaries.framework { + baseName = "SharedFs" + isStatic = false } } diff --git a/shared/core-kvalue/build.gradle.kts b/shared/core-kvalue/build.gradle.kts index 6ec0e5c4d..12d8f36c2 100644 --- a/shared/core-kvalue/build.gradle.kts +++ b/shared/core-kvalue/build.gradle.kts @@ -1,4 +1,3 @@ -import org.gradle.internal.os.OperatingSystem import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl plugins { @@ -19,16 +18,14 @@ kotlin { browser() } - if (OperatingSystem.current().isMacOsX) { - listOf( - iosArm64(), - iosSimulatorArm64() - ).forEach { - it.binaries.framework { - baseName = "SharedKValue" - isStatic = false - export(libs.settings) - } + listOf( + iosArm64(), + iosSimulatorArm64() + ).forEach { + it.binaries.framework { + baseName = "SharedKValue" + isStatic = false + export(libs.settings) } } diff --git a/shared/core/build.gradle.kts b/shared/core/build.gradle.kts index 03da60f34..8aa4c709a 100644 --- a/shared/core/build.gradle.kts +++ b/shared/core/build.gradle.kts @@ -1,4 +1,3 @@ -import org.gradle.internal.os.OperatingSystem import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl plugins { @@ -23,25 +22,23 @@ kotlin { browser() } - if (OperatingSystem.current().isMacOsX) { - listOf( - iosArm64(), - iosSimulatorArm64() - ).forEach { - it.binaries.framework { - baseName = "Shared" - isStatic = false - export(libs.settings) - export(projects.shared.coreApi) - export(projects.shared.coreDb) - export(projects.shared.coreFs) - export(projects.shared.coreKvalue) - export(projects.shared.models) - export(projects.shared.uiModels) - export(projects.shared.resources) - // Required https://github.com/cashapp/sqldelight/issues/1442 - linkerOpts.add("-lsqlite3") - } + listOf( + iosArm64(), + iosSimulatorArm64() + ).forEach { + it.binaries.framework { + baseName = "Shared" + isStatic = false + export(libs.settings) + export(projects.shared.coreApi) + export(projects.shared.coreDb) + export(projects.shared.coreFs) + export(projects.shared.coreKvalue) + export(projects.shared.models) + export(projects.shared.uiModels) + export(projects.shared.resources) + // Required https://github.com/cashapp/sqldelight/issues/1442 + linkerOpts.add("-lsqlite3") } } diff --git a/shared/models/build.gradle.kts b/shared/models/build.gradle.kts index 587aecce8..f3aa55a50 100644 --- a/shared/models/build.gradle.kts +++ b/shared/models/build.gradle.kts @@ -1,4 +1,3 @@ -import org.gradle.internal.os.OperatingSystem import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl plugins { @@ -21,15 +20,13 @@ kotlin { browser() } - if (OperatingSystem.current().isMacOsX) { - listOf( - iosArm64(), - iosSimulatorArm64() - ).forEach { - it.binaries.framework { - baseName = "Models" - isStatic = false - } + listOf( + iosArm64(), + iosSimulatorArm64() + ).forEach { + it.binaries.framework { + baseName = "Models" + isStatic = false } } diff --git a/shared/resources/build.gradle.kts b/shared/resources/build.gradle.kts index fae4fac90..7303f5661 100644 --- a/shared/resources/build.gradle.kts +++ b/shared/resources/build.gradle.kts @@ -1,4 +1,3 @@ -import org.gradle.internal.os.OperatingSystem import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl plugins { @@ -14,15 +13,13 @@ android { kotlin { androidTarget() - if (OperatingSystem.current().isMacOsX) { - listOf( - iosArm64(), - iosSimulatorArm64() - ).forEach { - it.binaries.framework { - baseName = "Resources" - isStatic = false - } + listOf( + iosArm64(), + iosSimulatorArm64() + ).forEach { + it.binaries.framework { + baseName = "Resources" + isStatic = false } } diff --git a/shared/ui-models/build.gradle.kts b/shared/ui-models/build.gradle.kts index 381d53e15..8589e6952 100644 --- a/shared/ui-models/build.gradle.kts +++ b/shared/ui-models/build.gradle.kts @@ -1,4 +1,3 @@ -import org.gradle.internal.os.OperatingSystem import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl plugins { @@ -21,15 +20,13 @@ kotlin { browser() } - if (OperatingSystem.current().isMacOsX) { - listOf( - iosArm64(), - iosSimulatorArm64() - ).forEach { - it.binaries.framework { - baseName = "UiModels" - isStatic = false - } + listOf( + iosArm64(), + iosSimulatorArm64() + ).forEach { + it.binaries.framework { + baseName = "UiModels" + isStatic = false } }