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/DexBuilderTest.java", 41 "src/android/startop/test/LayoutCompilerTest.java", 42 ], 43 sdk_version: "current", 44 data: [":generate_dex_testcases", ":generate_compiled_layout1", ":generate_compiled_layout2"], 45 static_libs: [ 46 "androidx.test.rules", 47 "guava", 48 ], 49 manifest: "AndroidManifest.xml", 50 resource_dirs: ["res"], 51 test_config: "AndroidTest.xml", 52 test_suites: ["general-tests"], 53} 54