From 4aedea90e8e843b53ea9c6bac02d09fb041cf6db Mon Sep 17 00:00:00 2001 From: Ying Wang Date: Tue, 4 Aug 2015 12:44:38 -0700 Subject: [PATCH] Ignore .*.java files when collecting .java files. Bug: 22934689 Change-Id: I6c9cc8f37d09eb190946e596e5d1ba0c3b318088 --- core/definitions.mk | 9 +++------ core/droiddoc.mk | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/core/definitions.mk b/core/definitions.mk index f688f41123..a47202cf4d 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -1598,9 +1598,6 @@ endef ## Commands for running javac to make .class files ########################################################### -#@echo "Source intermediates dir: $(PRIVATE_SOURCE_INTERMEDIATES_DIR)" -#@echo "Source intermediates: $$(find $(PRIVATE_SOURCE_INTERMEDIATES_DIR) -name '*.java')" - # TODO: Right now we generate the asset resources twice, first as part # of generating the Java classes, then at the end when packaging the final # assets. This should be changed to do one of two things: (1) Don't generate @@ -1715,7 +1712,7 @@ $(hide) mkdir -p $(PRIVATE_CLASS_INTERMEDIATES_DIR) $(call unzip-jar-files,$(PRIVATE_STATIC_JAVA_LIBRARIES),$(PRIVATE_CLASS_INTERMEDIATES_DIR)) $(call dump-words-to-file,$(PRIVATE_JAVA_SOURCES),$(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list) $(hide) if [ -d "$(PRIVATE_SOURCE_INTERMEDIATES_DIR)" ]; then \ - find $(PRIVATE_SOURCE_INTERMEDIATES_DIR) -name '*.java' >> $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list; \ + find $(PRIVATE_SOURCE_INTERMEDIATES_DIR) -name '*.java' -and -not -name '.*' >> $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list; \ fi $(hide) tr ' ' '\n' < $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list \ | sort -u > $(PRIVATE_CLASS_INTERMEDIATES_DIR)/java-source-list-uniq @@ -1779,7 +1776,7 @@ $(hide) mkdir -p $(PRIVATE_JACK_INTERMEDIATES_DIR) $(if $(PRIVATE_JACK_INCREMENTAL_DIR),$(hide) mkdir -p $(PRIVATE_JACK_INCREMENTAL_DIR)) $(call dump-words-to-file,$(PRIVATE_JAVA_SOURCES),$(PRIVATE_JACK_INTERMEDIATES_DIR)/java-source-list) $(hide) if [ -d "$(PRIVATE_SOURCE_INTERMEDIATES_DIR)" ]; then \ - find $(PRIVATE_SOURCE_INTERMEDIATES_DIR) -name '*.java' >> $(PRIVATE_JACK_INTERMEDIATES_DIR)/java-source-list; \ + find $(PRIVATE_SOURCE_INTERMEDIATES_DIR) -name '*.java' -and -not -name '.*' >> $(PRIVATE_JACK_INTERMEDIATES_DIR)/java-source-list; \ fi $(hide) tr ' ' '\n' < $(PRIVATE_JACK_INTERMEDIATES_DIR)/java-source-list \ | sort -u > $(PRIVATE_JACK_INTERMEDIATES_DIR)/java-source-list-uniq @@ -1859,7 +1856,7 @@ $(hide) mkdir -p $(PRIVATE_JACK_INTERMEDIATES_DIR) $(if $(PRIVATE_JACK_INCREMENTAL_DIR),$(hide) mkdir -p $(PRIVATE_JACK_INCREMENTAL_DIR)) $(call dump-words-to-file,$(PRIVATE_JAVA_SOURCES),$(PRIVATE_JACK_INTERMEDIATES_DIR)/java-source-list) $(hide) if [ -d "$(PRIVATE_SOURCE_INTERMEDIATES_DIR)" ]; then \ - find $(PRIVATE_SOURCE_INTERMEDIATES_DIR) -name '*.java' >> $(PRIVATE_JACK_INTERMEDIATES_DIR)/java-source-list; \ + find $(PRIVATE_SOURCE_INTERMEDIATES_DIR) -name '*.java' -and -not -name '.*' >> $(PRIVATE_JACK_INTERMEDIATES_DIR)/java-source-list; \ fi $(hide) tr ' ' '\n' < $(PRIVATE_JACK_INTERMEDIATES_DIR)/java-source-list \ | sort -u > $(PRIVATE_JACK_INTERMEDIATES_DIR)/java-source-list-uniq diff --git a/core/droiddoc.mk b/core/droiddoc.mk index 0de1837eb2..417d4fd492 100644 --- a/core/droiddoc.mk +++ b/core/droiddoc.mk @@ -107,7 +107,7 @@ $(full_target): PRIVATE_DROIDDOC_OPTIONS := $(LOCAL_DROIDDOC_OPTIONS) define prepare-doc-source-list $(hide) mkdir -p $(dir $(1)) $(call dump-words-to-file, $(2), $(1)) -$(hide) for d in $(3) ; do find $$d -name '*.java' >> $(1) 2> /dev/null ; done ; true +$(hide) for d in $(3) ; do find $$d -name '*.java' -and -not -name '.*' >> $(1) 2> /dev/null ; done ; true endef ifeq (a,b)