summaryrefslogtreecommitdiff
path: root/java/systemserver_classpath_fragment.go
diff options
context:
space:
mode:
author satayev <satayev@google.com> 2021-08-06 13:20:28 +0100
committer satayev <satayev@google.com> 2021-08-16 12:00:25 +0100
commitd34eb0c4a6e176ca129f66f0449bd0ba19fdff5e (patch)
treed9ec7ce082ff942f98acacbbe2797c7cfacc7914 /java/systemserver_classpath_fragment.go
parentfc30cfc7ae35ac92d2e7b423b23c1bba8fa3f005 (diff)
Make sure that classpath fragment contents appear in make vars.
The source of truth for what jars are in BOOTCLASSPATH and SYSTEMSERVERCLASSPATH is make; adding a classpath fragment in soong with a new jar in the contents without having it declared in make is wrong (excluding test apexes). Bug: 191369843 Test: m nothing Change-Id: Ifd313776ee7ad206031244534ed3870126e4f835
Diffstat (limited to 'java/systemserver_classpath_fragment.go')
-rw-r--r--java/systemserver_classpath_fragment.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/java/systemserver_classpath_fragment.go b/java/systemserver_classpath_fragment.go
index 6c2a5b58b..5311f62c1 100644
--- a/java/systemserver_classpath_fragment.go
+++ b/java/systemserver_classpath_fragment.go
@@ -107,7 +107,16 @@ func (s *SystemServerClasspathModule) configuredJars(ctx android.ModuleContext)
global := dexpreopt.GetGlobalConfig(ctx)
possibleUpdatableModules := gatherPossibleApexModuleNamesAndStems(ctx, s.properties.Contents, systemServerClasspathFragmentContentDepTag)
- return global.ApexSystemServerJars.Filter(possibleUpdatableModules)
+ jars, unknown := global.ApexSystemServerJars.Filter(possibleUpdatableModules)
+ // TODO(satayev): remove geotz ssc_fragment, since geotz is not part of SSCP anymore.
+ _, unknown = android.RemoveFromList("geotz", unknown)
+
+ // For non test apexes, make sure that all contents are actually declared in make.
+ if global.ApexSystemServerJars.Len() > 0 && len(unknown) > 0 {
+ ctx.ModuleErrorf("%s in contents must also be declared in PRODUCT_UPDATABLE_SYSTEM_SERVER_JARS", unknown)
+ }
+
+ return jars
}
type systemServerClasspathFragmentContentDependencyTag struct {