Make it a fatal error if no source files for Java module.
Change-Id: Ia04158c11381b6b1687b9d5c699a9ea8ae3cb317
This commit is contained in:
parent
5711d73ed0
commit
576e0146a9
|
@ -354,7 +354,7 @@ endif # java_resource_file_groups
|
||||||
|
|
||||||
## PRIVATE java vars ######################################
|
## PRIVATE java vars ######################################
|
||||||
|
|
||||||
ifneq ($(strip $(all_java_sources)$(all_res_assets))$(LOCAL_STATIC_JAVA_LIBRARIES),)
|
ifneq ($(strip $(all_java_sources)$(all_res_assets))$(LOCAL_STATIC_JAVA_LIBRARIES)$(filter true,$(LOCAL_SOURCE_FILES_ALL_GENERATED)),)
|
||||||
|
|
||||||
full_static_java_libs := \
|
full_static_java_libs := \
|
||||||
$(foreach lib,$(LOCAL_STATIC_JAVA_LIBRARIES), \
|
$(foreach lib,$(LOCAL_STATIC_JAVA_LIBRARIES), \
|
||||||
|
|
|
@ -23,6 +23,9 @@ LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
|
||||||
LOCAL_IS_HOST_MODULE := true
|
LOCAL_IS_HOST_MODULE := true
|
||||||
LOCAL_BUILT_MODULE_STEM := javalib.jar
|
LOCAL_BUILT_MODULE_STEM := javalib.jar
|
||||||
|
|
||||||
|
# base_rules.mk looks at this
|
||||||
|
all_res_assets :=
|
||||||
|
|
||||||
ifeq ($(LOCAL_BUILD_HOST_DEX),true)
|
ifeq ($(LOCAL_BUILD_HOST_DEX),true)
|
||||||
ifneq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
|
ifneq ($(LOCAL_NO_STANDARD_LIBRARIES),true)
|
||||||
LOCAL_JAVA_LIBRARIES := $(sort core-hostdex $(LOCAL_JAVA_LIBRARIES))
|
LOCAL_JAVA_LIBRARIES := $(sort core-hostdex $(LOCAL_JAVA_LIBRARIES))
|
||||||
|
|
|
@ -19,7 +19,7 @@ endif #PDK
|
||||||
# but generated source files in its LOCAL_INTERMEDIATE_SOURCE_DIR.
|
# but generated source files in its LOCAL_INTERMEDIATE_SOURCE_DIR.
|
||||||
# You have to set up the dependency in some other way.
|
# 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)))
|
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
|
endif
|
||||||
|
|
||||||
LOCAL_NO_STANDARD_LIBRARIES:=$(strip $(LOCAL_NO_STANDARD_LIBRARIES))
|
LOCAL_NO_STANDARD_LIBRARIES:=$(strip $(LOCAL_NO_STANDARD_LIBRARIES))
|
||||||
|
|
|
@ -18,10 +18,9 @@ ifneq (true,$(LOCAL_IS_STATIC_JAVA_LIBRARY))
|
||||||
ifneq (,$(LOCAL_RESOURCE_DIR))
|
ifneq (,$(LOCAL_RESOURCE_DIR))
|
||||||
$(error $(LOCAL_PATH): Target java libraries may not set LOCAL_RESOURCE_DIR)
|
$(error $(LOCAL_PATH): Target java libraries may not set LOCAL_RESOURCE_DIR)
|
||||||
endif
|
endif
|
||||||
endif
|
# base_rules.mk looks at this
|
||||||
|
|
||||||
#xxx base_rules.mk looks at this
|
|
||||||
all_res_assets :=
|
all_res_assets :=
|
||||||
|
endif
|
||||||
|
|
||||||
LOCAL_BUILT_MODULE_STEM := javalib.jar
|
LOCAL_BUILT_MODULE_STEM := javalib.jar
|
||||||
|
|
||||||
|
|
|
@ -59,6 +59,8 @@ LOCAL_PROGUARD_FLAGS := $(addprefix -include ,$(proguard_options_file)) $(LOCAL_
|
||||||
endif # all_resources
|
endif # all_resources
|
||||||
endif # LOCAL_RESOURCE_DIR
|
endif # LOCAL_RESOURCE_DIR
|
||||||
|
|
||||||
|
all_res_assets := $(all_resources)
|
||||||
|
|
||||||
include $(BUILD_SYSTEM)/java_library.mk
|
include $(BUILD_SYSTEM)/java_library.mk
|
||||||
|
|
||||||
ifneq (,$(all_resources))
|
ifneq (,$(all_resources))
|
||||||
|
|
Loading…
Reference in New Issue