Rename core stubs to .txt stubs if applicable

In scope:
- core.current.stubs
- system modules generated for core's public stubs
- system modules generated for core's module_lib stubs

The system modules generated for core_platform api surface will be
handled in aosp/2514755

Test: go build ./java
Change-Id: I34134f79c8ae6e5b218d0b85553de5a748a8cc3f
This commit is contained in:
Spandan Das
2023-03-30 02:59:22 +00:00
parent a032c35320
commit e339a2d9a3
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) { func (m *Module) getSdkLinkType(ctx android.BaseModuleContext, name string) (ret sdkLinkType, stubs bool) {
switch name { 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", "stub-annotations", "private-stub-annotations-jar",
"core-lambda-stubs", "core-generated-annotation-stubs": "core-lambda-stubs", "core-generated-annotation-stubs":
return javaCore, true 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 { toModule := func(module string, aidl android.Path) sdkDep {
// Select the kind of system modules needed for the sdk version. // Select the kind of system modules needed for the sdk version.
systemModulesKind := systemModuleKind(sdkVersion.Kind, android.FutureApiLevel) systemModulesKind := systemModuleKind(sdkVersion.Kind, android.FutureApiLevel)
systemModules := android.JavaApiLibraryName(ctx.Config(), fmt.Sprintf("core-%s-stubs-system-modules", systemModulesKind))
return sdkDep{ return sdkDep{
useModule: true, useModule: true,
bootclasspath: []string{module, config.DefaultLambdaStubsLibrary}, bootclasspath: []string{module, config.DefaultLambdaStubsLibrary},
systemModules: fmt.Sprintf("core-%s-stubs-system-modules", systemModulesKind), systemModules: systemModules,
java9Classpath: []string{module}, java9Classpath: []string{module},
frameworkResModule: "framework-res", frameworkResModule: "framework-res",
aidl: android.OptionalPathForPath(aidl), aidl: android.OptionalPathForPath(aidl),
@@ -196,8 +197,8 @@ func decodeSdkDep(ctx android.EarlyModuleContext, sdkContext android.SdkContext)
case android.SdkCore: case android.SdkCore:
return sdkDep{ return sdkDep{
useModule: true, useModule: true,
bootclasspath: []string{"core.current.stubs", config.DefaultLambdaStubsLibrary}, bootclasspath: []string{android.SdkCore.JavaLibraryName(ctx.Config()), config.DefaultLambdaStubsLibrary},
systemModules: "core-public-stubs-system-modules", systemModules: android.JavaApiLibraryName(ctx.Config(), "core-public-stubs-system-modules"),
noFrameworksLibs: true, noFrameworksLibs: true,
} }
case android.SdkModule: case android.SdkModule: