| // Copyright (C) 2020 Google Inc. |
| // |
| // Licensed under the Apache License, Version 2.0 (the "License"); |
| // you may not use this file except in compliance with the License. |
| // You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| |
| // v1 implementation of test app built with v1 manifest. |
| android_test_helper_app { |
| name: "IncrementalTestApp", |
| srcs: ["v1/src/**/*.java"], |
| dex_preopt: { |
| enabled: false, |
| }, |
| optimize: { |
| enabled: false, |
| }, |
| test_suites: [ |
| "cts", |
| ], |
| v4_signature: true, |
| static_libs: [ |
| "incremental-install-common-lib", |
| ], |
| sdk_version: "test_current", |
| export_package_resources: true, |
| aapt_include_all_resources: true, |
| manifest: "AndroidManifestV1.xml", |
| } |
| |
| // v2 implementation of test app built with v1 manifest for zero version update test. |
| android_test_helper_app { |
| name: "IncrementalTestApp2_v1", |
| srcs: ["v2/src/**/*.java"], |
| dex_preopt: { |
| enabled: false, |
| }, |
| optimize: { |
| enabled: false, |
| }, |
| test_suites: [ |
| "cts", |
| ], |
| v4_signature: true, |
| static_libs: [ |
| "incremental-install-common-lib", |
| ], |
| sdk_version: "test_current", |
| export_package_resources: true, |
| aapt_include_all_resources: true, |
| manifest: "AndroidManifestV1.xml", |
| } |
| |
| // v2 implementation of test app built with v2 manifest for version update test. |
| android_test_helper_app { |
| name: "IncrementalTestApp2_v2", |
| srcs: ["v2/src/**/*.java"], |
| dex_preopt: { |
| enabled: false, |
| }, |
| optimize: { |
| enabled: false, |
| }, |
| test_suites: [ |
| "cts", |
| ], |
| v4_signature: true, |
| static_libs: [ |
| "incremental-install-common-lib", |
| ], |
| sdk_version: "test_current", |
| export_package_resources: true, |
| aapt_include_all_resources: true, |
| manifest: "AndroidManifestV2.xml", |
| } |
| |
| genrule { |
| // copy apks and id sig to gendir. |
| name: "IncrementalTestAppRule", |
| srcs: [":IncrementalTestApp", |
| ":IncrementalTestApp2_v1", |
| ":IncrementalTestApp2_v2", |
| ":IncrementalTestAppDynamicAsset", |
| ":IncrementalTestAppDynamicCode", |
| ":IncrementalTestAppCompressedNativeLib", |
| ":IncrementalTestAppUncompressedNativeLib",], |
| out: ["IncrementalTestApp.apk.idsig", |
| "IncrementalTestApp2_v1.apk.idsig", |
| "IncrementalTestApp2_v2.apk.idsig", |
| "IncrementalTestAppDynamicAsset.apk", "IncrementalTestAppDynamicAsset.apk.idsig", |
| "IncrementalTestAppDynamicCode.apk", "IncrementalTestAppDynamicCode.apk.idsig", |
| "IncrementalTestAppCompressedNativeLib.apk", "IncrementalTestAppCompressedNativeLib.apk.idsig", |
| "IncrementalTestAppUncompressedNativeLib.apk", "IncrementalTestAppUncompressedNativeLib.apk.idsig",], |
| cmd: "cp $(locations :IncrementalTestApp) $(genDir)" + |
| " && cp $(locations :IncrementalTestApp2_v1) $(genDir)" + |
| " && cp $(locations :IncrementalTestApp2_v2) $(genDir)" + |
| " && cp $(locations :IncrementalTestAppDynamicAsset) $(genDir)" + |
| " && cp $(locations :IncrementalTestAppDynamicCode) $(genDir)" + |
| " && cp $(locations :IncrementalTestAppCompressedNativeLib) $(genDir)" + |
| " && cp $(locations :IncrementalTestAppUncompressedNativeLib) $(genDir)", |
| } |