Convert Android.mk file to Android.bp
am: c3409e6065
Change-Id: Iebead1b7a08256e891973474bb1ea5523df100f1
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..875c34c
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,30 @@
+android_app {
+ name: "Traceur",
+ platform_apis: true,
+ certificate: "platform",
+ required: ["notify_traceur.sh"],
+ optimize: {
+ proguard_flags_files: ["proguard.flags"],
+ },
+ static_libs: [
+ "androidx.leanback_leanback",
+ "androidx.leanback_leanback-preference",
+ "androidx.legacy_legacy-preference-v14",
+ "androidx.appcompat_appcompat",
+ "androidx.preference_preference",
+ "androidx.recyclerview_recyclerview",
+ "androidx.legacy_legacy-support-v4",
+ ],
+ resource_dirs: ["res"],
+ srcs: ["src/**/*.java"],
+ init_rc: ["traceur.rc"],
+ defaults: [
+ "SettingsLibDefaults",
+ ],
+}
+
+sh_binary {
+ name: "notify_traceur.sh",
+ src: "notify_traceur.sh",
+}
+
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index 6f5c42f..0000000
--- a/Android.mk
+++ /dev/null
@@ -1,40 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_PACKAGE_NAME := Traceur
-LOCAL_PRIVATE_PLATFORM_APIS := true
-LOCAL_CERTIFICATE := platform
-LOCAL_USE_AAPT2 := true
-LOCAL_REQUIRED_MODULES := notify_traceur.sh
-
-LOCAL_PROGUARD_FLAG_FILES += proguard.flags
-
-LOCAL_STATIC_ANDROID_LIBRARIES := \
- androidx.leanback_leanback \
- androidx.leanback_leanback-preference \
- androidx.legacy_legacy-preference-v14 \
- androidx.appcompat_appcompat \
- androidx.preference_preference \
- androidx.recyclerview_recyclerview \
- androidx.legacy_legacy-support-v4
-
-LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_INIT_RC := traceur.rc
-
-include frameworks/base/packages/SettingsLib/common.mk
-
-include $(BUILD_PACKAGE)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := notify_traceur.sh
-LOCAL_SRC_FILES := $(LOCAL_MODULE)
-LOCAL_MODULE_CLASS := EXECUTABLES
-LOCAL_MODULE_PATH := $(TARGET_OUT)/bin
-
-include $(BUILD_PREBUILT)
-
-# Use the following include to make our test apk.
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/uitests/Android.bp b/uitests/Android.bp
new file mode 100644
index 0000000..8393ec0
--- /dev/null
+++ b/uitests/Android.bp
@@ -0,0 +1,24 @@
+// 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: "TraceurUiTests",
+ srcs: ["src/**/*.java"],
+ static_libs: [
+ "androidx.test.rules",
+ "platform-test-annotations",
+ "ub-uiautomator",
+ ],
+ sdk_version: "current",
+ test_suites: ["device-tests"],
+}
diff --git a/uitests/Android.mk b/uitests/Android.mk
deleted file mode 100644
index 81082c8..0000000
--- a/uitests/Android.mk
+++ /dev/null
@@ -1,31 +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_PACKAGE_NAME := TraceurUiTests
-LOCAL_MODULE_TAGS := tests
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_STATIC_JAVA_LIBRARIES := \
- androidx.test.rules \
- platform-test-annotations \
- ub-uiautomator
-
-LOCAL_SDK_VERSION := current
-
-LOCAL_COMPATIBILITY_SUITE := device-tests
-
-include $(BUILD_PACKAGE)