Enforce the legacy core/platform API restriction.

This change silently decides whether modules which depend on either
sdkPrivate or sdkCorePlatform get the legacy or the stable version of
the core/platform API, based on whether the module's name is on a
hard-coded list or not.

Test: m java
Test: make a target from the list when its entry is commented out, which correctly fails
Bug: 157640067
Change-Id: I15e5a6c2f07e73718803501d705de0d7ab9bec90
This commit is contained in:
Pete Gillin
2020-07-09 18:03:41 +01:00
parent f9828bf665
commit c0f4373106
7 changed files with 291 additions and 22 deletions

View File

@@ -413,8 +413,8 @@ func decodeSdkDep(ctx android.EarlyModuleContext, sdkContext sdkContext) sdkDep
case sdkPrivate:
return sdkDep{
useModule: true,
systemModules: config.LegacyCorePlatformSystemModules,
bootclasspath: config.LegacyCorePlatformBootclasspathLibraries,
systemModules: corePlatformSystemModules(ctx),
bootclasspath: corePlatformBootclasspathLibraries(ctx),
classpath: config.FrameworkLibraries,
frameworkResModule: "framework-res",
}
@@ -438,8 +438,8 @@ func decodeSdkDep(ctx android.EarlyModuleContext, sdkContext sdkContext) sdkDep
case sdkCorePlatform:
return sdkDep{
useModule: true,
systemModules: config.LegacyCorePlatformSystemModules,
bootclasspath: config.LegacyCorePlatformBootclasspathLibraries,
systemModules: corePlatformSystemModules(ctx),
bootclasspath: corePlatformBootclasspathLibraries(ctx),
noFrameworksLibs: true,
}
case sdkPublic: