From a1bfb4a8b8a05e4c49344109b51a1ae530947309 Mon Sep 17 00:00:00 2001 From: Emil Kantis Date: Sat, 7 Dec 2024 16:43:40 +0100 Subject: [PATCH] Cleaning up build warnings Example of warning: > > Configure project :kotest-assertions-arrow-fx-coroutines > w: A compileOnly dependency is used in targets: Kotlin/JS. > Dependencies: > - io.arrow-kt:arrow-fx-coroutines:2.0.0 (source sets: jsMain) > > Using compileOnly dependencies in these targets is not currently supported, because compileOnly dependencies must be present during the compilation of projects that depend on this project. > > To ensure consistent compilation behaviour, compileOnly dependencies should be exposed as api dependencies. > > Example: > > kotlin { > sourceSets { > nativeMain { > dependencies { > compileOnly("org.example:lib:1.2.3") > // additionally add the compileOnly dependency as an api dependency: > api("org.example:lib:1.2.3") > } > } > } > } > > This warning can be suppressed in gradle.properties: > > kotlin.suppressGradlePluginWarnings=IncorrectCompileOnlyDependencyWarning --- kotest-assertions-arrow-fx-coroutines/build.gradle.kts | 6 ++++++ kotest-assertions-arrow/build.gradle.kts | 6 ++++++ kotest-property-arrow-optics/build.gradle.kts | 6 ++++++ kotest-property-arrow/build.gradle.kts | 6 ++++++ 4 files changed, 24 insertions(+) diff --git a/kotest-assertions-arrow-fx-coroutines/build.gradle.kts b/kotest-assertions-arrow-fx-coroutines/build.gradle.kts index 6f4a6ef1..328fbb74 100644 --- a/kotest-assertions-arrow-fx-coroutines/build.gradle.kts +++ b/kotest-assertions-arrow-fx-coroutines/build.gradle.kts @@ -21,6 +21,12 @@ kotlin { } } + jsMain { + dependencies { + api(libs.arrow.fx.coroutines) + } + } + nativeMain { dependencies { implementation(libs.arrow.fx.coroutines) diff --git a/kotest-assertions-arrow/build.gradle.kts b/kotest-assertions-arrow/build.gradle.kts index ed6ca1b8..411dd3db 100644 --- a/kotest-assertions-arrow/build.gradle.kts +++ b/kotest-assertions-arrow/build.gradle.kts @@ -19,6 +19,12 @@ kotlin { } } + jsMain { + dependencies { + api(libs.arrow.core) + } + } + nativeMain { dependencies { implementation(libs.arrow.core) diff --git a/kotest-property-arrow-optics/build.gradle.kts b/kotest-property-arrow-optics/build.gradle.kts index 6e0044b7..98520f6b 100644 --- a/kotest-property-arrow-optics/build.gradle.kts +++ b/kotest-property-arrow-optics/build.gradle.kts @@ -27,6 +27,12 @@ kotlin { } } + jsMain { + dependencies { + api(libs.arrow.optics) + } + } + nativeMain { dependencies { implementation(libs.arrow.optics) diff --git a/kotest-property-arrow/build.gradle.kts b/kotest-property-arrow/build.gradle.kts index ceaeb008..fd766f15 100644 --- a/kotest-property-arrow/build.gradle.kts +++ b/kotest-property-arrow/build.gradle.kts @@ -23,6 +23,12 @@ kotlin { } } + jsMain { + dependencies { + api(libs.arrow.core) + } + } + nativeMain { dependencies { implementation(libs.arrow.core)