Skip to content

Commit eb763fa

Browse files
committed
build: suppress warnings from unused variables for source sets
Source set access in multi-platform projects is expected to happen by delegation. Yet, the created vals are usually not accessed afterwards and result in compilation warnings when Gradle compiles the build file. This commit adds suppressions for these warnings. As IntelliJ understands these warnings as unneeded, despite having an effect on command-line compilation, another suppression for the unneeded suppressions is needed. Cf.: https://youtrack.jetbrains.com/issue/KT-38871
1 parent a4d9b17 commit eb763fa

File tree

13 files changed

+13
-0
lines changed

13 files changed

+13
-0
lines changed

bulk-model-sync-lib/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ kotlin {
1616
useJUnitPlatform()
1717
}
1818
}
19+
@Suppress("UNUSED_VARIABLE", "KotlinRedundantDiagnosticSuppress")
1920
sourceSets {
2021
val commonMain by getting {
2122
dependencies {

kotlin-utils/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ kotlin {
1818
}
1919
useCommonJs()
2020
}
21+
@Suppress("UNUSED_VARIABLE", "KotlinRedundantDiagnosticSuppress")
2122
sourceSets {
2223
val commonMain by getting {
2324
dependencies {

light-model-client/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ kotlin {
1717
useCommonJs()
1818
}
1919

20+
@Suppress("UNUSED_VARIABLE", "KotlinRedundantDiagnosticSuppress")
2021
sourceSets {
2122
val commonMain by getting {
2223
dependencies {

model-api-gen-runtime/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ kotlin {
2020
useCommonJs()
2121
}
2222

23+
@Suppress("UNUSED_VARIABLE", "KotlinRedundantDiagnosticSuppress")
2324
sourceSets {
2425
all {
2526
languageSettings.optIn("kotlin.js.ExperimentalJsExport")

model-api/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ kotlin {
2626
}
2727
useCommonJs()
2828
}
29+
@Suppress("UNUSED_VARIABLE", "KotlinRedundantDiagnosticSuppress")
2930
sourceSets {
3031
val commonMain by getting {
3132
dependencies {

model-client/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ kotlin {
3636
}
3737
useCommonJs()
3838
}
39+
@Suppress("UNUSED_VARIABLE", "KotlinRedundantDiagnosticSuppress")
3940
sourceSets {
4041
val commonMain by getting {
4142
dependencies {

model-datastructure/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ kotlin {
1616
}
1717
useCommonJs()
1818
}
19+
@Suppress("UNUSED_VARIABLE", "KotlinRedundantDiagnosticSuppress")
1920
sourceSets {
2021
val commonMain by getting {
2122
dependencies {

model-server-api/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ kotlin {
1818
useCommonJs()
1919
}
2020

21+
@Suppress("UNUSED_VARIABLE", "KotlinRedundantDiagnosticSuppress")
2122
sourceSets {
2223
val commonMain by getting {
2324
dependencies {

modelql-client/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ kotlin {
3030
useCommonJs()
3131
}
3232

33+
@Suppress("UNUSED_VARIABLE", "KotlinRedundantDiagnosticSuppress")
3334
sourceSets {
3435
val commonMain by getting {
3536
dependencies {

modelql-core/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ kotlin {
3131
useCommonJs()
3232
}
3333

34+
@Suppress("UNUSED_VARIABLE", "KotlinRedundantDiagnosticSuppress")
3435
sourceSets {
3536
val commonMain by getting {
3637
dependencies {

0 commit comments

Comments
 (0)