diff options
author | Dan Willemsen <dwillemsen@google.com> | 2015-06-30 18:15:24 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@google.com> | 2015-07-01 20:59:39 +0000 |
commit | 2ef08f4458aaeb1cf69a167107d52a2ca22ba3f3 (patch) | |
tree | e315609987dd9b06d1d85f379149e2b64e7bac5d /java/java.go | |
parent | c41f63071ebdb34fea48c11bc94b6e4a7e159c06 (diff) |
Add exclude_* and remove arch_subtract / "-file"
To align with the current make build system, add exclude_srcs and
exclude_java_resource_dirs. These replace the functionality of
arch_subtract and glob exclusions that use "-file" to exclude a file.
Change-Id: I91c23d5e3c9409f2d9f7921f950153a03a68ad61
Diffstat (limited to 'java/java.go')
-rw-r--r-- | java/java.go | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/java/java.go b/java/java.go index a16d1d67f..94f6914ed 100644 --- a/java/java.go +++ b/java/java.go @@ -47,11 +47,18 @@ import ( type javaBaseProperties struct { // list of source files used to compile the Java module. May be .java, .logtags, .proto, // or .aidl files. - Srcs []string `android:"arch_variant,arch_subtract"` + Srcs []string `android:"arch_variant"` + + // list of source files that should not be used to build the Java module. + // This is most useful in the arch/multilib variants to remove non-common files + Exclude_srcs []string `android:"arch_variant"` // list of directories containing Java resources Java_resource_dirs []string `android:"arch_variant"` + // list of directories that should be excluded from java_resource_dirs + Exclude_java_resource_dirs []string `android:"arch_variant"` + // don't build against the default libraries (core-libart, core-junit, // ext, and framework for device targets) No_standard_libraries bool @@ -294,7 +301,7 @@ func (j *javaBase) GenerateJavaBuildActions(ctx common.AndroidModuleContext) { javacDeps = append(javacDeps, classpath...) } - srcFiles := ctx.ExpandSources(j.properties.Srcs) + srcFiles := ctx.ExpandSources(j.properties.Srcs, j.properties.Exclude_srcs) srcFiles = j.genSources(ctx, srcFiles, flags) @@ -316,7 +323,7 @@ func (j *javaBase) GenerateJavaBuildActions(ctx common.AndroidModuleContext) { classJarSpecs = append([]jarSpec{classes}, classJarSpecs...) } - resourceJarSpecs = append(ResourceDirsToJarSpecs(ctx, j.properties.Java_resource_dirs), + resourceJarSpecs = append(ResourceDirsToJarSpecs(ctx, j.properties.Java_resource_dirs, j.properties.Exclude_java_resource_dirs), resourceJarSpecs...) manifest := j.properties.Manifest |