Skip to content

Commit

Permalink
chore: remove os check to add ios targets.
Browse files Browse the repository at this point in the history
  • Loading branch information
GerardPaligot committed Oct 18, 2024
1 parent 5d44859 commit 7694571
Show file tree
Hide file tree
Showing 9 changed files with 87 additions and 115 deletions.
19 changes: 8 additions & 11 deletions shared/core-api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import org.gradle.internal.os.OperatingSystem
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl

plugins {
Expand All @@ -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)
}
}

Expand Down
22 changes: 9 additions & 13 deletions shared/core-db/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import org.gradle.internal.os.OperatingSystem

plugins {
id("confily.multiplatform.library")
id("confily.quality")
Expand All @@ -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")
}
}

Expand Down
37 changes: 17 additions & 20 deletions shared/core-di/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import org.gradle.internal.os.OperatingSystem
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl

plugins {
Expand All @@ -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")
}
}

Expand Down
17 changes: 7 additions & 10 deletions shared/core-fs/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import org.gradle.internal.os.OperatingSystem
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl

plugins {
Expand All @@ -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
}
}

Expand Down
19 changes: 8 additions & 11 deletions shared/core-kvalue/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import org.gradle.internal.os.OperatingSystem
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl

plugins {
Expand All @@ -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)
}
}

Expand Down
37 changes: 17 additions & 20 deletions shared/core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import org.gradle.internal.os.OperatingSystem
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl

plugins {
Expand All @@ -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")
}
}

Expand Down
17 changes: 7 additions & 10 deletions shared/models/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import org.gradle.internal.os.OperatingSystem
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl

plugins {
Expand All @@ -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
}
}

Expand Down
17 changes: 7 additions & 10 deletions shared/resources/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import org.gradle.internal.os.OperatingSystem
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl

plugins {
Expand All @@ -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
}
}

Expand Down
17 changes: 7 additions & 10 deletions shared/ui-models/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import org.gradle.internal.os.OperatingSystem
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl

plugins {
Expand All @@ -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
}
}

Expand Down

0 comments on commit 7694571

Please sign in to comment.