diff options
author | Colin Cross <ccross@android.com> | 2020-06-03 17:14:31 +0000 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2020-06-03 17:15:15 +0000 |
commit | b549b771207be2ffb6f705461110a1285c0b91f4 (patch) | |
tree | 2b32753292b4cfe572780435c426d17bd5ff9f3f /java/java.go | |
parent | 91206d9ed1a1e3cb81d1ace021580c4be8362f1f (diff) |
Revert "Always run package check"
This reverts commit 91206d9ed1a1e3cb81d1ace021580c4be8362f1f.
Reason for revert: package-check.sh doesn't work on mac
Bug: 158081251
Bug: 157649935
Change-Id: I50af71d54d5f1f8b516bfcf1efbcf6217e89c83a
Diffstat (limited to 'java/java.go')
-rw-r--r-- | java/java.go | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/java/java.go b/java/java.go index 09df2ad43..76bfa86d6 100644 --- a/java/java.go +++ b/java/java.go @@ -463,6 +463,9 @@ 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 @@ -1518,10 +1521,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 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) + // 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) if ctx.Failed() { return |