Convert frameworks/opt/bitmap to Android.bp

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

Test: m checkbuild
Change-Id: Ifb32e5f0c41534bb2feb969428d133e5274df702
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..5822199
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,23 @@
+// 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.
+
+android_library {
+    name: "android-opt-bitmap",
+    sdk_version: "18",
+    srcs: [
+        "src/**/*.java",
+        "src/**/*.logtags",
+    ],
+    resource_dirs: ["res"],
+}
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index 1eb9c75..0000000
--- a/Android.mk
+++ /dev/null
@@ -1,36 +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)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := android-opt-bitmap
-
-LOCAL_SDK_VERSION := 18
-
-LOCAL_SRC_FILES := \
-     $(call all-java-files-under, src) \
-     $(call all-logtags-files-under, src)
-
-LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
-
-LOCAL_USE_AAPT2 := true
-
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-
-##################################################
-# Build all sub-directories
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/sample/Android.bp b/sample/Android.bp
new file mode 100644
index 0000000..89ce889
--- /dev/null
+++ b/sample/Android.bp
@@ -0,0 +1,29 @@
+// 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.
+
+android_app {
+    name: "bitmapcache-sample",
+    static_libs: ["android-opt-bitmap"],
+    sdk_version: "18",
+    srcs: [
+        "src/**/*.java",
+        "src/**/*.logtags",
+    ],
+    resource_dirs: ["res"],
+
+    optimize: {
+        proguard_flags_files: ["proguard-config.pro"],
+    },
+
+}
diff --git a/sample/Android.mk b/sample/Android.mk
deleted file mode 100644
index 0d58ffd..0000000
--- a/sample/Android.mk
+++ /dev/null
@@ -1,39 +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)
-include $(CLEAR_VARS)
-
-LOCAL_PACKAGE_NAME := bitmapcache-sample
-
-LOCAL_STATIC_ANDROID_LIBRARIES += android-opt-bitmap
-
-LOCAL_SDK_VERSION := 18
-
-LOCAL_SRC_FILES := \
-     $(call all-java-files-under, src) \
-     $(call all-logtags-files-under, src)
-
-LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
-
-LOCAL_USE_AAPT2 := true
-
-LOCAL_PROGUARD_FLAG_FILES := proguard-config.pro
-
-include $(BUILD_PACKAGE)
-
-##################################################
-# Build all sub-directories
-
-include $(call all-makefiles-under,$(LOCAL_PATH))