Make it a fatal error if no source files for Java module.

Change-Id: Ia04158c11381b6b1687b9d5c699a9ea8ae3cb317
diff --git a/core/java.mk b/core/java.mk
index 0ec9af9..1c4558f 100644
--- a/core/java.mk
+++ b/core/java.mk
@@ -19,7 +19,7 @@
 # but generated source files in its LOCAL_INTERMEDIATE_SOURCE_DIR.
 # You have to set up the dependency in some other way.
 ifeq (,$(strip $(LOCAL_SRC_FILES)$(all_res_assets)$(LOCAL_STATIC_JAVA_LIBRARIES))$(filter true,$(LOCAL_SOURCE_FILES_ALL_GENERATED)))
-$(warning $(LOCAL_PATH): Target java module does not define any source or resource files)
+$(error $(LOCAL_PATH): Target java module does not define any source or resource files)
 endif
 
 LOCAL_NO_STANDARD_LIBRARIES:=$(strip $(LOCAL_NO_STANDARD_LIBRARIES))