summaryrefslogtreecommitdiff
path: root/java/platform_bootclasspath.go
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2021-04-29 10:34:11 +0100
committerPaul Duffin <paulduffin@google.com>2021-04-29 13:37:16 +0100
commite3ecce67c14e0edda22938648cb3a797ca2409ef (patch)
tree77e041ae9aad637c532b2e85961da70d778cfd0c /java/platform_bootclasspath.go
parent3f9c16af2d0e3b880a05c34b1424446bead51779 (diff)
Make platform_bootclasspath a singleton module
This is needed in order to allow it to implement MakeVars so it can create make variables just like the dexpreopt_bootjars and hiddenapi singletons currently do. Bug: 177892522 Bug: 179354495 Test: m nothing Change-Id: Ida5bf8abeecde531e1f6430151650065445804ac
Diffstat (limited to 'java/platform_bootclasspath.go')
-rw-r--r--java/platform_bootclasspath.go18
1 files changed, 15 insertions, 3 deletions
diff --git a/java/platform_bootclasspath.go b/java/platform_bootclasspath.go
index 6bf9ea0b8..d341591d3 100644
--- a/java/platform_bootclasspath.go
+++ b/java/platform_bootclasspath.go
@@ -26,7 +26,7 @@ func init() {
}
func registerPlatformBootclasspathBuildComponents(ctx android.RegistrationContext) {
- ctx.RegisterModuleType("platform_bootclasspath", platformBootclasspathFactory)
+ ctx.RegisterSingletonModuleType("platform_bootclasspath", platformBootclasspathFactory)
}
// The tags used for the dependencies between the platform bootclasspath and any configured boot
@@ -38,7 +38,7 @@ var (
)
type platformBootclasspathModule struct {
- android.ModuleBase
+ android.SingletonModuleBase
ClasspathFragmentBase
properties platformBootclasspathProperties
@@ -69,7 +69,7 @@ type platformBootclasspathProperties struct {
Hidden_api HiddenAPIFlagFileProperties
}
-func platformBootclasspathFactory() android.Module {
+func platformBootclasspathFactory() android.SingletonModule {
m := &platformBootclasspathModule{}
m.AddProperties(&m.properties)
// TODO(satayev): split systemserver and apex jars into separate configs.
@@ -154,6 +154,18 @@ func addDependenciesOntoBootImageModules(ctx android.BottomUpMutatorContext, mod
}
}
+// GenerateSingletonBuildActions does nothing and must never do anything.
+//
+// This module only implements android.SingletonModule so that it can implement
+// android.SingletonMakeVarsProvider.
+func (b *platformBootclasspathModule) GenerateSingletonBuildActions(android.SingletonContext) {
+ // Keep empty
+}
+
+func (d *platformBootclasspathModule) MakeVars(ctx android.MakeVarsContext) {
+ // Placeholder for now.
+}
+
func (b *platformBootclasspathModule) GenerateAndroidBuildActions(ctx android.ModuleContext) {
b.classpathFragmentBase().generateAndroidBuildActions(ctx)