Merge "Populate java_api_libray's IDEInfo" into main
This commit is contained in:
25
java/java.go
25
java/java.go
@@ -2386,10 +2386,35 @@ func (al *ApiLibrary) MinSdkVersion(ctx android.EarlyModuleContext) android.ApiL
|
||||
return android.FutureApiLevel
|
||||
}
|
||||
|
||||
func (al *ApiLibrary) IDEInfo(i *android.IdeInfo) {
|
||||
i.Deps = append(i.Deps, al.ideDeps()...)
|
||||
i.Libs = append(i.Libs, al.properties.Libs...)
|
||||
i.Static_libs = append(i.Static_libs, al.properties.Static_libs...)
|
||||
i.SrcJars = append(i.SrcJars, al.stubsSrcJar.String())
|
||||
}
|
||||
|
||||
// deps of java_api_library for module_bp_java_deps.json
|
||||
func (al *ApiLibrary) ideDeps() []string {
|
||||
ret := []string{}
|
||||
ret = append(ret, al.properties.Libs...)
|
||||
ret = append(ret, al.properties.Static_libs...)
|
||||
if al.properties.System_modules != nil {
|
||||
ret = append(ret, proptools.String(al.properties.System_modules))
|
||||
}
|
||||
if al.properties.Full_api_surface_stub != nil {
|
||||
ret = append(ret, proptools.String(al.properties.Full_api_surface_stub))
|
||||
}
|
||||
// Other non java_library dependencies like java_api_contribution are ignored for now.
|
||||
return ret
|
||||
}
|
||||
|
||||
// implement the following interfaces for hiddenapi processing
|
||||
var _ hiddenAPIModule = (*ApiLibrary)(nil)
|
||||
var _ UsesLibraryDependency = (*ApiLibrary)(nil)
|
||||
|
||||
// implement the following interface for IDE completion.
|
||||
var _ android.IDEInfo = (*ApiLibrary)(nil)
|
||||
|
||||
//
|
||||
// Java prebuilts
|
||||
//
|
||||
|
Reference in New Issue
Block a user