1// 2// Copyright (C) 2018 The Android Open Source Project 3// 4// Licensed under the Apache License, Version 2.0 (the "License"); 5// you may not use this file except in compliance with the License. 6// You may obtain a copy of the License at 7// 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// See the License for the specific language governing permissions and 14// limitations under the License. 15// 16 17genrule { 18 name: "generate_compiled_layout1", 19 tools: [":viewcompiler"], 20 cmd: "$(location :viewcompiler) $(in) --dex --out $(out) --package android.startop.test", 21 srcs: ["res/layout/layout1.xml"], 22 out: [ 23 "layout1.dex", 24 ], 25} 26 27genrule { 28 name: "generate_compiled_layout2", 29 tools: [":viewcompiler"], 30 cmd: "$(location :viewcompiler) $(in) --dex --out $(out) --package android.startop.test", 31 srcs: ["res/layout/layout2.xml"], 32 out: [ 33 "layout2.dex", 34 ], 35} 36 37android_test { 38 name: "dex-builder-test", 39 srcs: [ 40 "src/android/startop/test/ApkLayoutCompilerTest.java", 41 "src/android/startop/test/DexBuilderTest.java", 42 "src/android/startop/test/LayoutCompilerTest.java", 43 "src/android/startop/test/TestClass.java", 44 ], 45 sdk_version: "current", 46 data: [ 47 ":generate_dex_testcases", 48 ":generate_compiled_layout1", 49 ":generate_compiled_layout2", 50 ], 51 static_libs: [ 52 "androidx.test.core", 53 "androidx.test.runner", 54 "junit", 55 ], 56 manifest: "AndroidManifest.xml", 57 resource_dirs: ["res"], 58 test_config: "AndroidTest.xml", 59 test_suites: ["general-tests"], 60} 61