Merge "Rename core stubs to .txt stubs if applicable" am: 77e3278c50

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2514796

Change-Id: Ia51784b2371933e8531d3f6e02e0d6a27a7bda21
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Spandan Das
2023-04-03 17:10:07 +00:00
committed by Automerger Merge Worker
2 changed files with 5 additions and 4 deletions

View File

@@ -1923,7 +1923,7 @@ type moduleWithSdkDep interface {
func (m *Module) getSdkLinkType(ctx android.BaseModuleContext, name string) (ret sdkLinkType, stubs bool) {
switch name {
case "core.current.stubs", "legacy.core.platform.api.stubs", "stable.core.platform.api.stubs",
case android.SdkCore.JavaLibraryName(ctx.Config()), "legacy.core.platform.api.stubs", "stable.core.platform.api.stubs",
"stub-annotations", "private-stub-annotations-jar",
"core-lambda-stubs", "core-generated-annotation-stubs":
return javaCore, true

View File

@@ -148,10 +148,11 @@ func decodeSdkDep(ctx android.EarlyModuleContext, sdkContext android.SdkContext)
toModule := func(module string, aidl android.Path) sdkDep {
// Select the kind of system modules needed for the sdk version.
systemModulesKind := systemModuleKind(sdkVersion.Kind, android.FutureApiLevel)
systemModules := android.JavaApiLibraryName(ctx.Config(), fmt.Sprintf("core-%s-stubs-system-modules", systemModulesKind))
return sdkDep{
useModule: true,
bootclasspath: []string{module, config.DefaultLambdaStubsLibrary},
systemModules: fmt.Sprintf("core-%s-stubs-system-modules", systemModulesKind),
systemModules: systemModules,
java9Classpath: []string{module},
frameworkResModule: "framework-res",
aidl: android.OptionalPathForPath(aidl),
@@ -196,8 +197,8 @@ func decodeSdkDep(ctx android.EarlyModuleContext, sdkContext android.SdkContext)
case android.SdkCore:
return sdkDep{
useModule: true,
bootclasspath: []string{"core.current.stubs", config.DefaultLambdaStubsLibrary},
systemModules: "core-public-stubs-system-modules",
bootclasspath: []string{android.SdkCore.JavaLibraryName(ctx.Config()), config.DefaultLambdaStubsLibrary},
systemModules: android.JavaApiLibraryName(ctx.Config(), "core-public-stubs-system-modules"),
noFrameworksLibs: true,
}
case android.SdkModule: