Convert mts to Android.bp

See build/soong/README.md for more information.

Fixes: 144288768
Test: m mts-tradefed mts-tradefed-tests
Test: treehugger
Change-Id: I5ad690d6f37cd8eac65272bbb70df8849fb4ba7d
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index 8b31d1e..0000000
--- a/Android.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# Copyright (C) 2019 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)
-ACTUAL_LOCAL_PATH := $(LOCAL_PATH)
-
-# all-makefiles-under only searches one level of dir - meaning every new dir
-# must have Android.mk to include all makefiles under it.
-include $(call all-makefiles-under,$(ACTUAL_LOCAL_PATH))
diff --git a/tests/Android.mk b/tests/Android.mk
deleted file mode 100644
index d4f99e1..0000000
--- a/tests/Android.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# Copyright (C) 2019 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.
-#
-
-include $(call all-subdir-makefiles)
diff --git a/tools/Android.mk b/tools/Android.mk
deleted file mode 100644
index d4f99e1..0000000
--- a/tools/Android.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# Copyright (C) 2019 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.
-#
-
-include $(call all-subdir-makefiles)
diff --git a/tools/mts-tradefed/Android.bp b/tools/mts-tradefed/Android.bp
new file mode 100644
index 0000000..a962efc
--- /dev/null
+++ b/tools/mts-tradefed/Android.bp
@@ -0,0 +1,24 @@
+//
+// Copyright (C) 2019 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.
+
+tradefed_binary_host {
+    name: "mts-tradefed",
+    wrapper: "etc/mts-tradefed",
+    short_name: "MTS",
+    full_name: "Mainline Test Suite",
+    version: "1.0",
+    static_libs: ["cts-tradefed-harness"],
+    java_resource_dirs: ["res"],
+}
diff --git a/tools/mts-tradefed/Android.mk b/tools/mts-tradefed/Android.mk
deleted file mode 100644
index 7ac2f70..0000000
--- a/tools/mts-tradefed/Android.mk
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# Copyright (C) 2019 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_JAVA_RESOURCE_DIRS := res
-
-LOCAL_SUITE_BUILD_NUMBER := $(BUILD_NUMBER_FROM_FILE)
-LOCAL_SUITE_TARGET_ARCH := $(TARGET_ARCH)
-LOCAL_SUITE_NAME := MTS
-LOCAL_SUITE_FULLNAME := "Mainline Test Suite"
-LOCAL_SUITE_VERSION := 1.0
-
-LOCAL_STATIC_JAVA_LIBRARIES := cts-tradefed-harness
-LOCAL_MODULE := mts-tradefed
-
-include $(BUILD_COMPATIBILITY_SUITE)
-
-# Build all sub-directories
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/tools/mts-tradefed/etc/Android.mk b/tools/mts-tradefed/etc/Android.mk
deleted file mode 100644
index a99fef9..0000000
--- a/tools/mts-tradefed/etc/Android.mk
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# Copyright (C) 2019 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 := optional
-
-LOCAL_PREBUILT_EXECUTABLES := mts-tradefed
-include $(BUILD_HOST_PREBUILT)
-
diff --git a/tools/mts-tradefed/tests/Android.bp b/tools/mts-tradefed/tests/Android.bp
new file mode 100644
index 0000000..f0db0fc
--- /dev/null
+++ b/tools/mts-tradefed/tests/Android.bp
@@ -0,0 +1,25 @@
+//
+// Copyright (C) 2019 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: "mts-tradefed-tests",
+
+    srcs: ["src/**/*.java"],
+
+    libs: [
+        "tradefed",
+        "mts-tradefed",
+    ],
+}
diff --git a/tools/mts-tradefed/tests/Android.mk b/tools/mts-tradefed/tests/Android.mk
deleted file mode 100644
index 748565e..0000000
--- a/tools/mts-tradefed/tests/Android.mk
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Copyright (C) 2019 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 := mts-tradefed-tests
-LOCAL_MODULE_TAGS := optional
-LOCAL_JAVA_LIBRARIES := tradefed mts-tradefed
-
-include $(BUILD_HOST_JAVA_LIBRARY)
-