Skip to content

Commit 1cdd553

Browse files
committed
refactor(build): improve JVM opt-in flag usage
It's better to remove the opt-in flag, rather than add the library
1 parent 1a43213 commit 1cdd553

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

build.gradle.kts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,10 @@ subprojects {
116116
compilerArgs += "-XXLanguage:+ExplicitBackingFields"
117117
}
118118

119-
if (project.name != "api") {
119+
if (project.path !in listOf(":api", ":common")) {
120120
compilerArgs += "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"
121+
}
122+
if (project.path != ":api") {
121123
compilerArgs += "-Xcontext-parameters"
122124
}
123125
freeCompilerArgs = compilerArgs

common/build.gradle.kts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,4 @@ dependencies {
6363
testFixturesImplementation(libs.jakewharton.timber)
6464
testFixturesImplementation(libs.slf4j.api)
6565
testFixturesImplementation(libs.androidx.annotation)
66-
// Required so the ExperimentalCoroutinesApi opt-in (applied globally) doesn't cause
67-
// an "unresolved" warning, which is treated as an error due to allWarningsAsErrors
68-
testFixturesImplementation(libs.kotlinx.coroutines.core)
6966
}

0 commit comments

Comments
 (0)