Migrate LocalePickerTest to Soong am: e2e39620a4 am: 0c6fa30a9a am: 42a1ac4015 am: 89fb2b6797

Original change: https://android-review.googlesource.com/c/platform/frameworks/opt/localepicker/+/1861853

Change-Id: Icc7b1783019a5de441c3d308d647f5f431db0bd1
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