Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

Remove manual source set management #1841

Merged
merged 2 commits into from
May 7, 2024
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
6 changes: 3 additions & 3 deletions api/tmdb/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ buildConfig {

kotlin {
sourceSets {
val commonMain by getting {
commonMain {
dependencies {
implementation(projects.core.base)
implementation(projects.core.logging.api)
Expand All @@ -38,14 +38,14 @@ kotlin {
}
}

val jvmMain by getting {
jvmMain {
dependencies {
api(libs.okhttp.okhttp)
implementation(libs.ktor.client.okhttp)
}
}

val iosMain by getting {
iosMain {
dependencies {
implementation(libs.ktor.client.darwin)
}
Expand Down
6 changes: 3 additions & 3 deletions api/trakt/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ buildConfig {

kotlin {
sourceSets {
val commonMain by getting {
commonMain {
dependencies {
implementation(projects.core.base)
implementation(projects.core.logging.api)
Expand All @@ -51,14 +51,14 @@ kotlin {
}
}

val jvmMain by getting {
jvmMain {
dependencies {
api(libs.okhttp.okhttp)
implementation(libs.ktor.client.okhttp)
}
}

val iosMain by getting {
iosMain {
dependencies {
implementation(libs.ktor.client.darwin)
}
Expand Down
12 changes: 1 addition & 11 deletions common/imageloading/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@
// SPDX-License-Identifier: Apache-2.0


import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask

plugins {
id("app.tivi.android.library")
id("app.tivi.kotlin.multiplatform")
}

kotlin {
sourceSets {
val commonMain by getting {
commonMain {
dependencies {
implementation(projects.core.base)
implementation(projects.core.logging.api)
Expand All @@ -32,14 +30,6 @@ kotlin {
}
}

tasks.withType<KotlinCompilationTask<*>>().configureEach {
compilerOptions {
// Have to disable this due to 'duplicate library name'
// https://youtrack.jetbrains.com/issue/KT-51110
allWarningsAsErrors = false
}
}

android {
namespace = "app.tivi.common.imageloading"
}
2 changes: 1 addition & 1 deletion common/ui/circuit-overlay/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ android {

kotlin {
sourceSets {
val commonMain by getting {
commonMain {
dependencies {
implementation(projects.common.ui.compose)
implementation(projects.common.ui.screens)
Expand Down
18 changes: 4 additions & 14 deletions common/ui/compose/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// SPDX-License-Identifier: Apache-2.0


import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask

plugins {
id("app.tivi.android.library")
id("app.tivi.kotlin.multiplatform")
Expand All @@ -12,7 +10,7 @@ plugins {

kotlin {
sourceSets {
val commonMain by getting {
commonMain {
dependencies {
api(projects.data.models)
api(projects.core.preferences)
Expand Down Expand Up @@ -43,14 +41,14 @@ kotlin {
}

val jvmCommon by creating {
dependsOn(commonMain)
dependsOn(commonMain.get())
}

val jvmMain by getting {
jvmMain {
dependsOn(jvmCommon)
}

val androidMain by getting {
androidMain {
dependsOn(jvmCommon)

dependencies {
Expand All @@ -60,14 +58,6 @@ kotlin {
}
}

tasks.withType<KotlinCompilationTask<*>>().configureEach {
compilerOptions {
// Have to disable this due to 'duplicate library name'
// https://youtrack.jetbrains.com/issue/KT-51110
allWarningsAsErrors = false
}
}

android {
namespace = "app.tivi.common.compose"

Expand Down
4 changes: 2 additions & 2 deletions common/ui/resources/fonts/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ plugins {

kotlin {
sourceSets {
val commonMain by getting {
commonMain {
dependencies {
api(compose.ui)
}
}

val iosMain by getting {
iosMain {
dependencies {
@OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class)
implementation(compose.components.resources)
Expand Down
4 changes: 2 additions & 2 deletions common/ui/resources/strings/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ plugins {

kotlin {
sourceSets {
val commonMain by getting {
commonMain {
dependencies {
api(projects.data.models)
api(libs.lyricist.core)
}
}

val commonTest by getting {
commonTest {
dependencies {
implementation(kotlin("test"))
implementation(libs.assertk)
Expand Down
2 changes: 1 addition & 1 deletion common/ui/screens/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ plugins {

kotlin {
sourceSets {
val commonMain by getting {
commonMain {
dependencies {
api(libs.circuit.runtime)
}
Expand Down
4 changes: 2 additions & 2 deletions core/analytics/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ plugins {

kotlin {
sourceSets {
val commonMain by getting {
commonMain {
dependencies {
implementation(projects.core.base)
api(projects.core.preferences)
}
}

val androidMain by getting {
androidMain {
dependencies {
implementation(libs.google.firebase.analytics)
implementation(libs.kotlininject.runtime)
Expand Down
4 changes: 2 additions & 2 deletions core/base/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ plugins {

kotlin {
sourceSets {
val commonMain by getting {
commonMain {
dependencies {
api(libs.kotlin.coroutines.core)
api(libs.kotlininject.runtime)
}
}

val jvmMain by getting
jvmMain
}
}
2 changes: 1 addition & 1 deletion core/logging/api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {

kotlin {
sourceSets {
val commonMain by getting {
commonMain {
dependencies {
api(libs.kotlin.coroutines.core)
api(libs.kotlinx.datetime)
Expand Down
6 changes: 3 additions & 3 deletions core/logging/implementation/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {

kotlin {
sourceSets {
val commonMain by getting {
commonMain {
dependencies {
api(projects.core.base)
api(projects.core.logging.api)
Expand All @@ -20,15 +20,15 @@ kotlin {
}
}

val androidMain by getting {
androidMain {
dependencies {
implementation(libs.crashkios.crashlytics)
implementation(libs.google.firebase.crashlytics)
implementation(libs.timber)
}
}

val iosMain by getting {
iosMain {
dependencies {
implementation(libs.crashkios.crashlytics)
}
Expand Down
4 changes: 2 additions & 2 deletions core/performance/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ plugins {

kotlin {
sourceSets {
val commonMain by getting {
commonMain {
dependencies {
implementation(projects.core.base)
implementation(libs.kotlininject.runtime)
}
}

val androidMain by getting {
androidMain {
dependencies {
implementation(libs.google.firebase.perf)
}
Expand Down
4 changes: 2 additions & 2 deletions core/powercontroller/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ plugins {

kotlin {
sourceSets {
val commonMain by getting {
commonMain {
dependencies {
implementation(projects.core.base)
api(projects.core.preferences)
}
}

val androidMain by getting {
androidMain {
dependencies {
implementation(libs.androidx.core)

Expand Down
4 changes: 2 additions & 2 deletions core/preferences/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ plugins {

kotlin {
sourceSets {
val commonMain by getting {
commonMain {
dependencies {
implementation(projects.core.base)
api(libs.multiplatformsettings.core)
api(libs.multiplatformsettings.coroutines)
}
}

val androidMain by getting {
androidMain {
dependencies {
implementation(libs.androidx.core)
implementation(libs.kotlininject.runtime)
Expand Down
8 changes: 4 additions & 4 deletions data/db-sqldelight/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ plugins {

kotlin {
sourceSets {
val commonMain by getting {
commonMain {
dependencies {
implementation(projects.core.base)
api(projects.data.db)
Expand All @@ -30,19 +30,19 @@ kotlin {
}
}

val androidMain by getting {
androidMain {
dependencies {
api(libs.sqldelight.android)
}
}

val jvmMain by getting {
jvmMain {
dependencies {
api(libs.sqldelight.sqlite)
}
}

val iosMain by getting {
iosMain {
dependencies {
api(libs.sqldelight.native)

Expand Down
2 changes: 1 addition & 1 deletion data/db/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {

kotlin {
sourceSets {
val commonMain by getting {
commonMain {
dependencies {
implementation(projects.core.base)
api(projects.data.models)
Expand Down
2 changes: 1 addition & 1 deletion data/episodes/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {

kotlin {
sourceSets {
val commonMain by getting {
commonMain {
dependencies {
api(projects.core.preferences)
api(projects.data.models)
Expand Down
2 changes: 1 addition & 1 deletion data/followedshows/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {

kotlin {
sourceSets {
val commonMain by getting {
commonMain {
dependencies {
api(projects.data.models)
api(projects.data.traktauth)
Expand Down
2 changes: 1 addition & 1 deletion data/legacy/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {

kotlin {
sourceSets {
val commonMain by getting {
commonMain {
dependencies {
api(projects.core.base)
api(projects.api.trakt)
Expand Down
2 changes: 1 addition & 1 deletion data/licenses/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {

kotlin {
sourceSets {
val commonMain by getting {
commonMain {
dependencies {
api(projects.core.base)
api(projects.core.logging.api)
Expand Down
2 changes: 1 addition & 1 deletion data/models/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {

kotlin {
sourceSets {
val commonMain by getting {
commonMain {
dependencies {
api(projects.core.base)
api(libs.kotlinx.datetime)
Expand Down
Loading
Loading