1// Copyright (C) 2014 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15package { 16 default_applicable_licenses: ["frameworks_base_license"], 17} 18 19android_test_helper_app { 20 name: "MultiDexLegacyTestApp_without_corrupted", 21 22 srcs: ["src/**/*.java"], 23 24 sdk_version: "16", 25 26 static_libs: ["android-support-multidex"], 27} 28 29java_genrule { 30 name: "MultiDexLegacyTestApp_genrule", 31 srcs: [ 32 ":MultiDexLegacyTestApp_without_corrupted", 33 ], 34 tools: [ 35 "soong_zip", 36 "merge_zips", 37 ], 38 out: ["MultiDexLegacyTestApp_with_corrupted.apk"], 39 cmd: "touch $(genDir)/classes2.dex &&" + 40 " $(location soong_zip) -o $(genDir)/corrupted.zip -j -f $(genDir)/classes2.dex &&" + 41 " $(location merge_zips) $(out) $(location :MultiDexLegacyTestApp_without_corrupted) $(genDir)/corrupted.zip", 42} 43 44android_test_import { 45 name: "MultiDexLegacyTestApp_corrupted", 46 apk: ":MultiDexLegacyTestApp_genrule", 47 default_dev_cert: true, 48} 49