summaryrefslogtreecommitdiff
path: root/java/systemserver_classpath_fragment.go
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2021-06-21 07:17:28 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2021-06-21 07:17:28 +0000
commit348f20be0e57756043d453fbb673f91e43e8a645 (patch)
tree2e88d736bbf4a3b0fd8da9904dd8978c851e0768 /java/systemserver_classpath_fragment.go
parent9e2dcbd08000ffc5d28a9f7d3681eeae66072818 (diff)
parentb0c1f0c45a2d105fdcd6cda3f3f841c2a7addf2c (diff)
Merge "AIDEGen: Collect dependencies info from APEX module."
Diffstat (limited to 'java/systemserver_classpath_fragment.go')
-rw-r--r--java/systemserver_classpath_fragment.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/java/systemserver_classpath_fragment.go b/java/systemserver_classpath_fragment.go
index c63a53f19..a0decb7e9 100644
--- a/java/systemserver_classpath_fragment.go
+++ b/java/systemserver_classpath_fragment.go
@@ -64,6 +64,9 @@ type SystemServerClasspathModule struct {
ClasspathFragmentBase
properties systemServerClasspathFragmentProperties
+
+ // Collect the module directory for IDE info in java/jdeps.go.
+ modulePaths []string
}
func (s *SystemServerClasspathModule) ShouldSupportSdkVersion(ctx android.BaseModuleContext, sdkVersion android.ApiLevel) error {
@@ -93,6 +96,9 @@ func (s *SystemServerClasspathModule) GenerateAndroidBuildActions(ctx android.Mo
classpathJars := configuredJarListToClasspathJars(ctx, s.configuredJars(ctx), s.classpathType)
s.classpathFragmentBase().generateClasspathProtoBuildActions(ctx, classpathJars)
+
+ // Collect the module directory for IDE info in java/jdeps.go.
+ s.modulePaths = append(s.modulePaths, ctx.ModuleDir())
}
func (s *SystemServerClasspathModule) configuredJars(ctx android.ModuleContext) android.ConfiguredJarList {
@@ -139,3 +145,9 @@ func (s *SystemServerClasspathModule) ComponentDepsMutator(ctx android.BottomUpM
ctx.AddDependency(module, systemServerClasspathFragmentContentDepTag, name)
}
}
+
+// Collect information for opening IDE project files in java/jdeps.go.
+func (s *SystemServerClasspathModule) IDEInfo(dpInfo *android.IdeInfo) {
+ dpInfo.Deps = append(dpInfo.Deps, s.properties.Contents...)
+ dpInfo.Paths = append(dpInfo.Paths, s.modulePaths...)
+}