Convert platform_testing to Android.bp
See build/soong/README.md for more information.
Test: m checkbuild
Change-Id: I6575328c949b1b03b5d85854966ebe95d446fb50
diff --git a/libraries/app-helpers/core/Android.bp b/libraries/app-helpers/core/Android.bp
new file mode 100644
index 0000000..b88a687
--- /dev/null
+++ b/libraries/app-helpers/core/Android.bp
@@ -0,0 +1,29 @@
+//
+// Copyright (C) 2016 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.
+//
+
+java_library {
+ name: "app-helpers-core",
+ libs: [
+ "ub-uiautomator",
+ "android-support-test",
+ "launcher-helper-lib",
+ "androidx-test",
+ ],
+ srcs: ["src/**/*.java"],
+ sdk_version: "test_current",
+}
+
+//#####################################
diff --git a/libraries/app-helpers/core/Android.mk b/libraries/app-helpers/core/Android.mk
deleted file mode 100644
index a63db63..0000000
--- a/libraries/app-helpers/core/Android.mk
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (C) 2016 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.
-#
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := app-helpers-core
-LOCAL_JAVA_LIBRARIES := ub-uiautomator android-support-test launcher-helper-lib androidx-test
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_SDK_VERSION := current
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-######################################
-
-include $(call all-makefiles-under, $(LOCAL_PATH))
diff --git a/libraries/app-helpers/interfaces/Android.bp b/libraries/app-helpers/interfaces/Android.bp
new file mode 100644
index 0000000..07163c2
--- /dev/null
+++ b/libraries/app-helpers/interfaces/Android.bp
@@ -0,0 +1,79 @@
+//
+// Copyright (C) 2017 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.
+//
+
+java_library {
+ name: "app-helpers-common-interfaces",
+ libs: ["ub-uiautomator"],
+ static_libs: ["app-helpers-core"],
+ srcs: ["common/**/*.java"],
+ sdk_version: "test_current",
+}
+
+//#####################################
+
+java_library {
+ name: "app-helpers-auto-interfaces",
+ libs: [
+ "ub-uiautomator",
+ "app-helpers-core",
+ ],
+ static_libs: ["app-helpers-common-interfaces"],
+ srcs: ["auto/**/*.java"],
+ sdk_version: "test_current",
+}
+
+//#####################################
+
+java_library {
+ name: "app-helpers-clockwork-interfaces",
+ libs: [
+ "ub-uiautomator",
+ "app-helpers-core",
+ ],
+ static_libs: ["app-helpers-common-interfaces"],
+ srcs: ["clockwork/**/*.java"],
+ sdk_version: "test_current",
+}
+
+//#####################################
+
+java_library {
+ name: "app-helpers-handheld-interfaces",
+ libs: [
+ "ub-uiautomator",
+ "app-helpers-core",
+ ],
+ static_libs: ["app-helpers-common-interfaces"],
+ srcs: ["handheld/**/*.java"],
+ sdk_version: "test_current",
+}
+
+//#####################################
+
+java_library {
+ name: "app-helpers-tv-interfaces",
+ libs: [
+ "ub-uiautomator",
+ "app-helpers-core",
+ "launcher-helper-lib",
+ ],
+ static_libs: [
+ "app-helpers-common-interfaces",
+ "dpad-util",
+ ],
+ srcs: ["tv/**/*.java"],
+ sdk_version: "test_current",
+}
diff --git a/libraries/app-helpers/interfaces/Android.mk b/libraries/app-helpers/interfaces/Android.mk
deleted file mode 100644
index b7199e4..0000000
--- a/libraries/app-helpers/interfaces/Android.mk
+++ /dev/null
@@ -1,69 +0,0 @@
-#
-# Copyright (C) 2017 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.
-#
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := app-helpers-common-interfaces
-LOCAL_JAVA_LIBRARIES := ub-uiautomator
-LOCAL_STATIC_JAVA_LIBRARIES := app-helpers-core
-LOCAL_SRC_FILES := $(call all-java-files-under, common)
-LOCAL_SDK_VERSION := current
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-######################################
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := app-helpers-auto-interfaces
-LOCAL_JAVA_LIBRARIES := ub-uiautomator app-helpers-core
-LOCAL_STATIC_JAVA_LIBRARIES := app-helpers-common-interfaces
-LOCAL_SRC_FILES := $(call all-java-files-under, auto)
-LOCAL_SDK_VERSION := current
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-######################################
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := app-helpers-clockwork-interfaces
-LOCAL_JAVA_LIBRARIES := ub-uiautomator app-helpers-core
-LOCAL_STATIC_JAVA_LIBRARIES := app-helpers-common-interfaces
-LOCAL_SRC_FILES := $(call all-java-files-under, clockwork)
-LOCAL_SDK_VERSION := current
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-######################################
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := app-helpers-handheld-interfaces
-LOCAL_JAVA_LIBRARIES := ub-uiautomator app-helpers-core
-LOCAL_STATIC_JAVA_LIBRARIES := app-helpers-common-interfaces
-LOCAL_SRC_FILES := $(call all-java-files-under, handheld)
-LOCAL_SDK_VERSION := current
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-######################################
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := app-helpers-tv-interfaces
-LOCAL_JAVA_LIBRARIES := ub-uiautomator app-helpers-core launcher-helper-lib
-LOCAL_STATIC_JAVA_LIBRARIES := app-helpers-common-interfaces dpad-util
-LOCAL_SRC_FILES := $(call all-java-files-under, tv)
-LOCAL_SDK_VERSION := current
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/libraries/aupt-lib/Android.bp b/libraries/aupt-lib/Android.bp
new file mode 100644
index 0000000..3f8a718
--- /dev/null
+++ b/libraries/aupt-lib/Android.bp
@@ -0,0 +1,43 @@
+//
+// Copyright (C) 2014 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.
+//
+
+java_library {
+ name: "AuptLib",
+ libs: [
+ "ub-uiautomator",
+ "junit",
+ "android.test.runner.stubs",
+ "android.test.base.stubs",
+ ],
+ srcs: ["src/**/*.java"],
+}
+
+//#####################################
+
+android_test {
+ name: "AuptRunner",
+
+ platform_apis: true,
+ static_libs: [
+ "ub-uiautomator",
+ "junit",
+ ],
+ libs: [
+ "android.test.base.stubs",
+ "android.test.runner.stubs",
+ ],
+ srcs: ["src/**/*.java"],
+}
diff --git a/libraries/aupt-lib/Android.mk b/libraries/aupt-lib/Android.mk
deleted file mode 100644
index d98e444..0000000
--- a/libraries/aupt-lib/Android.mk
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Copyright (C) 2014 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.
-#
-
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := AuptLib
-LOCAL_JAVA_LIBRARIES := ub-uiautomator \
- junit \
- android.test.runner.stubs \
- android.test.base.stubs
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-######################################
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-LOCAL_PACKAGE_NAME := AuptRunner
-LOCAL_PRIVATE_PLATFORM_APIS := true
-LOCAL_STATIC_JAVA_LIBRARIES := ub-uiautomator \
- junit
-LOCAL_JAVA_LIBRARIES := android.test.base.stubs android.test.runner.stubs
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-include $(BUILD_PACKAGE)
-
diff --git a/libraries/composer/Android.bp b/libraries/composer/Android.bp
new file mode 100644
index 0000000..1459bfb
--- /dev/null
+++ b/libraries/composer/Android.bp
@@ -0,0 +1,22 @@
+// Copyright (C) 2018 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.
+
+java_library {
+ name: "platform-test-composers",
+ sdk_version: "current",
+ static_libs: ["androidx-test"],
+ srcs: ["src/**/*.java"],
+}
+
+//#####################################
diff --git a/libraries/composer/Android.mk b/libraries/composer/Android.mk
deleted file mode 100644
index 282654c..0000000
--- a/libraries/composer/Android.mk
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright (C) 2018 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.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := platform-test-composers
-LOCAL_SDK_VERSION := current
-LOCAL_STATIC_JAVA_LIBRARIES := androidx-test
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-######################################
-
-include $(call all-makefiles-under, $(LOCAL_PATH))
diff --git a/libraries/composer/tests/Android.bp b/libraries/composer/tests/Android.bp
new file mode 100644
index 0000000..64b077a
--- /dev/null
+++ b/libraries/composer/tests/Android.bp
@@ -0,0 +1,29 @@
+//
+// Copyright (C) 2018 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.
+//
+
+android_test {
+ name: "PlatformComposerTests",
+ defaults: ["tradefed_errorprone_defaults"],
+
+ sdk_version: "current",
+ static_libs: [
+ "platform-test-composers",
+ "truth-prebuilt",
+ "guava",
+ ],
+ srcs: ["src/**/*.java"],
+ test_suites: ["device-tests"],
+}
diff --git a/libraries/composer/tests/Android.mk b/libraries/composer/tests/Android.mk
deleted file mode 100644
index bf75771..0000000
--- a/libraries/composer/tests/Android.mk
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Copyright (C) 2018 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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-LOCAL_PACKAGE_NAME := PlatformComposerTests
-LOCAL_SDK_VERSION := current
-LOCAL_STATIC_JAVA_LIBRARIES := platform-test-composers truth-prebuilt guava
-LOCAL_SRC_FILES := $(call all-java-files-under, src/)
-LOCAL_COMPATIBILITY_SUITE := device-tests
-
--include tools/tradefederation/core/error_prone_rules.mk
-
-include $(BUILD_PACKAGE)
diff --git a/libraries/device-collectors/src/hostsidetests/Android.bp b/libraries/device-collectors/src/hostsidetests/Android.bp
new file mode 100644
index 0000000..7f0ebb0
--- /dev/null
+++ b/libraries/device-collectors/src/hostsidetests/Android.bp
@@ -0,0 +1,32 @@
+// Copyright (C) 2017 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.
+
+java_test_host {
+ name: "CollectorHostsideLibTest",
+ defaults: ["tradefed_errorprone_defaults"],
+
+ // Only compile source java files in this jar.
+ srcs: ["src/**/*.java"],
+
+ libs: ["tradefed"],
+
+ static_libs: [
+ "platformprotos",
+ "mockito-host",
+ "objenesis",
+ ],
+
+ // tag this module as a test artifact
+ test_suites: ["general-tests"],
+}
diff --git a/libraries/device-collectors/src/hostsidetests/Android.mk b/libraries/device-collectors/src/hostsidetests/Android.mk
deleted file mode 100644
index 4125dcf..0000000
--- a/libraries/device-collectors/src/hostsidetests/Android.mk
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright (C) 2017 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.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-# Only compile source java files in this jar.
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_MODULE := CollectorHostsideLibTest
-
-LOCAL_JAVA_LIBRARIES := tradefed
-
-LOCAL_STATIC_JAVA_LIBRARIES := platformprotos mockito-host objenesis
-
-# tag this module as a test artifact
-LOCAL_COMPATIBILITY_SUITE := general-tests
-
-include $(BUILD_HOST_JAVA_LIBRARY)
-
--include tools/tradefederation/core/error_prone_rules.mk
-# Build the test using their own makefiles
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/libraries/device-collectors/src/main/Android.bp b/libraries/device-collectors/src/main/Android.bp
new file mode 100644
index 0000000..92502f1
--- /dev/null
+++ b/libraries/device-collectors/src/main/Android.bp
@@ -0,0 +1,27 @@
+// Copyright (C) 2017 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.
+
+java_library {
+ name: "collector-device-lib",
+ defaults: ["tradefed_errorprone_defaults"],
+
+ srcs: ["java/**/*.java"],
+
+ static_libs: [
+ "androidx-test",
+ "junit",
+ ],
+
+ sdk_version: "current",
+}
diff --git a/libraries/device-collectors/src/main/Android.mk b/libraries/device-collectors/src/main/Android.mk
deleted file mode 100644
index aafd564..0000000
--- a/libraries/device-collectors/src/main/Android.mk
+++ /dev/null
@@ -1,33 +0,0 @@
-# Copyright (C) 2017 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.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := $(call all-java-files-under, java)
-
-LOCAL_STATIC_JAVA_LIBRARIES := \
- androidx-test \
- junit
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_MODULE := collector-device-lib
-
-LOCAL_SDK_VERSION := current
-LOCAL_USE_AAPT2 := true
-
--include tools/tradefederation/core/error_prone_rules.mk
-include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/libraries/device-collectors/src/test/Android.bp b/libraries/device-collectors/src/test/Android.bp
new file mode 100644
index 0000000..0675e09
--- /dev/null
+++ b/libraries/device-collectors/src/test/Android.bp
@@ -0,0 +1,33 @@
+//
+// Copyright (C) 2017 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.
+//
+
+// Android Unit Test target
+android_test {
+ name: "CollectorDeviceLibTest",
+ defaults: ["tradefed_errorprone_defaults"],
+
+ srcs: ["java/**/*.java"],
+ static_libs: [
+ "androidx-test",
+ "collector-device-lib",
+ "junit",
+ "mockito-target-minus-junit4",
+ ],
+
+ sdk_version: "current",
+
+ test_suites: ["general-tests"],
+}
diff --git a/libraries/device-collectors/src/test/Android.mk b/libraries/device-collectors/src/test/Android.mk
deleted file mode 100644
index 4d1df25..0000000
--- a/libraries/device-collectors/src/test/Android.mk
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Copyright (C) 2017 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.
-#
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-# Android Unit Test target
-LOCAL_SRC_FILES := $(call all-java-files-under, java)
-LOCAL_STATIC_JAVA_LIBRARIES += \
- androidx-test \
- collector-device-lib \
- junit \
- mockito-target-minus-junit4
-
-LOCAL_DEX_PREOPT := false
-LOCAL_PROGUARD_ENABLED := disabled
-LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
-LOCAL_MODULE_TAGS := optional
-LOCAL_PACKAGE_NAME := CollectorDeviceLibTest
-LOCAL_SDK_VERSION := current
-LOCAL_USE_AAPT2 := true
-
-LOCAL_COMPATIBILITY_SUITE := general-tests
-
--include tools/tradefederation/core/error_prone_rules.mk
-include $(BUILD_PACKAGE)
diff --git a/libraries/junitxml/Android.bp b/libraries/junitxml/Android.bp
new file mode 100644
index 0000000..b090147
--- /dev/null
+++ b/libraries/junitxml/Android.bp
@@ -0,0 +1,21 @@
+//
+// Copyright (C) 2017 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.
+//
+
+java_library {
+ name: "junitxml",
+ static_libs: ["junit"],
+ srcs: ["src/**/*.java"],
+}
diff --git a/libraries/junitxml/Android.mk b/libraries/junitxml/Android.mk
deleted file mode 100644
index 41e17b8..0000000
--- a/libraries/junitxml/Android.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (C) 2017 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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := junitxml
-LOCAL_STATIC_JAVA_LIBRARIES := junit
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
diff --git a/libraries/launcher-helper/Android.bp b/libraries/launcher-helper/Android.bp
new file mode 100644
index 0000000..6c8affa
--- /dev/null
+++ b/libraries/launcher-helper/Android.bp
@@ -0,0 +1,31 @@
+//
+// Copyright (C) 2015 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.
+//
+
+java_library {
+ name: "launcher-helper-lib",
+ libs: [
+ "ub-uiautomator",
+ "android-support-test",
+ "activity-helper",
+ ],
+ static_libs: [
+ "dpad-util",
+ "commands-helper",
+ "activity-helper",
+ ],
+ sdk_version: "test_current",
+ srcs: ["src/**/*.java"],
+}
diff --git a/libraries/launcher-helper/Android.mk b/libraries/launcher-helper/Android.mk
deleted file mode 100644
index 4924911..0000000
--- a/libraries/launcher-helper/Android.mk
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (C) 2015 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.
-#
-
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := launcher-helper-lib
-LOCAL_JAVA_LIBRARIES := ub-uiautomator \
- android-support-test \
- activity-helper
-LOCAL_STATIC_JAVA_LIBRARIES := dpad-util commands-helper activity-helper
-LOCAL_SDK_VERSION := test_current
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/libraries/longevity/Android.mk b/libraries/longevity/Android.mk
deleted file mode 100644
index 488bd46..0000000
--- a/libraries/longevity/Android.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Copyright (C) 2017 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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(call all-makefiles-under, $(LOCAL_PATH))
diff --git a/libraries/longevity/samples/Android.bp b/libraries/longevity/samples/Android.bp
new file mode 100644
index 0000000..4d5fb92
--- /dev/null
+++ b/libraries/longevity/samples/Android.bp
@@ -0,0 +1,31 @@
+//
+// Copyright (C) 2017 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.
+//
+
+java_library_host {
+ name: "LongevityHostLibSamples",
+ static_libs: ["longevity-host-lib"],
+ srcs: ["src/android/longevity/core/**/*.java"],
+}
+
+//#####################################
+
+android_test {
+ name: "LongevityPlatformLibSamples",
+
+ sdk_version: "24",
+ static_libs: ["longevity-device-lib"],
+ srcs: ["src/android/longevity/platform/**/*.java"],
+}
diff --git a/libraries/longevity/samples/Android.mk b/libraries/longevity/samples/Android.mk
deleted file mode 100644
index 66b232e..0000000
--- a/libraries/longevity/samples/Android.mk
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# Copyright (C) 2017 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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := LongevityHostLibSamples
-LOCAL_STATIC_JAVA_LIBRARIES := longevity-host-lib
-LOCAL_SRC_FILES := $(call all-java-files-under, src/android/longevity/core)
-include $(BUILD_HOST_JAVA_LIBRARY)
-
-######################################
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-LOCAL_PACKAGE_NAME := LongevityPlatformLibSamples
-LOCAL_SDK_VERSION := 24
-LOCAL_STATIC_JAVA_LIBRARIES := longevity-device-lib
-LOCAL_SRC_FILES := $(call all-java-files-under, src/android/longevity/platform)
-include $(BUILD_PACKAGE)
-
diff --git a/libraries/longevity/tests/Android.bp b/libraries/longevity/tests/Android.bp
new file mode 100644
index 0000000..aab4f8b
--- /dev/null
+++ b/libraries/longevity/tests/Android.bp
@@ -0,0 +1,43 @@
+//
+// Copyright (C) 2017 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.
+//
+
+java_test_host {
+ name: "LongevityHostLibTests",
+ static_libs: [
+ "longevity-host-lib",
+ "mockito-host",
+ "truth-host-prebuilt",
+ "guavalib",
+ "objenesis-host",
+ ],
+ srcs: ["src/android/longevity/core//**/*.java"],
+}
+
+//##########################
+
+android_test {
+ name: "LongevityPlatformLibTests",
+
+ sdk_version: "24",
+ static_libs: [
+ "longevity-device-lib",
+ "mockito-target",
+ "truth-prebuilt",
+ "guava",
+ ],
+ srcs: ["src/android/longevity/platform//**/*.java"],
+ test_suites: ["device-tests"],
+}
diff --git a/libraries/longevity/tests/Android.mk b/libraries/longevity/tests/Android.mk
deleted file mode 100644
index 4bb663f..0000000
--- a/libraries/longevity/tests/Android.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# Copyright (C) 2017 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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := LongevityHostLibTests
-LOCAL_STATIC_JAVA_LIBRARIES := longevity-host-lib mockito-host truth-host-prebuilt guavalib objenesis-host
-LOCAL_SRC_FILES := $(call all-java-files-under, src/android/longevity/core/)
-
-include $(BUILD_HOST_JAVA_LIBRARY)
-
-###########################
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-LOCAL_PACKAGE_NAME := LongevityPlatformLibTests
-LOCAL_SDK_VERSION := 24
-LOCAL_STATIC_JAVA_LIBRARIES := longevity-device-lib mockito-target truth-prebuilt guava
-LOCAL_SRC_FILES := $(call all-java-files-under, src/android/longevity/platform/)
-LOCAL_COMPATIBILITY_SUITE := device-tests
-
-include $(BUILD_PACKAGE)
diff --git a/libraries/metrics-helper/tests/Android.bp b/libraries/metrics-helper/tests/Android.bp
new file mode 100644
index 0000000..02a9cc0
--- /dev/null
+++ b/libraries/metrics-helper/tests/Android.bp
@@ -0,0 +1,33 @@
+// Copyright (C) 2017 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.
+
+android_test {
+ name: "MetricsHelperTests",
+
+ platform_apis: true,
+
+ srcs: ["src/**/*.java"],
+
+ libs: [
+ "android.test.runner",
+ "android.test.base",
+ ],
+ static_libs: [
+ "android-support-test",
+ "mockito-target-minus-junit4",
+ "platform-test-annotations",
+ "metrics-helper-lib",
+ "framework-protos",
+ ],
+}
diff --git a/libraries/metrics-helper/tests/Android.mk b/libraries/metrics-helper/tests/Android.mk
deleted file mode 100644
index 120a253..0000000
--- a/libraries/metrics-helper/tests/Android.mk
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright (C) 2017 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.
-
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-
-LOCAL_PACKAGE_NAME := MetricsHelperTests
-LOCAL_PRIVATE_PLATFORM_APIS := true
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_JAVA_LIBRARIES := android.test.runner android.test.base
-LOCAL_STATIC_JAVA_LIBRARIES := \
- android-support-test \
- mockito-target-minus-junit4 \
- platform-test-annotations \
- metrics-helper-lib \
- framework-protos
-
-include $(BUILD_PACKAGE)
-
diff --git a/libraries/microbenchmark/Android.bp b/libraries/microbenchmark/Android.bp
new file mode 100644
index 0000000..8ab424b
--- /dev/null
+++ b/libraries/microbenchmark/Android.bp
@@ -0,0 +1,26 @@
+// Copyright (C) 2018 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.
+
+java_library {
+ name: "microbenchmark-device-lib",
+ sdk_version: "current",
+ static_libs: [
+ "androidx-test",
+ "platform-test-composers",
+ ],
+
+ srcs: ["src/**/*.java"],
+}
+
+//#####################################
diff --git a/libraries/microbenchmark/Android.mk b/libraries/microbenchmark/Android.mk
deleted file mode 100644
index bf82ce7..0000000
--- a/libraries/microbenchmark/Android.mk
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright (C) 2018 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.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := microbenchmark-device-lib
-LOCAL_SDK_VERSION := current
-LOCAL_STATIC_JAVA_LIBRARIES := androidx-test platform-test-composers
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src/)
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-######################################
-
-include $(call all-makefiles-under, $(LOCAL_PATH))
diff --git a/libraries/microbenchmark/tests/Android.bp b/libraries/microbenchmark/tests/Android.bp
new file mode 100644
index 0000000..359bc77
--- /dev/null
+++ b/libraries/microbenchmark/tests/Android.bp
@@ -0,0 +1,25 @@
+// Copyright (C) 2018 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.
+
+android_test {
+ name: "MicrobenchmarkRunnerTests",
+
+ sdk_version: "current",
+ static_libs: [
+ "microbenchmark-device-lib",
+ "truth-prebuilt",
+ ],
+ srcs: ["src/**/*.java"],
+ test_suites: ["device-tests"],
+}
diff --git a/libraries/microbenchmark/tests/Android.mk b/libraries/microbenchmark/tests/Android.mk
deleted file mode 100644
index 8810016..0000000
--- a/libraries/microbenchmark/tests/Android.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright (C) 2018 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.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-LOCAL_PACKAGE_NAME := MicrobenchmarkRunnerTests
-LOCAL_SDK_VERSION := current
-LOCAL_STATIC_JAVA_LIBRARIES := microbenchmark-device-lib truth-prebuilt
-LOCAL_SRC_FILES := $(call all-java-files-under, src/)
-LOCAL_COMPATIBILITY_SUITE := device-tests
-
-include $(BUILD_PACKAGE)
diff --git a/libraries/power-helper/Android.bp b/libraries/power-helper/Android.bp
new file mode 100644
index 0000000..9687f93
--- /dev/null
+++ b/libraries/power-helper/Android.bp
@@ -0,0 +1,30 @@
+//
+// Copyright (C) 2014 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.
+//
+
+java_library {
+ name: "PowerTestHelper-src",
+
+ srcs: ["src/**/*.java"],
+
+ sdk_version: "current",
+
+ libs: [
+ "android.test.runner.stubs",
+ "ub-uiautomator",
+ "android.test.base.stubs",
+ ],
+ static_libs: ["junit"],
+}
diff --git a/libraries/power-helper/Android.mk b/libraries/power-helper/Android.mk
deleted file mode 100644
index 601b86b..0000000
--- a/libraries/power-helper/Android.mk
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# Copyright (C) 2014 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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_MODULE := PowerTestHelper-src
-LOCAL_SDK_VERSION := current
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_JAVA_LIBRARIES := android.test.runner.stubs ub-uiautomator android.test.base.stubs
-LOCAL_STATIC_JAVA_LIBRARIES := junit
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/libraries/power-helper/sample/Android.bp b/libraries/power-helper/sample/Android.bp
new file mode 100644
index 0000000..61d6bc6
--- /dev/null
+++ b/libraries/power-helper/sample/Android.bp
@@ -0,0 +1,12 @@
+android_test {
+ name: "DummyPowerTest",
+ srcs: ["src/**/*.java"],
+
+ static_libs: [
+ "PowerTestHelper-src",
+ "android.test.runner.stubs",
+ "ub-uiautomator",
+ "android.test.base.stubs",
+ "junit",
+ ],
+}
diff --git a/libraries/power-helper/sample/Android.mk b/libraries/power-helper/sample/Android.mk
deleted file mode 100644
index b73f734..0000000
--- a/libraries/power-helper/sample/Android.mk
+++ /dev/null
@@ -1,10 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_PACKAGE_NAME := DummyPowerTest
-LOCAL_MODULE_TAGS := tests
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_STATIC_JAVA_LIBRARIES := PowerTestHelper-src ub-uiautomator junit
-
-include $(BUILD_PACKAGE)
diff --git a/libraries/rule/Android.bp b/libraries/rule/Android.bp
new file mode 100644
index 0000000..0712238
--- /dev/null
+++ b/libraries/rule/Android.bp
@@ -0,0 +1,25 @@
+// Copyright (C) 2018 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.
+
+java_library {
+ name: "platform-test-rules",
+ sdk_version: "current",
+ static_libs: [
+ "androidx-test",
+ "ub-uiautomator",
+ ],
+ srcs: ["src/**/*.java"],
+}
+
+//#####################################
diff --git a/libraries/rule/Android.mk b/libraries/rule/Android.mk
deleted file mode 100644
index b80821c..0000000
--- a/libraries/rule/Android.mk
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright (C) 2018 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.
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := platform-test-rules
-LOCAL_SDK_VERSION := current
-LOCAL_STATIC_JAVA_LIBRARIES := androidx-test ub-uiautomator
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-######################################
-
-include $(call all-makefiles-under, $(LOCAL_PATH))
diff --git a/libraries/rule/tests/Android.bp b/libraries/rule/tests/Android.bp
new file mode 100644
index 0000000..2a86310
--- /dev/null
+++ b/libraries/rule/tests/Android.bp
@@ -0,0 +1,30 @@
+//
+// Copyright (C) 2018 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.
+//
+
+android_test {
+ name: "PlatformRuleTests",
+ defaults: ["tradefed_errorprone_defaults"],
+
+ sdk_version: "current",
+ static_libs: [
+ "platform-test-rules",
+ "truth-prebuilt",
+ "guava",
+ "mockito-target",
+ ],
+ srcs: ["src/**/*.java"],
+ test_suites: ["device-tests"],
+}
diff --git a/libraries/rule/tests/Android.mk b/libraries/rule/tests/Android.mk
deleted file mode 100644
index ba967a8..0000000
--- a/libraries/rule/tests/Android.mk
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Copyright (C) 2018 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.
-#
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-LOCAL_PACKAGE_NAME := PlatformRuleTests
-LOCAL_SDK_VERSION := current
-LOCAL_STATIC_JAVA_LIBRARIES := platform-test-rules truth-prebuilt guava mockito-target
-LOCAL_SRC_FILES := $(call all-java-files-under, src/)
-LOCAL_COMPATIBILITY_SUITE := device-tests
-
--include tools/tradefederation/core/error_prone_rules.mk
-
-include $(BUILD_PACKAGE)
diff --git a/libraries/system-helpers/Android.bp b/libraries/system-helpers/Android.bp
new file mode 100644
index 0000000..e18bf66
--- /dev/null
+++ b/libraries/system-helpers/Android.bp
@@ -0,0 +1,35 @@
+//
+// Copyright (C) 2016 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.
+//
+
+java_library {
+ name: "system-helpers",
+ static_libs: [
+ "account-helper",
+ "activity-helper",
+ "commands-helper",
+ "connectivity-helper",
+ "device-helper",
+ "permission-helper",
+ "settings-helper",
+ "sysui-helper",
+ "user-helper",
+ "package-helper",
+ "accessibility-helper",
+ ],
+ sdk_version: "test_current",
+}
+
+//#####################################
diff --git a/libraries/system-helpers/Android.mk b/libraries/system-helpers/Android.mk
deleted file mode 100644
index d2de885..0000000
--- a/libraries/system-helpers/Android.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# Copyright (C) 2016 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.
-#
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := system-helpers
-LOCAL_STATIC_JAVA_LIBRARIES := account-helper \
- activity-helper \
- commands-helper \
- connectivity-helper \
- device-helper \
- permission-helper \
- settings-helper \
- sysui-helper \
- user-helper \
- package-helper \
- accessibility-helper
-LOCAL_SDK_VERSION := current
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-######################################
-
-include $(call all-makefiles-under, $(LOCAL_PATH))
diff --git a/libraries/system-helpers/accessibility-helper/Android.bp b/libraries/system-helpers/accessibility-helper/Android.bp
new file mode 100644
index 0000000..458ce24
--- /dev/null
+++ b/libraries/system-helpers/accessibility-helper/Android.bp
@@ -0,0 +1,28 @@
+//
+// Copyright (C) 2017 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.
+//
+
+java_library {
+ name: "accessibility-helper",
+ libs: [
+ "android-support-test",
+ "ub-uiautomator",
+ "settings-helper",
+ "package-helper",
+ "activity-helper",
+ ],
+ srcs: ["src/**/*.java"],
+ sdk_version: "current",
+}
diff --git a/libraries/system-helpers/accessibility-helper/Android.mk b/libraries/system-helpers/accessibility-helper/Android.mk
deleted file mode 100644
index 93c51c3..0000000
--- a/libraries/system-helpers/accessibility-helper/Android.mk
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright (C) 2017 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.
-#
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := accessibility-helper
-LOCAL_JAVA_LIBRARIES := android-support-test \
- ub-uiautomator \
- settings-helper \
- package-helper \
- activity-helper
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_SDK_VERSION := current
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/libraries/system-helpers/account-helper/Android.bp b/libraries/system-helpers/account-helper/Android.bp
new file mode 100644
index 0000000..661f36f
--- /dev/null
+++ b/libraries/system-helpers/account-helper/Android.bp
@@ -0,0 +1,27 @@
+//
+// Copyright (C) 2016 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.
+//
+
+java_library {
+ name: "account-helper",
+ libs: [
+ "ub-uiautomator",
+ "android-support-test",
+ "activity-helper",
+ "device-helper",
+ ],
+ srcs: ["src/**/*.java"],
+ sdk_version: "current",
+}
diff --git a/libraries/system-helpers/account-helper/Android.mk b/libraries/system-helpers/account-helper/Android.mk
deleted file mode 100644
index 204b702..0000000
--- a/libraries/system-helpers/account-helper/Android.mk
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Copyright (C) 2016 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.
-#
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := account-helper
-LOCAL_JAVA_LIBRARIES := ub-uiautomator \
- android-support-test \
- activity-helper \
- device-helper
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_SDK_VERSION := current
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/libraries/system-helpers/activity-helper/Android.bp b/libraries/system-helpers/activity-helper/Android.bp
new file mode 100644
index 0000000..9085af6
--- /dev/null
+++ b/libraries/system-helpers/activity-helper/Android.bp
@@ -0,0 +1,26 @@
+//
+// Copyright (C) 2016 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.
+//
+
+java_library {
+ name: "activity-helper",
+ libs: [
+ "ub-uiautomator",
+ "android-support-test",
+ "commands-helper",
+ ],
+ srcs: ["src/**/*.java"],
+ sdk_version: "current",
+}
diff --git a/libraries/system-helpers/activity-helper/Android.mk b/libraries/system-helpers/activity-helper/Android.mk
deleted file mode 100644
index 1b36249..0000000
--- a/libraries/system-helpers/activity-helper/Android.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (C) 2016 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.
-#
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := activity-helper
-LOCAL_JAVA_LIBRARIES := ub-uiautomator \
- android-support-test \
- commands-helper
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_SDK_VERSION := current
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/libraries/system-helpers/commands-helper/Android.bp b/libraries/system-helpers/commands-helper/Android.bp
new file mode 100644
index 0000000..82ae6fc
--- /dev/null
+++ b/libraries/system-helpers/commands-helper/Android.bp
@@ -0,0 +1,25 @@
+//
+// Copyright (C) 2016 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.
+//
+
+java_library {
+ name: "commands-helper",
+ libs: [
+ "ub-uiautomator",
+ "android-support-test",
+ ],
+ srcs: ["src/**/*.java"],
+ sdk_version: "current",
+}
diff --git a/libraries/system-helpers/commands-helper/Android.mk b/libraries/system-helpers/commands-helper/Android.mk
deleted file mode 100644
index 7961f65..0000000
--- a/libraries/system-helpers/commands-helper/Android.mk
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# Copyright (C) 2016 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.
-#
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := commands-helper
-LOCAL_JAVA_LIBRARIES := ub-uiautomator \
- android-support-test
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_SDK_VERSION := current
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/libraries/system-helpers/connectivity-helper/Android.bp b/libraries/system-helpers/connectivity-helper/Android.bp
new file mode 100644
index 0000000..3287fed
--- /dev/null
+++ b/libraries/system-helpers/connectivity-helper/Android.bp
@@ -0,0 +1,25 @@
+//
+// Copyright (C) 2016 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.
+//
+
+java_library {
+ name: "connectivity-helper",
+ static_libs: [
+ "ub-uiautomator",
+ "android-support-test",
+ ],
+ srcs: ["src/**/*.java"],
+ sdk_version: "current",
+}
diff --git a/libraries/system-helpers/connectivity-helper/Android.mk b/libraries/system-helpers/connectivity-helper/Android.mk
deleted file mode 100644
index 925f87d..0000000
--- a/libraries/system-helpers/connectivity-helper/Android.mk
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# Copyright (C) 2016 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.
-#
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := connectivity-helper
-LOCAL_STATIC_JAVA_LIBRARIES := ub-uiautomator \
- android-support-test
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_SDK_VERSION := current
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/libraries/system-helpers/device-helper/Android.bp b/libraries/system-helpers/device-helper/Android.bp
new file mode 100644
index 0000000..df2bf33
--- /dev/null
+++ b/libraries/system-helpers/device-helper/Android.bp
@@ -0,0 +1,25 @@
+//
+// Copyright (C) 2016 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.
+//
+
+java_library {
+ name: "device-helper",
+ libs: [
+ "ub-uiautomator",
+ "android-support-test",
+ ],
+ srcs: ["src/**/*.java"],
+ sdk_version: "current",
+}
diff --git a/libraries/system-helpers/device-helper/Android.mk b/libraries/system-helpers/device-helper/Android.mk
deleted file mode 100644
index 661a0ac..0000000
--- a/libraries/system-helpers/device-helper/Android.mk
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# Copyright (C) 2016 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.
-#
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := device-helper
-LOCAL_JAVA_LIBRARIES := ub-uiautomator android-support-test
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_SDK_VERSION := current
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/libraries/system-helpers/package-helper/Android.bp b/libraries/system-helpers/package-helper/Android.bp
new file mode 100644
index 0000000..53de797
--- /dev/null
+++ b/libraries/system-helpers/package-helper/Android.bp
@@ -0,0 +1,22 @@
+//
+// Copyright (C) 2016 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.
+//
+
+java_library {
+ name: "package-helper",
+ libs: ["commands-helper"],
+ srcs: ["src/**/*.java"],
+ sdk_version: "current",
+}
diff --git a/libraries/system-helpers/package-helper/Android.mk b/libraries/system-helpers/package-helper/Android.mk
deleted file mode 100644
index 3a06fc6..0000000
--- a/libraries/system-helpers/package-helper/Android.mk
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# Copyright (C) 2016 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.
-#
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := package-helper
-LOCAL_JAVA_LIBRARIES := commands-helper
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_SDK_VERSION := current
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/libraries/system-helpers/permission-helper/Android.bp b/libraries/system-helpers/permission-helper/Android.bp
new file mode 100644
index 0000000..b2a21c5
--- /dev/null
+++ b/libraries/system-helpers/permission-helper/Android.bp
@@ -0,0 +1,26 @@
+//
+// Copyright (C) 2016 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.
+//
+
+java_library {
+ name: "permission-helper",
+ static_libs: [
+ "ub-uiautomator",
+ "launcher-helper-lib",
+ "android-support-test",
+ ],
+ srcs: ["src/**/*.java"],
+ sdk_version: "test_current",
+}
diff --git a/libraries/system-helpers/permission-helper/Android.mk b/libraries/system-helpers/permission-helper/Android.mk
deleted file mode 100644
index 8b2f5b1..0000000
--- a/libraries/system-helpers/permission-helper/Android.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (C) 2016 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.
-#
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := permission-helper
-LOCAL_STATIC_JAVA_LIBRARIES := ub-uiautomator \
- launcher-helper-lib \
- android-support-test
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_SDK_VERSION := current
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/libraries/system-helpers/settings-helper/Android.bp b/libraries/system-helpers/settings-helper/Android.bp
new file mode 100644
index 0000000..cad0e16
--- /dev/null
+++ b/libraries/system-helpers/settings-helper/Android.bp
@@ -0,0 +1,26 @@
+//
+// Copyright (C) 2016 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.
+//
+
+java_library {
+ name: "settings-helper",
+ libs: [
+ "ub-uiautomator",
+ "android-support-test",
+ "activity-helper",
+ ],
+ srcs: ["src/**/*.java"],
+ sdk_version: "current",
+}
diff --git a/libraries/system-helpers/settings-helper/Android.mk b/libraries/system-helpers/settings-helper/Android.mk
deleted file mode 100644
index 480042a..0000000
--- a/libraries/system-helpers/settings-helper/Android.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (C) 2016 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.
-#
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := settings-helper
-LOCAL_JAVA_LIBRARIES := ub-uiautomator \
- android-support-test \
- activity-helper
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_SDK_VERSION := current
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/libraries/system-helpers/sysui-helper/Android.bp b/libraries/system-helpers/sysui-helper/Android.bp
new file mode 100644
index 0000000..2316203
--- /dev/null
+++ b/libraries/system-helpers/sysui-helper/Android.bp
@@ -0,0 +1,30 @@
+//
+// Copyright (C) 2016 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.
+//
+
+java_library {
+ name: "sysui-helper",
+ static_libs: [
+ "ub-uiautomator",
+ "android-support-test",
+ "activity-helper",
+ "commands-helper",
+ "device-helper",
+ "app-helpers-handheld-interfaces",
+ ],
+
+ srcs: ["src/**/*.java"],
+ sdk_version: "test_current",
+}
diff --git a/libraries/system-helpers/sysui-helper/Android.mk b/libraries/system-helpers/sysui-helper/Android.mk
deleted file mode 100644
index 7a909d3..0000000
--- a/libraries/system-helpers/sysui-helper/Android.mk
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Copyright (C) 2016 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.
-#
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := sysui-helper
-LOCAL_STATIC_JAVA_LIBRARIES := ub-uiautomator \
- android-support-test \
- activity-helper \
- commands-helper \
- device-helper \
- app-helpers-handheld-interfaces \
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_SDK_VERSION := current
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/libraries/system-helpers/user-helper/Android.bp b/libraries/system-helpers/user-helper/Android.bp
new file mode 100644
index 0000000..fb54294
--- /dev/null
+++ b/libraries/system-helpers/user-helper/Android.bp
@@ -0,0 +1,26 @@
+//
+// Copyright (C) 2016 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.
+//
+
+java_library {
+ name: "user-helper",
+ libs: [
+ "ub-uiautomator",
+ "android-support-test",
+ "commands-helper",
+ ],
+ srcs: ["src/**/*.java"],
+ sdk_version: "current",
+}
diff --git a/libraries/system-helpers/user-helper/Android.mk b/libraries/system-helpers/user-helper/Android.mk
deleted file mode 100644
index fba817d..0000000
--- a/libraries/system-helpers/user-helper/Android.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# Copyright (C) 2016 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.
-#
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := user-helper
-LOCAL_JAVA_LIBRARIES := ub-uiautomator \
- android-support-test \
- commands-helper
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_SDK_VERSION := current
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/libraries/timeresult-helper/Android.bp b/libraries/timeresult-helper/Android.bp
new file mode 100644
index 0000000..56c2a8b
--- /dev/null
+++ b/libraries/timeresult-helper/Android.bp
@@ -0,0 +1,21 @@
+//
+// Copyright (C) 2015 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.
+//
+
+java_library {
+ name: "timeresult-helper-lib",
+ sdk_version: "21",
+ srcs: ["src/**/*.java"],
+}
diff --git a/libraries/timeresult-helper/Android.mk b/libraries/timeresult-helper/Android.mk
deleted file mode 100644
index 4c05415..0000000
--- a/libraries/timeresult-helper/Android.mk
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# Copyright (C) 2015 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.
-#
-
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := timeresult-helper-lib
-LOCAL_SDK_VERSION := 21
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-include $(BUILD_STATIC_JAVA_LIBRARY)