Merge "Treat core_platform as stable unless module uses legacy"

This commit is contained in:
Nicolas Geoffray
2021-03-15 08:42:43 +00:00
committed by Gerrit Code Review
3 changed files with 21 additions and 5 deletions

View File

@@ -122,7 +122,16 @@ func (j *Module) CheckStableSdkVersion() error {
if sdkVersion.stable() {
return nil
}
return fmt.Errorf("non stable SDK %v", sdkVersion)
if sdkVersion.kind == sdkCorePlatform {
if useLegacyCorePlatformApiByName(j.BaseModuleName()) {
return fmt.Errorf("non stable SDK %v - uses legacy core platform", sdkVersion)
} else {
// Treat stable core platform as stable.
return nil
}
} else {
return fmt.Errorf("non stable SDK %v", sdkVersion)
}
}
func (j *Module) checkSdkVersions(ctx android.ModuleContext) {