summaryrefslogtreecommitdiff
path: root/java/systemserver_classpath_fragment.go
diff options
context:
space:
mode:
authorbralee <bralee@google.com>2021-06-07 22:49:13 +0800
committerbralee <bralee@google.com>2021-06-15 08:35:13 +0800
commitb0c1f0c45a2d105fdcd6cda3f3f841c2a7addf2c (patch)
tree78a6e76f17f1fec944335f79b06a29c8536255ed /java/systemserver_classpath_fragment.go
parent1af9316e0a2911cea0791fbea5ff38411aabc366 (diff)
AIDEGen: Collect dependencies info from APEX module.
Add apex dependencies. Bug: 188004865 Test: 1. aidegen frameworks/base/apex/appsearch frameworks/base/apex/appsearch/testing frameworks/base/services/tests/servicestests frameworks/base/core/tests/coretests cts/tests/appsearch external/icing vendor/google_testing/integration/tests/scenarios 2. The dependency graph shows it is workable to provide the result to let IDE's [Project structure] to include the service-appsearch as source directory. Change-Id: Ifd1548f0a86c1c73f8279e8ecea67756aeb1281e
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 7ffb05602..5bd25cd51 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.ClasspathFragmentToConfiguredJarList(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) ClasspathFragmentToConfiguredJarList(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...)
+}