Allow exclude_java_resources to affect java_resource_dirs
Allow excluding files from directory globbed by java_resource_dirs.
Test: java_test.go
Change-Id: I9922842248be1a386ab111a5187608438638ffb1
diff --git a/java/java.go b/java/java.go
index b60f9c7..4bf5880 100644
--- a/java/java.go
+++ b/java/java.go
@@ -75,7 +75,7 @@
// list of files to use as Java resources
Java_resources []string `android:"arch_variant"`
- // list of files that should be excluded from java_resources
+ // list of files that should be excluded from java_resources and java_resource_dirs
Exclude_java_resources []string `android:"arch_variant"`
// don't build against the default libraries (bootclasspath, legacy-test, core-junit,
@@ -1119,7 +1119,8 @@
}
}
- dirArgs, dirDeps := ResourceDirsToJarArgs(ctx, j.properties.Java_resource_dirs, j.properties.Exclude_java_resource_dirs)
+ dirArgs, dirDeps := ResourceDirsToJarArgs(ctx, j.properties.Java_resource_dirs,
+ j.properties.Exclude_java_resource_dirs, j.properties.Exclude_java_resources)
fileArgs, fileDeps := ResourceFilesToJarArgs(ctx, j.properties.Java_resources, j.properties.Exclude_java_resources)
var resArgs []string