summaryrefslogtreecommitdiff
path: root/java/systemserver_classpath_fragment.go
diff options
context:
space:
mode:
authorsatayev <satayev@google.com>2021-05-17 21:35:26 +0100
committerPaul Duffin <paulduffin@google.com>2021-05-18 10:37:52 +0100
commit2f45f4eec199f375a5518023eae228438ea2b536 (patch)
tree766e72508a57596dc97c8835e6c571a14852862e /java/systemserver_classpath_fragment.go
parent7b182e717779d6582ffd21277ee325690648229e (diff)
Add systemserverclasspath_fragments property to apex.
- All contents of the fragment are added as java_lib dependencies. - Generated classpaths.proto is added into etc as required. Bug: 180105615 Test: m nothing Merged-In: I8e8e8b019c4ca2909182f205a47deffa946de6da Change-Id: I8e8e8b019c4ca2909182f205a47deffa946de6da (cherry picked from commit 333a1732b17887260f2290ffacffffeff760eee5)
Diffstat (limited to 'java/systemserver_classpath_fragment.go')
-rw-r--r--java/systemserver_classpath_fragment.go16
1 files changed, 11 insertions, 5 deletions
diff --git a/java/systemserver_classpath_fragment.go b/java/systemserver_classpath_fragment.go
index 4e65c056b..a505c6d01 100644
--- a/java/systemserver_classpath_fragment.go
+++ b/java/systemserver_classpath_fragment.go
@@ -67,14 +67,19 @@ func (p *platformSystemServerClasspathModule) ClasspathFragmentToConfiguredJarLi
}).(android.ConfiguredJarList)
}
-type systemServerClasspathModule struct {
+type SystemServerClasspathModule struct {
android.ModuleBase
+ android.ApexModuleBase
ClasspathFragmentBase
properties systemServerClasspathFragmentProperties
}
+func (s *SystemServerClasspathModule) ShouldSupportSdkVersion(ctx android.BaseModuleContext, sdkVersion android.ApiLevel) error {
+ return nil
+}
+
type systemServerClasspathFragmentProperties struct {
// The contents of this systemserverclasspath_fragment, could be either java_library, or java_sdk_library.
//
@@ -83,14 +88,15 @@ type systemServerClasspathFragmentProperties struct {
}
func systemServerClasspathFactory() android.Module {
- m := &systemServerClasspathModule{}
+ m := &SystemServerClasspathModule{}
m.AddProperties(&m.properties)
+ android.InitApexModule(m)
initClasspathFragment(m, SYSTEMSERVERCLASSPATH)
android.InitAndroidArchModule(m, android.DeviceSupported, android.MultilibCommon)
return m
}
-func (s *systemServerClasspathModule) GenerateAndroidBuildActions(ctx android.ModuleContext) {
+func (s *SystemServerClasspathModule) GenerateAndroidBuildActions(ctx android.ModuleContext) {
if len(s.properties.Contents) == 0 {
ctx.PropertyErrorf("contents", "empty contents are not allowed")
}
@@ -98,7 +104,7 @@ func (s *systemServerClasspathModule) GenerateAndroidBuildActions(ctx android.Mo
s.classpathFragmentBase().generateClasspathProtoBuildActions(ctx, configuredJarListToClasspathJars(ctx, s.ClasspathFragmentToConfiguredJarList(ctx)))
}
-func (s *systemServerClasspathModule) ClasspathFragmentToConfiguredJarList(ctx android.ModuleContext) android.ConfiguredJarList {
+func (s *SystemServerClasspathModule) ClasspathFragmentToConfiguredJarList(ctx android.ModuleContext) android.ConfiguredJarList {
// TODO(satayev): populate with actual content
return android.EmptyConfiguredJarList()
}
@@ -114,7 +120,7 @@ func IsSystemServerClasspathFragmentContentDepTag(tag blueprint.DependencyTag) b
return tag == systemServerClasspathFragmentContentDepTag
}
-func (s *systemServerClasspathModule) ComponentDepsMutator(ctx android.BottomUpMutatorContext) {
+func (s *SystemServerClasspathModule) ComponentDepsMutator(ctx android.BottomUpMutatorContext) {
module := ctx.Module()
for _, name := range s.properties.Contents {