Update java_api_library in testing modules

The full api surface java_api_library modules are currently defined as
java_library modules instead of java_api_library modules. This change
corrects this and modifies the DepsInfo of java_api_library so that it
can be compatible in tests.

Test: go ./java
Change-Id: I540b5a930f506ce5f7663ab6e07c6df49af15cf9
This commit is contained in:
Jihoon Kang
2023-04-04 22:04:43 +00:00
parent f590058fd2
commit c0a24205a7
2 changed files with 26 additions and 11 deletions

View File

@@ -1612,7 +1612,7 @@ func (ap *JavaApiContribution) GenerateAndroidBuildActions(ctx android.ModuleCon
}
type JavaApiLibraryDepsInfo struct {
StubsJar android.Path
JavaInfo
StubsSrcJar android.Path
}
@@ -1821,7 +1821,7 @@ func (al *ApiLibrary) GenerateAndroidBuildActions(ctx android.ModuleContext) {
staticLibs = append(staticLibs, provider.HeaderJars...)
case depApiSrcsTag:
provider := ctx.OtherModuleProvider(dep, JavaApiLibraryDepsProvider).(JavaApiLibraryDepsInfo)
classPaths = append(classPaths, provider.StubsJar)
classPaths = append(classPaths, provider.HeaderJars...)
depApiSrcsStubsSrcJar = provider.StubsSrcJar
}
})
@@ -1900,7 +1900,9 @@ func (al *ApiLibrary) GenerateAndroidBuildActions(ctx android.ModuleContext) {
})
ctx.SetProvider(JavaApiLibraryDepsProvider, JavaApiLibraryDepsInfo{
StubsJar: al.stubsJar,
JavaInfo: JavaInfo{
HeaderJars: android.PathsIfNonNil(al.stubsJar),
},
StubsSrcJar: al.stubsSrcJar,
})
}