Remove sdk_version if platform_apis is set

This CL is to make `android_test` and `android_test_helper_app` more consistent with documentation which suggests sdk_version must be empty if platform_apis is set.

https://cs.android.com/android/platform/superproject/+/master:build/soong/java/base.go;bpv=1;bpt=1;l=211?gsn=Platform_apis&gs=kythe%3A%2F%2Fandroid.googlesource.com%2Fplatform%2Fsuperproject%3Flang%3Dgo%3Fpath%3Dbuild%2Fsoong%2Fjava%23field%2520DeviceProperties.Platform_apis

Next step:
* Add validation to error when both `sdk_version` and `platform_apis` are set. WIP: aosp/2065270

Test: The affected test modules are FramefworksCoreTests, BugreportManagerTestCases, FrameworksCorePackageInstallerSessionsTests , and PackageManagerServiceHostTests. Some tests in FrameworksCorePackageInstallerSessionsTests and PackageManagerServiceHostTests fail but this CL doesn't produce any regression from the last known build. In other words, the last known build also has the same test failures.
Bug: 219755537
Change-Id: I50405b37b7454a78f1dbd240380d2e98b8bb34b2
This commit is contained in:
Vinh Tran
2022-04-18 21:53:39 +00:00
parent 2a3aa26b06
commit 160172d92d
4 changed files with 0 additions and 4 deletions

View File

@@ -51,6 +51,5 @@ android_test {
],
platform_apis: true,
sdk_version: "core_platform",
test_suites: ["device-tests"],
}

View File

@@ -35,7 +35,6 @@ android_test {
"truth-prebuilt",
],
test_suites: ["general-tests"],
sdk_version: "test_current",
platform_apis: true,
}

View File

@@ -73,7 +73,6 @@ android_test {
],
platform_apis: true,
sdk_version: "core_platform",
test_suites: ["device-tests"],
certificate: "platform",

View File

@@ -25,7 +25,6 @@ package {
android_test_helper_app {
name: "PackageManagerServiceDeviceSideTests",
sdk_version: "test_current",
srcs: ["src/**/*.kt"],
libs: [
"android.test.base",