diff --git a/kokoro/presubmit/presubmit_main.sh b/kokoro/presubmit/presubmit_main.sh index e2bab2eae..eb337489b 100644 --- a/kokoro/presubmit/presubmit_main.sh +++ b/kokoro/presubmit/presubmit_main.sh @@ -86,6 +86,9 @@ function main() { "--verbose_failures" "--experimental_google_legacy_api" "--experimental_enable_android_migration_apis" + ) + + TEST_ARGS=( "--build_tests_only" "--test_output=errors" ) @@ -132,6 +135,7 @@ function main() { "$bazel" test \ "${COMMON_ARGS[@]}" \ "${TOOL_ARGS[@]}" \ + "${TEST_ARGS[@]}" \ -- \ "${TOOL_TEST_TARGETS[@]}" @@ -143,6 +147,7 @@ function main() { "$bazel" test \ "${COMMON_ARGS[@]}" \ "${RULE_ARGS[@]}" \ + "${TEST_ARGS[@]}" \ -- \ "${RULE_TEST_TARGETS[@]}" @@ -153,6 +158,15 @@ function main() { "${RULE_ARGS[@]}" \ -- \ //java/com/basicapp:basic_app + + # Mobile-install test with no deployment + "$bazel" mobile-install \ + "${COMMON_ARGS[@]}" \ + "${RULE_ARGS[@]}" \ + -- \ + //java/com/basicapp:basic_app \ + --nodeploy + } main diff --git a/mobile_install/tools.bzl b/mobile_install/tools.bzl index af067b8a4..b0cb6312a 100644 --- a/mobile_install/tools.bzl +++ b/mobile_install/tools.bzl @@ -66,7 +66,7 @@ TOOL_ATTRS = dict( default = Label( "@androidsdk//:aapt2_binary", ), - allow_single_file = True, + allow_files = True, cfg = "exec", executable = True, ), @@ -119,7 +119,7 @@ TOOL_ATTRS = dict( default = Label( "@androidsdk//:zipalign_binary", ), - allow_single_file = True, + allow_files = True, cfg = "exec", executable = True, ), diff --git a/tools/android/BUILD b/tools/android/BUILD index f2e6f5227..2c525ae8c 100644 --- a/tools/android/BUILD +++ b/tools/android/BUILD @@ -62,7 +62,7 @@ alias( alias( name = "desugared_java8_legacy_apis", - actual = ":gen_fail", # TODO(#122): Fix library desugaring + actual = ":gen_fail", # TODO(#122): Fix library desugaring visibility = ["//visibility:public"], ) @@ -73,7 +73,6 @@ java_binary( runtime_deps = ["@android_gmaven_r8//jar"], ) - java_binary( name = "r8", main_class = "com.android.tools.r8.R8", @@ -87,3 +86,15 @@ java_binary( visibility = ["//visibility:public"], runtime_deps = ["@rules_android_maven//:com_android_tools_build_gradle"], ) + +alias( + name = "dexbuilder", + actual = "@bazel_tools//tools/android:dexbuilder", + visibility = ["//visibility:public"], +) + +alias( + name = "dexmerger", + actual = "@bazel_tools//tools/android:dexmerger", + visibility = ["//visibility:public"], +)