Convert prebuilts/sdk/renderscript to Android.bp

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

Bug: 153485543
Test: m checkbuild
Change-Id: Iacc877f9321dc3628f29047175c17542eb85c221
diff --git a/renderscript/Android.bp b/renderscript/Android.bp
new file mode 100644
index 0000000..42a2748
--- /dev/null
+++ b/renderscript/Android.bp
@@ -0,0 +1,95 @@
+//
+// Copyright (C) 2013 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.
+//
+
+//#################################
+cc_prebuilt_library_shared {
+    name: "librsjni",
+    sdk_version: "23",
+    arch: {
+        arm: {
+            srcs: ["lib/arm/librsjni.so"],
+        },
+        arm64: {
+            srcs: ["lib/arm64/librsjni.so"],
+        },
+        x86: {
+            srcs: ["lib/x86/librsjni.so"],
+        },
+        x86_64: {
+            srcs: ["lib/x86_64/librsjni.so"],
+        },
+    },
+}
+
+//#################################
+cc_prebuilt_library_shared {
+    name: "libRSSupport",
+    sdk_version: "23",
+    arch: {
+        arm: {
+            srcs: ["lib/arm/libRSSupport.so"],
+        },
+        arm64: {
+            srcs: ["lib/arm64/libRSSupport.so"],
+        },
+        x86: {
+            srcs: ["lib/x86/libRSSupport.so"],
+        },
+        x86_64: {
+            srcs: ["lib/x86_64/libRSSupport.so"],
+        },
+    },
+}
+
+//#################################
+cc_prebuilt_library_shared {
+    name: "libRSSupportIO",
+    sdk_version: "23",
+    arch: {
+        arm: {
+            srcs: ["lib/arm/libRSSupportIO.so"],
+        },
+        arm64: {
+            srcs: ["lib/arm64/libRSSupportIO.so"],
+        },
+        x86: {
+            srcs: ["lib/x86/libRSSupportIO.so"],
+        },
+        x86_64: {
+            srcs: ["lib/x86_64/libRSSupportIO.so"],
+        },
+    },
+}
+
+//#################################
+java_import {
+    name: "android-support-v8-renderscript",
+    jars: ["lib/javalib.jar"],
+
+    // 23 as specified at frameworks/rs/support/Android.mk
+    sdk_version: "23",
+}
+
+//#################################
+java_import {
+    name: "android-support-v8-renderscript-legacy",
+    jars: ["lib/javalib_legacy.jar"],
+
+    // 23 as specified at frameworks/rs/support/Android.mk
+    sdk_version: "23",
+}
+
+//#################################
diff --git a/renderscript/Android.mk b/renderscript/Android.mk
deleted file mode 100644
index fb4b043..0000000
--- a/renderscript/Android.mk
+++ /dev/null
@@ -1,84 +0,0 @@
-#
-# Copyright (C) 2013 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)
-
-ifneq (,$(TARGET_BUILD_APPS))
-
-##################################
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := librsjni
-LOCAL_SRC_FILES := lib/$(TARGET_ARCH)/$(LOCAL_MODULE).so
-LOCAL_MODULE_CLASS := SHARED_LIBRARIES
-LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE_SUFFIX := .so
-
-include $(BUILD_PREBUILT)
-
-##################################
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := libRSSupport
-LOCAL_SRC_FILES := lib/$(TARGET_ARCH)/$(LOCAL_MODULE).so
-LOCAL_MODULE_CLASS := SHARED_LIBRARIES
-LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE_SUFFIX := .so
-
-include $(BUILD_PREBUILT)
-
-##################################
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := libRSSupportIO
-LOCAL_SRC_FILES := lib/$(TARGET_ARCH)/$(LOCAL_MODULE).so
-LOCAL_MODULE_CLASS := SHARED_LIBRARIES
-LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE_SUFFIX := .so
-
-include $(BUILD_PREBUILT)
-
-##################################
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := android-support-v8-renderscript
-LOCAL_SRC_FILES := lib/javalib.jar
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE_SUFFIX := .jar
-LOCAL_UNINSTALLABLE_MODULE := true
-# 23 as specified at frameworks/rs/support/Android.mk
-LOCAL_SDK_VERSION := 23
-
-include $(BUILD_PREBUILT)
-
-##################################
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := android-support-v8-renderscript-legacy
-LOCAL_SRC_FILES := lib/javalib_legacy.jar
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE_SUFFIX := .jar
-LOCAL_UNINSTALLABLE_MODULE := true
-# 23 as specified at frameworks/rs/support/Android.mk
-LOCAL_SDK_VERSION := 23
-
-include $(BUILD_PREBUILT)
-
-##################################
-
-endif # TARGET_BUILD_APPS