summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrevor Radcliffe <tradical@google.com>2021-11-16 15:24:55 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-11-16 15:24:55 +0000
commit0c6fa30a9a078184b338d90a73f0192ff10dc18e (patch)
tree6be252c17127169b37841a53b41a7d28a096aadd
parentaf16ae693281dfc674d7fdfe0f1ed09812b9da53 (diff)
parente2e39620a42370ba95eaa7e4566913b4e99d1d83 (diff)
downloadlocalepicker-0c6fa30a9a078184b338d90a73f0192ff10dc18e.tar.gz
Original change: https://android-review.googlesource.com/c/platform/frameworks/opt/localepicker/+/1861853 Change-Id: Ib087e353ee2fd5b697af24ff926c19c5f559f723
-rw-r--r--tests/Android.bp52
-rw-r--r--tests/Android.mk72
2 files changed, 52 insertions, 72 deletions
diff --git a/tests/Android.bp b/tests/Android.bp
new file mode 100644
index 0000000..e008473
--- /dev/null
+++ b/tests/Android.bp
@@ -0,0 +1,52 @@
+//
+// Copyright (C) 2008 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+///////////////////////////////////////////////////////////////
+// Build test package for locale picker lib. //
+///////////////////////////////////////////////////////////////
+package {
+ default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+android_app {
+
+ name: "LocalePickerTest",
+
+ srcs: ["src/**/*.java"],
+ java_resource_dirs: ["config"],
+
+ platform_apis: true,
+ optimize: {
+ enabled: false,
+ },
+
+ static_libs: [
+ "localepicker",
+ "robolectric_android-all-stub",
+ "Robolectric_all-target",
+ "mockito-robolectric-prebuilt",
+ "truth-prebuilt",
+ ],
+}
+
+///////////////////////////////////////////////////////////////
+// LocalePicker Robolectric test target. //
+///////////////////////////////////////////////////////////////
+android_robolectric_test {
+ name: "LocalePickerRoboTests",
+ srcs: ["src/**/*.java"],
+ instrumentation_for: "LocalePickerTest",
+}
diff --git a/tests/Android.mk b/tests/Android.mk
deleted file mode 100644
index 138dc4d..0000000
--- a/tests/Android.mk
+++ /dev/null
@@ -1,72 +0,0 @@
-#############################################################
-# Build test package for locale picker lib. #
-#############################################################
-
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_PACKAGE_NAME := LocalePickerTest
-
-LOCAL_PRIVATE_PLATFORM_APIS := true
-LOCAL_PROGUARD_ENABLED := disabled
-
-LOCAL_STATIC_ANDROID_LIBRARIES += localepicker
-
-LOCAL_USE_AAPT2 := true
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
-include $(BUILD_PACKAGE)
-
-#############################################################
-# LocalePicker Robolectric test target. #
-#############################################################
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := LocalePickerRoboTests
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
-LOCAL_JAVA_RESOURCE_DIRS := config
-
-LOCAL_JAVA_LIBRARIES := \
- robolectric_android-all-stub \
- Robolectric_all-target \
- mockito-robolectric-prebuilt \
- truth-prebuilt
-
-LOCAL_INSTRUMENTATION_FOR := LocalePickerTest
-
-LOCAL_MODULE_TAGS := optional
-
-# Generate test_config.properties
-include external/robolectric-shadows/gen_test_config.mk
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-#############################################################
-# LocalePicker runner target to run the previous target. #
-#############################################################
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := RunLocalePickerRoboTests
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
-
-LOCAL_JAVA_LIBRARIES := \
- LocalePickerRoboTests \
- robolectric_android-all-stub \
- Robolectric_all-target \
- mockito-robolectric-prebuilt \
- truth-prebuilt
-
-LOCAL_TEST_PACKAGE := LocalePickerTest
-
-LOCAL_INSTRUMENT_SOURCE_DIRS := $(LOCAL_PATH)/../src
-
-include external/robolectric-shadows/run_robotests.mk