diff options
author | 2021-02-01 13:59:03 -0800 | |
---|---|---|
committer | 2021-02-09 15:36:25 -0800 | |
commit | dcf71b299ca9c85a31f9b895d8e8529d03cd7e04 (patch) | |
tree | 9010ad5f799f7df0589c824310d1e33720ca56ed /java/sdk.go | |
parent | a6cfcac7279755c76ab742f21e29f0ab3de2c7ea (diff) |
Convert java.Dependency to JavaInfo provider
Export information about java dependencies through a Provider
instead of accessing the module directly.
Test: java_test.go
Test: no changes to build.ninja
Change-Id: Ifc5d566bf6f6ebc0ad399e948effaa1ef6a22876
Diffstat (limited to 'java/sdk.go')
-rw-r--r-- | java/sdk.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/java/sdk.go b/java/sdk.go index a68abfb51..729071165 100644 --- a/java/sdk.go +++ b/java/sdk.go @@ -566,10 +566,11 @@ func createFrameworkAidl(stubsModules []string, path android.OutputPath, ctx and ctx.VisitAllModules(func(module android.Module) { // Collect dex jar paths for the modules listed above. - if j, ok := module.(Dependency); ok { + if ctx.ModuleHasProvider(module, JavaInfoProvider) { + j := ctx.ModuleProvider(module, JavaInfoProvider).(JavaInfo) name := ctx.ModuleName(module) if i := android.IndexList(name, stubsModules); i != -1 { - stubsJars[i] = j.HeaderJars() + stubsJars[i] = j.HeaderJars } } }) |