Merge "Convert host java prebuilts to Android.bp"
am: 84b18de9d4

Change-Id: I339224b888e930f3fdacf94edab60ceda4e16fac
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..c2a0c28
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1 @@
+subdirs=["*"]
diff --git a/common/Android.bp b/common/Android.bp
new file mode 100644
index 0000000..c2a0c28
--- /dev/null
+++ b/common/Android.bp
@@ -0,0 +1 @@
+subdirs=["*"]
diff --git a/common/asm/Android.bp b/common/asm/Android.bp
new file mode 100644
index 0000000..1cfd948
--- /dev/null
+++ b/common/asm/Android.bp
@@ -0,0 +1,54 @@
+// 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_import_host {
+    name: "asm-5.2",
+    jars: ["asm-5.2.jar"],
+}
+
+java_import_host {
+    name: "asm-analysis-5.2",
+    jars: ["asm-analysis-5.2.jar"],
+}
+
+java_import_host {
+    name: "asm-commons-5.2",
+    jars: ["asm-commons-5.2.jar"],
+}
+
+java_import_host {
+    name: "asm-tree-5.2",
+    jars: ["asm-tree-5.2.jar"],
+}
+
+java_import_host {
+    name: "asm-6.0_BETA",
+    jars: ["asm-6.0_BETA.jar"],
+}
+
+java_import_host {
+    name: "asm-analysis-6.0_BETA",
+    jars: ["asm-analysis-6.0_BETA.jar"],
+}
+
+java_import_host {
+    name: "asm-commons-6.0_BETA",
+    jars: ["asm-commons-6.0_BETA.jar"],
+}
+
+java_import_host {
+    name: "asm-tree-6.0_BETA",
+    jars: ["asm-tree-6.0_BETA.jar"],
+}
+
diff --git a/common/asm/Android.mk b/common/asm/Android.mk
deleted file mode 100644
index 0211d9d..0000000
--- a/common/asm/Android.mk
+++ /dev/null
@@ -1,29 +0,0 @@
-# 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.
-
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_PREBUILT_JAVA_LIBRARIES := \
-    asm-5.2.jar \
-    asm-analysis-5.2.jar \
-    asm-commons-5.2.jar \
-    asm-tree-5.2.jar \
-    asm-6.0_BETA.jar \
-    asm-analysis-6.0_BETA.jar \
-    asm-commons-6.0_BETA.jar \
-    asm-tree-6.0_BETA.jar \
-
-include $(BUILD_HOST_PREBUILT)
diff --git a/common/error_prone_annotations/Android.bp b/common/error_prone_annotations/Android.bp
new file mode 100644
index 0000000..8fb3d7d
--- /dev/null
+++ b/common/error_prone_annotations/Android.bp
@@ -0,0 +1,18 @@
+// 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.
+
+java_import_host {
+    name: "error_prone_annotations-2.0.18",
+    jars: ["error_prone_annotations-2.0.18.jar"],
+}
diff --git a/common/error_prone_annotations/Android.mk b/common/error_prone_annotations/Android.mk
deleted file mode 100644
index 1112021..0000000
--- a/common/error_prone_annotations/Android.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-# 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.
-
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_PREBUILT_JAVA_LIBRARIES := \
-    error_prone_annotations-2.0.18.jar \
-
-include $(BUILD_HOST_PREBUILT)
diff --git a/common/guava/Android.bp b/common/guava/Android.bp
new file mode 100644
index 0000000..7089366
--- /dev/null
+++ b/common/guava/Android.bp
@@ -0,0 +1,23 @@
+// 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_import_host {
+    name: "guava-18.0-prebuilt",
+    jars: ["guava-18.0.jar"],
+}
+
+java_import_host {
+    name: "guava-21.0",
+    jars: ["guava-21.0.jar"],
+}
diff --git a/common/guava/Android.mk b/common/guava/Android.mk
deleted file mode 100644
index aea07c4..0000000
--- a/common/guava/Android.mk
+++ /dev/null
@@ -1,33 +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 := guava-18.0-prebuilt
-LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := guava-18.0.jar
-LOCAL_IS_HOST_MODULE := true
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-LOCAL_BUILT_MODULE_STEM := javalib.jar
-LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
-
-include $(BUILD_PREBUILT)
-
-include $(CLEAR_VARS)
-LOCAL_PREBUILT_JAVA_LIBRARIES := \
-    guava-21.0.jar
-
-include $(BUILD_HOST_PREBUILT)
diff --git a/common/jsr305/Android.bp b/common/jsr305/Android.bp
new file mode 100644
index 0000000..62d9548
--- /dev/null
+++ b/common/jsr305/Android.bp
@@ -0,0 +1,18 @@
+// 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_import_host {
+    name: "jsr305-3.0.1",
+    jars: ["jsr305-3.0.1.jar"],
+}
diff --git a/common/jsr305/Android.mk b/common/jsr305/Android.mk
deleted file mode 100644
index 9d79d99..0000000
--- a/common/jsr305/Android.mk
+++ /dev/null
@@ -1,21 +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_PREBUILT_JAVA_LIBRARIES := \
-    jsr305-3.0.1.jar
-
-include $(BUILD_HOST_PREBUILT)