Merge "Update java_api_library in testing modules"

This commit is contained in:
Jihoon Kang
2023-04-05 23:27:50 +00:00
committed by Gerrit Code Review
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,
})
}