diff options
author | 2021-06-07 22:49:13 +0800 | |
---|---|---|
committer | 2021-06-15 08:35:13 +0800 | |
commit | b0c1f0c45a2d105fdcd6cda3f3f841c2a7addf2c (patch) | |
tree | 78a6e76f17f1fec944335f79b06a29c8536255ed /java/bootclasspath_fragment.go | |
parent | 1af9316e0a2911cea0791fbea5ff38411aabc366 (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/bootclasspath_fragment.go')
-rw-r--r-- | java/bootclasspath_fragment.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/java/bootclasspath_fragment.go b/java/bootclasspath_fragment.go index 792193f9f..7936c2bb4 100644 --- a/java/bootclasspath_fragment.go +++ b/java/bootclasspath_fragment.go @@ -132,6 +132,9 @@ type BootclasspathFragmentModule struct { ClasspathFragmentBase properties bootclasspathFragmentProperties + + // Collect the module directory for IDE info in java/jdeps.go. + modulePaths []string } // commonBootclasspathFragment defines the methods that are implemented by both source and prebuilt @@ -389,6 +392,9 @@ func (b *BootclasspathFragmentModule) GenerateAndroidBuildActions(ctx android.Mo // Generate classpaths.proto config b.generateClasspathProtoBuildActions(ctx) + // Collect the module directory for IDE info in java/jdeps.go. + b.modulePaths = append(b.modulePaths, ctx.ModuleDir()) + // Gather the bootclasspath fragment's contents. var contents []android.Module ctx.VisitDirectDeps(func(module android.Module) { @@ -648,6 +654,12 @@ func (b *BootclasspathFragmentModule) generateBootImageBuildActions(ctx android. return true } +// Collect information for opening IDE project files in java/jdeps.go. +func (b *BootclasspathFragmentModule) IDEInfo(dpInfo *android.IdeInfo) { + dpInfo.Deps = append(dpInfo.Deps, b.properties.Contents...) + dpInfo.Paths = append(dpInfo.Paths, b.modulePaths...) +} + type bootclasspathFragmentMemberType struct { android.SdkMemberTypeBase } |