Move shared test code into separate directory

Bug: b/289394860
Test: atest ThemePicker
Test: run ThemePicker tests in Studio
Change-Id: Ie53d037f6db727040ed7342966b1f736e9155f40
diff --git a/tests/common/Android.bp b/tests/common/Android.bp
new file mode 100644
index 0000000..2904fad
--- /dev/null
+++ b/tests/common/Android.bp
@@ -0,0 +1,39 @@
+// Copyright (C) 2023 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 rule for WallpaperPicker2 tests
+//
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+android_library {
+    name: "ThemePickerTestLib",
+
+    defaults: ["ThemePicker_defaults"],
+    srcs: [
+        "src/com/android/customization/testing/**/*.java",
+        "src/com/android/customization/testing/**/*.kt",
+    ],
+    static_libs: [
+        "WallpaperPicker2TestLib",
+        "androidx.annotation_annotation",
+        "kotlinx_coroutines_test",
+        "truth-prebuilt",
+    ],
+
+    platform_apis: true,
+}