diff options
author | Mark Wei <markwei@google.com> | 2013-10-30 23:17:08 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-10-30 23:17:08 +0000 |
commit | 56b1c7c9a875f6dd7a733e72e3413b4569ac6ef9 (patch) | |
tree | b65a542efcf6f827188b87391355210779ee288a | |
parent | 9c6ac19d4a3d39b7c2992060957920118ff56a65 (diff) | |
parent | 144b2addf23646c813252995dfbc6e8c398df925 (diff) | |
download | bitmap-56b1c7c9a875f6dd7a733e72e3413b4569ac6ef9.tar.gz |
Merge "Make the bitmap sample app buildable in git." into klp-ub-dev
-rw-r--r-- | Android.mk | 6 | ||||
-rw-r--r-- | sample/Android.mk | 22 | ||||
-rw-r--r-- | sample/BUILD | 41 | ||||
-rw-r--r-- | sample/proguard-config.pro | 31 |
4 files changed, 96 insertions, 4 deletions
@@ -26,3 +26,9 @@ LOCAL_SRC_FILES := \ LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res include $(BUILD_STATIC_JAVA_LIBRARY) + + +################################################## +# Build all sub-directories + +include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/sample/Android.mk b/sample/Android.mk index a861182..8d3f786 100644 --- a/sample/Android.mk +++ b/sample/Android.mk @@ -15,14 +15,28 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) -LOCAL_MODULE := com-example-bitmapcache +bitmap_dir := ..//res +res_dirs := $(bitmap_dir) res -LOCAL_SDK_VERSION := 16 +LOCAL_PACKAGE_NAME := bitmapcache-sample + +LOCAL_STATIC_JAVA_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_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dirs)) $(LOCAL_PATH)/res +LOCAL_AAPT_FLAGS := --auto-add-overlay +LOCAL_AAPT_FLAGS += --extra-packages com.android.bitmap + +LOCAL_PROGUARD_FLAG_FILES := proguard-config.pro + +include $(BUILD_PACKAGE) + +################################################## +# Build all sub-directories -include $(BUILD_STATIC_JAVA_LIBRARY) +include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/sample/BUILD b/sample/BUILD new file mode 100644 index 0000000..13931e6 --- /dev/null +++ b/sample/BUILD @@ -0,0 +1,41 @@ +package( + default_visibility = [ + "//java/com/google/android/apps/bigtop:__subpackages__", + ], +) + +android_manifest_merge( + name = "merged_manifest", + srcs = ["AndroidManifest.xml"], + deps = [ + "//java/com/google/android/apps/bigtop/third_party/bitmap:AndroidManifest.xml", + ], +) + +android_resources( + name = "resources", + custom_package = "com.example.bitmapsample", + inline_constants = 0, + manifest = ":merged_manifest", + resources = glob(["res/**"]) + [ + "//java/com/google/android/apps/bigtop/third_party/bitmap:resource_files", + ], + resources_dir = "res", + visibility = ["//visibility:private"], +) + +exports_files([ + "proguard-config.pro", +]) + +android_binary( + name = "bitmap_sample", + srcs = glob(["src/**/*.java"]) + [":resources"], + proguard_specs = [ + ":proguard-config.pro", + ], + resources = ":resources", + deps = [ + "//java/com/google/android/apps/bigtop/third_party/bitmap", + ], +) diff --git a/sample/proguard-config.pro b/sample/proguard-config.pro new file mode 100644 index 0000000..5ad6bf4 --- /dev/null +++ b/sample/proguard-config.pro @@ -0,0 +1,31 @@ +-dontnote +-dontwarn +-dontobfuscate +-optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/*,!class/merging/*,!code/allocation/variable +-optimizationpasses 5 +-allowaccessmodification +-dontpreverify + +-keep public class * extends android.app.Activity +-keep public class * extends android.support.v4.app.Fragment +-keep public class * extends android.app.Application +-keep public class * extends android.app.Service +-keep public class * extends android.content.BroadcastReceiver +-keep public class * extends android.content.ContentProvider + +-keep interface android.util.AttributeSet + +-keep public class * extends android.view.View { + public <init>(android.content.Context, android.util.AttributeSet); + public <init>(android.content.Context, android.util.AttributeSet, int); + void set*(***); + *** get*(); +} + +-keepclasseswithmembers class * { + public <init>(android.content.Context, android.util.AttributeSet); +} + +-keepclasseswithmembers class * { + public <init>(android.content.Context, android.util.AttributeSet, int); +} |