Create core-lambda-stubs from .txt files

APIs to compile lambda are part of art's toolchain api surface.
Generating stubs from .txt files allows us to prune the remaining sdk
dependencies on libcore/ that are not api files

Test: m core-lambda-stubs.from-text
(On top of change containing core.current.stubs.from-text
and turning enabled: true)

Change-Id: I0ab8459b9317cb055a434eb635ba06d38da5b92e
This commit is contained in:
Spandan Das
2023-04-03 23:27:25 +00:00
parent 0cb803a5d6
commit 760f880495
2 changed files with 20 additions and 6 deletions

View File

@@ -151,7 +151,7 @@ func decodeSdkDep(ctx android.EarlyModuleContext, sdkContext android.SdkContext)
systemModules := android.JavaApiLibraryName(ctx.Config(), fmt.Sprintf("core-%s-stubs-system-modules", systemModulesKind))
return sdkDep{
useModule: true,
bootclasspath: []string{module, config.DefaultLambdaStubsLibrary},
bootclasspath: []string{module, android.JavaApiLibraryName(ctx.Config(), config.DefaultLambdaStubsLibrary)},
systemModules: systemModules,
java9Classpath: []string{module},
frameworkResModule: "framework-res",
@@ -197,7 +197,7 @@ func decodeSdkDep(ctx android.EarlyModuleContext, sdkContext android.SdkContext)
case android.SdkCore:
return sdkDep{
useModule: true,
bootclasspath: []string{android.SdkCore.JavaLibraryName(ctx.Config()), config.DefaultLambdaStubsLibrary},
bootclasspath: []string{android.SdkCore.JavaLibraryName(ctx.Config()), android.JavaApiLibraryName(ctx.Config(), config.DefaultLambdaStubsLibrary)},
systemModules: android.JavaApiLibraryName(ctx.Config(), "core-public-stubs-system-modules"),
noFrameworksLibs: true,
}