blob: 22a3cfafbc44117493825e4413d61c63cc8f0021 [file] [log] [blame]
Eric Holkd683f9f2018-10-26 16:08:09 -07001//
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
Eric Holk42734572018-12-17 15:46:18 -080017genrule {
Eric Holkd1b43832019-01-29 08:32:42 -080018 name: "generate_compiled_layout1",
Eric Holk42734572018-12-17 15:46:18 -080019 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
Eric Holkd1b43832019-01-29 08:32:42 -080027genrule {
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
Eric Holkd683f9f2018-10-26 16:08:09 -070037android_test {
38 name: "dex-builder-test",
Eric Holk42734572018-12-17 15:46:18 -080039 srcs: [
40 "src/android/startop/test/DexBuilderTest.java",
41 "src/android/startop/test/LayoutCompilerTest.java",
42 ],
Eric Holkd683f9f2018-10-26 16:08:09 -070043 sdk_version: "current",
Eric Holkd1b43832019-01-29 08:32:42 -080044 data: [":generate_dex_testcases", ":generate_compiled_layout1", ":generate_compiled_layout2"],
Eric Holkd683f9f2018-10-26 16:08:09 -070045 static_libs: [
Brett Chabot502ec7a2019-03-01 14:43:20 -080046 "androidx.test.rules",
Eric Holkd683f9f2018-10-26 16:08:09 -070047 "guava",
48 ],
49 manifest: "AndroidManifest.xml",
Eric Holk42734572018-12-17 15:46:18 -080050 resource_dirs: ["res"],
Eric Holkd683f9f2018-10-26 16:08:09 -070051 test_config: "AndroidTest.xml",
52 test_suites: ["general-tests"],
53}