summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2021-03-05 00:00:01 +0000
committerDaulet Zhanguzin <dauletz@google.com>2021-03-10 13:04:03 +0000
commit043f5e78811df7cff70aeefec99e7f8172bf48ab (patch)
tree3093a498367b3b1d55ff414c7c36cba65e82f6f8 /java/java.go
parent282671d696c926735d5ff54c3b6e75c2b5559169 (diff)
Treat core_platform as stable unless module uses legacy
The sdk_version: "core_platform" refers to the stable core platform unless the module is in the exception list. This change makes sure that CheckStableSdkVersion() reflects that behavior. Bug: 180399951 Test: m nothing Change-Id: Ia0b1e13322352b87f5a3c6621e37f23ba637ffb6
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/java/java.go b/java/java.go
index 9e3583501..2f8edff62 100644
--- a/java/java.go
+++ b/java/java.go
@@ -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) {