summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2020-06-02 13:31:18 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-06-02 13:31:18 +0000
commit56e303ae4e017d79fea562a3511f534d2e0ba0fd (patch)
treec7fc29eff74a5283bf4aefae115fa99ab029e615 /java/java.go
parent804dd8142cdb1b6325992e494564bc4dee843e87 (diff)
parentd08b1040cb42945151cc672ec5c30005e2dde715 (diff)
Always run package check am: 91206d9ed1 am: d08b1040cb
Original change: undetermined Change-Id: I7eed39d6b49b0e837c8ad0689a8e728f7b329e41
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go11
1 files changed, 4 insertions, 7 deletions
diff --git a/java/java.go b/java/java.go
index d19c88e56..0702e618f 100644
--- a/java/java.go
+++ b/java/java.go
@@ -467,9 +467,6 @@ type Module struct {
// expanded Jarjar_rules
expandJarjarRules android.Path
- // list of additional targets for checkbuild
- additionalCheckedModules android.Paths
-
// Extra files generated by the module type to be added as java resources.
extraResources android.Paths
@@ -1530,10 +1527,10 @@ func (j *Module) compile(ctx android.ModuleContext, aaptSrcJar android.Path) {
// Check package restrictions if necessary.
if len(j.properties.Permitted_packages) > 0 {
- // Check packages and copy to package-checked file.
- pkgckFile := android.PathForModuleOut(ctx, "package-check.stamp")
- CheckJarPackages(ctx, pkgckFile, outputFile, j.properties.Permitted_packages)
- j.additionalCheckedModules = append(j.additionalCheckedModules, pkgckFile)
+ // Check packages and copy input to package-checked file.
+ // Use the file copied after a successful package check as the output file for this
+ // module so that any dependencies on this module will trigger the package check.
+ outputFile = CheckJarPackages(ctx, outputFile, j.properties.Permitted_packages)
if ctx.Failed() {
return