From d812cd3d32c9637eaa745ccc05eb08c3527f5fdd Mon Sep 17 00:00:00 2001 From: Aurimas Liutikas Date: Thu, 20 Jul 2023 15:08:27 -0700 Subject: [PATCH] Remove libs.kotlinStdlib dependencies from non-kotlin libraries Found using: find -iname build.gradle | xargs grep -l "kotlinStdlib" | xargs grep -L "androidXMultiplatform" | xargs grep -L "kotlin-android" | xargs grep -L ""org.jetbrains.kotlin.android"" | xargs grep -L "\"kotlin\"" Before this change these libraries were adding a dependency to kotlinStdlib without a version constraint which makes it really difficult to consume this library from a project that does not use Kotlin Gradle Plugin. Test: manually spot checking window extension library module file Change-Id: I6c96b2f29ac192e40a5b81eafa43c453cd2ae240 --- leanback/leanback/build.gradle | 1 - wear/protolayout/protolayout-expression/build.gradle | 5 +---- .../watchface-complications-data-source-samples/build.gradle | 1 - window/extensions/extensions/build.gradle | 3 +-- 4 files changed, 2 insertions(+), 8 deletions(-) diff --git a/leanback/leanback/build.gradle b/leanback/leanback/build.gradle index d22458aec4f83..018ffd4a91dbf 100644 --- a/leanback/leanback/build.gradle +++ b/leanback/leanback/build.gradle @@ -25,7 +25,6 @@ dependencies { // It can be removed if appcompat library is updated to a newer version implementation("androidx.vectordrawable:vectordrawable-animated:1.1.0") - androidTestImplementation(libs.kotlinStdlib) androidTestImplementation(libs.testExtJunit) androidTestImplementation(libs.testCore) androidTestImplementation(libs.testRunner) diff --git a/wear/protolayout/protolayout-expression/build.gradle b/wear/protolayout/protolayout-expression/build.gradle index 85d4ee89aa3cb..64219826a1b8b 100644 --- a/wear/protolayout/protolayout-expression/build.gradle +++ b/wear/protolayout/protolayout-expression/build.gradle @@ -25,13 +25,10 @@ dependencies { annotationProcessor(libs.nullaway) api("androidx.annotation:annotation:1.2.0") - implementation("androidx.annotation:annotation-experimental:1.3.0") + implementation("androidx.annotation:annotation-experimental:1.3.1") implementation("androidx.collection:collection:1.2.0") implementation(project(path: ":wear:protolayout:protolayout-proto", configuration: "shadow")) - // Upgrade transitive kotlin-stdlib dependency from annotation-experimental. - implementation(libs.kotlinStdlib) - testImplementation(libs.testExtJunit) testImplementation(libs.testExtTruth) testImplementation(libs.testRunner) diff --git a/wear/watchface/watchface-complications-data-source-samples/build.gradle b/wear/watchface/watchface-complications-data-source-samples/build.gradle index 8fe99bd6cdb71..5bc5294b14d0a 100644 --- a/wear/watchface/watchface-complications-data-source-samples/build.gradle +++ b/wear/watchface/watchface-complications-data-source-samples/build.gradle @@ -22,7 +22,6 @@ plugins { dependencies { api(project(":wear:watchface:watchface-complications-data-source")) api(libs.guavaAndroid) - api(libs.kotlinStdlib) implementation("androidx.core:core:1.1.0") implementation("androidx.wear.protolayout:protolayout-expression:1.0.0-beta01") } diff --git a/window/extensions/extensions/build.gradle b/window/extensions/extensions/build.gradle index 5d477b7bddec7..4de2b71d91e0b 100644 --- a/window/extensions/extensions/build.gradle +++ b/window/extensions/extensions/build.gradle @@ -23,9 +23,8 @@ plugins { } dependencies { - api(libs.kotlinStdlib) implementation("androidx.annotation:annotation:1.6.0") - implementation("androidx.annotation:annotation-experimental:1.1.0") + implementation("androidx.annotation:annotation-experimental:1.3.1") implementation("androidx.window.extensions.core:core:1.0.0") testImplementation(libs.robolectric)