From 5711116ec5514754ffedf7e2a858f71bed324ca7 Mon Sep 17 00:00:00 2001 From: Brett Chabot Date: Mon, 23 Aug 2021 09:58:21 -0700 Subject: [PATCH] Add kotlin stdlin maven dependency to espresso-core and -ktx packages. PiperOrigin-RevId: 392456650 --- build_extensions/axt_versions.bzl | 1 + espresso/core/java/androidx/test/espresso/BUILD.bazel | 3 ++- ktx/core/java/androidx/test/core/BUILD.bazel | 10 +++++++--- ktx/ext/junit/java/androidx/test/ext/junit/BUILD.bazel | 10 +++++++--- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/build_extensions/axt_versions.bzl b/build_extensions/axt_versions.bzl index 5d42efd23..19f3c01be 100644 --- a/build_extensions/axt_versions.bzl +++ b/build_extensions/axt_versions.bzl @@ -22,6 +22,7 @@ ANDROIDX_VERSION_PATH = "1.0.0" GOOGLE_MATERIAL_VERSION = "1.0.0" ANDROIDX_LIFECYCLE_VERSION = "2.0.0" ANDROIDX_MULTIDEX_VERSION = "2.0.0" +KOTLIN_VERSION = "1.4.30" # accessibilitytestframework ATF_VERSION = "3.1.2" diff --git a/espresso/core/java/androidx/test/espresso/BUILD.bazel b/espresso/core/java/androidx/test/espresso/BUILD.bazel index e3a5c3add..085e4e1b9 100644 --- a/espresso/core/java/androidx/test/espresso/BUILD.bazel +++ b/espresso/core/java/androidx/test/espresso/BUILD.bazel @@ -1,6 +1,6 @@ load("//build_extensions:release.bzl", "axt_release_lib") load("//build_extensions:maven_repo.bzl", "maven_artifact") -load("//build_extensions:axt_versions.bzl", "ESPRESSO_VERSION", "HAMCREST_VERSION", "RUNNER_VERSION") +load("//build_extensions:axt_versions.bzl", "ESPRESSO_VERSION", "HAMCREST_VERSION", "RUNNER_VERSION", "KOTLIN_VERSION") load("//build_extensions:combine_jars.bzl", "combine_jars") load("//build_extensions:remove_from_jar.bzl", "remove_from_jar") @@ -278,6 +278,7 @@ maven_artifact( "org.hamcrest:hamcrest-library:%s" % HAMCREST_VERSION, "org.hamcrest:hamcrest-integration:%s" % HAMCREST_VERSION, "com.google.code.findbugs:jsr305:2.0.1", + "org.jetbrains.kotlin:kotlin-stdlib:%s" % KOTLIN_VERSION, ], artifact_id = "espresso-core", group_id = "androidx.test.espresso", diff --git a/ktx/core/java/androidx/test/core/BUILD.bazel b/ktx/core/java/androidx/test/core/BUILD.bazel index 53b366e00..cc45a4865 100644 --- a/ktx/core/java/androidx/test/core/BUILD.bazel +++ b/ktx/core/java/androidx/test/core/BUILD.bazel @@ -1,5 +1,10 @@ # androidx.test.core Kotlin extensions +load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_android_library") +load("//build_extensions:maven_repo.bzl", "maven_artifact") +load("//build_extensions:axt_versions.bzl", "ANDROIDX_LIFECYCLE_VERSION", "ANDROIDX_VERSION", "CORE_VERSION", "RUNNER_VERSION", "KOTLIN_VERSION") + + package( default_visibility = [ "//:__subpackages__", @@ -8,7 +13,7 @@ package( licenses(["notice"]) # Apache License 2.0 -load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_android_library") + kt_android_library( name = "core", @@ -50,8 +55,6 @@ axt_release_lib( ], ) -load("//build_extensions:maven_repo.bzl", "maven_artifact") -load("//build_extensions:axt_versions.bzl", "ANDROIDX_LIFECYCLE_VERSION", "ANDROIDX_VERSION", "CORE_VERSION", "RUNNER_VERSION") maven_artifact( name = "core_maven_artifact", @@ -59,6 +62,7 @@ maven_artifact( artifact_deps = [ "androidx.test:core:%s" % CORE_VERSION, "androidx.lifecycle:lifecycle-common:%s" % ANDROIDX_LIFECYCLE_VERSION, + "org.jetbrains.kotlin:kotlin-stdlib:%s" % KOTLIN_VERSION, ], artifact_id = "core-ktx", group_id = "androidx.test", diff --git a/ktx/ext/junit/java/androidx/test/ext/junit/BUILD.bazel b/ktx/ext/junit/java/androidx/test/ext/junit/BUILD.bazel index a32aba6e9..ee2d60bb5 100644 --- a/ktx/ext/junit/java/androidx/test/ext/junit/BUILD.bazel +++ b/ktx/ext/junit/java/androidx/test/ext/junit/BUILD.bazel @@ -1,5 +1,10 @@ # androidx.ext.junit Kotlin extensions +load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_android_library") +load("//build_extensions:maven_repo.bzl", "maven_artifact") +load("//build_extensions:axt_versions.bzl", "ANDROIDX_JUNIT_VERSION", "ANDROIDX_LIFECYCLE_VERSION", "ANDROIDX_VERSION", "CORE_VERSION", "RUNNER_VERSION", "KOTLIN_VERSION") + + licenses(["notice"]) # Apache License 2.0 package( @@ -8,7 +13,7 @@ package( ], ) -load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_android_library") + kt_android_library( name = "junit", @@ -50,8 +55,6 @@ axt_release_lib( ], ) -load("//build_extensions:maven_repo.bzl", "maven_artifact") -load("//build_extensions:axt_versions.bzl", "ANDROIDX_JUNIT_VERSION", "ANDROIDX_LIFECYCLE_VERSION", "ANDROIDX_VERSION", "CORE_VERSION", "RUNNER_VERSION") maven_artifact( name = "junit_maven_artifact", @@ -59,6 +62,7 @@ maven_artifact( artifact_deps = [ "androidx.test.ext:junit:%s" % ANDROIDX_JUNIT_VERSION, "androidx.lifecycle:lifecycle-common:%s" % ANDROIDX_LIFECYCLE_VERSION, + "org.jetbrains.kotlin:kotlin-stdlib:%s" % KOTLIN_VERSION, ], artifact_id = "junit-ktx", group_id = "androidx.test.ext",