diff options
author | 2024-08-08 21:11:42 +0000 | |
---|---|---|
committer | 2024-08-08 22:38:27 +0000 | |
commit | f5ee86c46fb14714c1aa3c357e5e9665ed29dce7 (patch) | |
tree | a2e37b0f50c2d83a45a6f3fb3f0c210da39fcc2f | |
parent | 894a93840d70947363d370f0d654eeea192195f0 (diff) |
Add IdeInfo for java module types
This CL adds support for
1. java_system_modules
2. java_system_modules_import
3. java_device_for_host
4. java_host_for_device
Bug: 356572093
Test: cat out/soong/module_bp_java_deps.json | jq
'."core-all-system-modules"' is no longer null
Change-Id: I73affae834df7f6ed961fa757585242f6d388395
-rw-r--r-- | java/device_host_converter.go | 8 | ||||
-rw-r--r-- | java/system_modules.go | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/java/device_host_converter.go b/java/device_host_converter.go index 90aeb4e24..63b69d0a8 100644 --- a/java/device_host_converter.go +++ b/java/device_host_converter.go @@ -188,3 +188,11 @@ func (d *DeviceHostConverter) AndroidMk() android.AndroidMkData { }, } } + +// implement the following interface for IDE completion. +var _ android.IDEInfo = (*DeviceHostConverter)(nil) + +func (d *DeviceHostConverter) IDEInfo(ideInfo *android.IdeInfo) { + ideInfo.Deps = append(ideInfo.Deps, d.properties.Libs...) + ideInfo.Libs = append(ideInfo.Libs, d.properties.Libs...) +} diff --git a/java/system_modules.go b/java/system_modules.go index 500d7fa25..48b33ba57 100644 --- a/java/system_modules.go +++ b/java/system_modules.go @@ -311,3 +311,11 @@ func (p *systemModulesInfoProperties) AddToPropertySet(ctx android.SdkMemberCont propertySet.AddPropertyWithTag("libs", p.Libs, ctx.SnapshotBuilder().SdkMemberReferencePropertyTag(true)) } } + +// implement the following interface for IDE completion. +var _ android.IDEInfo = (*SystemModules)(nil) + +func (s *SystemModules) IDEInfo(ideInfo *android.IdeInfo) { + ideInfo.Deps = append(ideInfo.Deps, s.properties.Libs...) + ideInfo.Libs = append(ideInfo.Libs, s.properties.Libs...) +} |