diff options
author | 2018-08-15 15:35:38 -0700 | |
---|---|---|
committer | 2018-09-18 17:44:10 +0000 | |
commit | 5d45c6f6f83b6a9b360c392b9fdfdeb2b935de7d (patch) | |
tree | 5d184abb38bc6ecc7b69510ea07b79a4d2c93917 /android/module.go | |
parent | cfbea98a57a8d8fd314a3e2ebc08eb53eab328ef (diff) |
Collect modules' info to create IDE project file.
- Register a singleton and implement GenerateBuildActions func in java/jdeps.go.
- Declare a interface and a struct to collect info in android/module.go.
- Implement IDEInfo for Library & Import module in java/jdeps.go.
- Implement IDEInfo for Genrule module in genrule/genrule.go.
- Implement IDEInfo for fileGroup module in android/filegroup.go.
- Test codes for jdeps.go in java/jdeps_test.go.
Bug: 111044346
Test: export SOONG_COLLECT_JAVA_DEPS=1;mmm packages/apps/Settings
out/soong/module_bp_java_deps.json will be generated
Change-Id: If61da77b4d7614c2c5da438b6af4c725ceccc5c3
Diffstat (limited to 'android/module.go')
-rw-r--r-- | android/module.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/android/module.go b/android/module.go index ae1227449..4dc4e9c32 100644 --- a/android/module.go +++ b/android/module.go @@ -1547,3 +1547,27 @@ func (s AndroidModulesByName) Less(i, j int) bool { } } func (s AndroidModulesByName) Swap(i, j int) { s.slice[i], s.slice[j] = s.slice[j], s.slice[i] } + +// Collect information for opening IDE project files in java/jdeps.go. +type IDEInfo interface { + IDEInfo(ideInfo *IdeInfo) + BaseModuleName() string +} + +// Extract the base module name from the Import name. +// Often the Import name has a prefix "prebuilt_". +// Remove the prefix explicitly if needed +// until we find a better solution to get the Import name. +type IDECustomizedModuleName interface { + IDECustomizedModuleName() string +} + +type IdeInfo struct { + Deps []string `json:"dependencies,omitempty"` + Srcs []string `json:"srcs,omitempty"` + Aidl_include_dirs []string `json:"aidl_include_dirs,omitempty"` + Jarjar_rules []string `json:"jarjar_rules,omitempty"` + Jars []string `json:"jars,omitempty"` + Classes []string `json:"class,omitempty"` + Installed_paths []string `json:"installed,omitempty"` +} |