From 9223a6262a92715d8d554142e6b4d1eec27110ca Mon Sep 17 00:00:00 2001 From: Sasha Smundak Date: Fri, 5 Apr 2019 13:53:39 -0700 Subject: [PATCH] Handle LOCAL_JAVA_RESOURCE_FILES variable Fixes: 130040716 Test: treehugger, internal unit test Change-Id: I3fcc5e041d6e4eaa5d2d4ab75f9a645e724fab1b --- androidmk/cmd/androidmk/android.go | 1 + androidmk/cmd/androidmk/androidmk_test.go | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/androidmk/cmd/androidmk/android.go b/androidmk/cmd/androidmk/android.go index 8b996e0b4..e0932af38 100644 --- a/androidmk/cmd/androidmk/android.go +++ b/androidmk/cmd/androidmk/android.go @@ -146,6 +146,7 @@ func init() { "LOCAL_RENDERSCRIPT_FLAGS": "renderscript.flags", "LOCAL_JAVA_RESOURCE_DIRS": "java_resource_dirs", + "LOCAL_JAVA_RESOURCE_FILES": "java_resources", "LOCAL_JAVACFLAGS": "javacflags", "LOCAL_ERROR_PRONE_FLAGS": "errorprone.javacflags", "LOCAL_DX_FLAGS": "dxflags", diff --git a/androidmk/cmd/androidmk/androidmk_test.go b/androidmk/cmd/androidmk/androidmk_test.go index f2dc6ff21..34e673c58 100644 --- a/androidmk/cmd/androidmk/androidmk_test.go +++ b/androidmk/cmd/androidmk/androidmk_test.go @@ -577,6 +577,10 @@ include $(call all-makefiles-under,$(LOCAL_PATH)) include $(CLEAR_VARS) LOCAL_SRC_FILES := $(call all-java-files-under, src gen) include $(BUILD_STATIC_JAVA_LIBRARY) + + include $(CLEAR_VARS) + LOCAL_JAVA_RESOURCE_FILES := foo bar + include $(BUILD_STATIC_JAVA_LIBRARY) `, expected: ` java_library { @@ -604,6 +608,13 @@ include $(call all-makefiles-under,$(LOCAL_PATH)) "gen/**/*.java", ], } + + java_library { + java_resources: [ + "foo", + "bar", + ], + } `, }, {