Merge "Do not allow updatable apps without min_sdk_version." am: 8df4e08e53 am: 0468ffaa45

Change-Id: I70869f20c15380e1e6d5d037d9a01b62bc5b6302
This commit is contained in:
Treehugger Robot
2020-04-27 18:56:18 +00:00
committed by Automerger Merge Worker
2 changed files with 25 additions and 1 deletions

View File

@@ -276,6 +276,7 @@ func TestUpdatableApps(t *testing.T) {
name: "foo",
srcs: ["a.java"],
sdk_version: "29",
min_sdk_version: "29",
updatable: true,
}`,
},
@@ -285,6 +286,7 @@ func TestUpdatableApps(t *testing.T) {
name: "foo",
srcs: ["a.java"],
sdk_version: "system_29",
min_sdk_version: "29",
updatable: true,
}`,
},
@@ -294,6 +296,7 @@ func TestUpdatableApps(t *testing.T) {
name: "foo",
srcs: ["a.java"],
sdk_version: "current",
min_sdk_version: "29",
updatable: true,
}`,
},
@@ -303,6 +306,7 @@ func TestUpdatableApps(t *testing.T) {
name: "foo",
srcs: ["a.java"],
sdk_version: "system_current",
min_sdk_version: "29",
updatable: true,
}`,
},
@@ -312,6 +316,7 @@ func TestUpdatableApps(t *testing.T) {
name: "foo",
srcs: ["a.java"],
sdk_version: "module_current",
min_sdk_version: "29",
updatable: true,
}`,
},
@@ -321,6 +326,7 @@ func TestUpdatableApps(t *testing.T) {
name: "foo",
srcs: ["a.java"],
sdk_version: "core_current",
min_sdk_version: "29",
updatable: true,
}`,
},
@@ -330,6 +336,7 @@ func TestUpdatableApps(t *testing.T) {
name: "foo",
srcs: ["a.java"],
platform_apis: true,
min_sdk_version: "29",
updatable: true,
}`,
expectedError: "Updatable apps must use stable SDKs",
@@ -340,6 +347,7 @@ func TestUpdatableApps(t *testing.T) {
name: "foo",
srcs: ["a.java"],
sdk_version: "core_platform",
min_sdk_version: "29",
updatable: true,
}`,
expectedError: "Updatable apps must use stable SDKs",
@@ -350,9 +358,20 @@ func TestUpdatableApps(t *testing.T) {
name: "foo",
srcs: ["a.java"],
updatable: true,
min_sdk_version: "29",
}`,
expectedError: "Updatable apps must use stable SDK",
},
{
name: "Must specify min_sdk_version",
bp: `android_app {
name: "app_without_min_sdk_version",
srcs: ["a.java"],
sdk_version: "29",
updatable: true,
}`,
expectedError: "updatable apps must set min_sdk_version.",
},
}
for _, test := range testCases {