Allow to build resource only Java module.

Change-Id: I0ccce1f3e336fe25d3b36471664042d1f144c74a
diff --git a/core/base_rules.mk b/core/base_rules.mk
index fee05dc..6b83860 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -379,7 +379,7 @@
 # LOCAL_SOURCE_FILES_ALL_GENERATED is set only if the module does not have static source files,
 # but generated source files in its LOCAL_INTERMEDIATE_SOURCE_DIR.
 # You have to set up the dependency in some other way.
-need_compile_java := $(strip $(all_java_sources)$(all_res_assets))$(LOCAL_STATIC_JAVA_LIBRARIES)$(filter true,$(LOCAL_SOURCE_FILES_ALL_GENERATED))
+need_compile_java := $(strip $(all_java_sources)$(all_res_assets)$(java_resource_sources))$(LOCAL_STATIC_JAVA_LIBRARIES)$(filter true,$(LOCAL_SOURCE_FILES_ALL_GENERATED))
 ifdef need_compile_java
 
 full_static_java_libs := \