< prev index next >

make/common/JavaCompilation.gmk

Print this page

        

@@ -178,10 +178,11 @@
 #        default is true.
 #   DEBUG_SYMBOLS:=Set to false to disable generation of debug symbols.
 #   CREATE_API_DIGEST:=Set to true to use a javac plugin to generate a public API
 #        hash which can be used for down stream dependencies to only rebuild
 #        when the API changes. Implicitly used in sjavac.
+#   KEEP_ALL_TRANSLATIONS:=Set to true to skip translation filtering
 SetupJavaCompilation = $(NamedParamsMacroTemplate)
 define SetupJavaCompilationBody
 
   # Verify arguments
   ifeq ($$($1_BIN),)

@@ -264,10 +265,15 @@
         $$(if $$($1_$$(relative_src)), \
           $$(eval $1_SJAVAC_EXCLUDE_FILES += $$(s)), \
           $$(eval $1_$$(relative_src) := 1) $$(s))))
   endif
 
+  # Filter out any excluded translations
+  ifneq ($$($1_KEEP_ALL_TRANSLATIONS), true)
+    $1_SRCS := $$(call FilterExcludedTranslations, $$($1_SRCS), .java)
+  endif
+
   ifeq ($$(strip $$($1_SRCS)), )
     ifneq ($$($1_FAIL_NO_SRC), false)
       $$(error No source files found for $1)
     endif
   else

@@ -288,10 +294,14 @@
       $1_ALL_COPIES := $$(filter $$($1_INCLUDE_PATTERN),$$($1_ALL_COPIES))
     endif
     ifneq (,$$($1_EXCLUDE_PATTERN))
       $1_ALL_COPIES := $$(filter-out $$($1_EXCLUDE_PATTERN),$$($1_ALL_COPIES))
     endif
+    # Filter out any excluded translations
+    ifneq ($$($1_KEEP_ALL_TRANSLATIONS), true)
+      $1_ALL_COPIES := $$(call FilterExcludedTranslations, $$($1_ALL_COPIES), .properties)
+    endif
     ifneq (,$$($1_ALL_COPIES))
       # Yep, there are files to be copied!
       $1_ALL_COPY_TARGETS:=
           $$(foreach i,$$($1_ALL_COPIES),$$(eval $$(call add_file_to_copy,$1,$$i)))
       # Now we can depend on $$($1_ALL_COPY_TARGETS) to copy all files!

@@ -308,10 +318,14 @@
         $1_ALL_CLEANS := $$(filter $$($1_INCLUDE_PATTERN),$$($1_ALL_CLEANS))
       endif
       ifneq (,$$($1_EXCLUDE_PATTERN))
         $1_ALL_CLEANS := $$(filter-out $$($1_EXCLUDE_PATTERN),$$($1_ALL_CLEANS))
       endif
+      # Filter out any excluded translations
+      ifneq ($$($1_KEEP_ALL_TRANSLATIONS), true)
+        $1_ALL_CLEANS := $$(call FilterExcludedTranslations, $$($1_ALL_CLEANS), .properties)
+      endif
       ifneq (,$$($1_ALL_CLEANS))
         # Yep, there are files to be copied and cleaned!
         $1_ALL_COPY_CLEAN_TARGETS:=
             $$(foreach i,$$($1_ALL_CLEANS),$$(eval $$(call add_file_to_clean,$1,$$i)))
         # Now we can depend on $$($1_ALL_COPY_CLEAN_TARGETS) to copy all files!
< prev index next >