blob: 0be4cccad84a4bd5d081e3c1767d6dd1c57e5c4e [file] [log] [blame]
Colin Cross72a8c4a2019-05-28 14:03:41 -07001//
2// Copyright (C) 2008 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
17//
18// Define rules to build temp_layoutlib.jar, which contains a subset of
19// the classes in framework.jar. The layoutlib_create tool is used to
20// transform the framework jar into the temp_layoutlib jar.
21//
22
Bob Badour5da52842021-02-12 20:17:07 -080023package {
Bob Badour182a1852022-01-19 15:33:57 -080024 // See: http://go/android-license-faq
25 default_applicable_licenses: ["Android-Apache-2.0"],
Bob Badour5da52842021-02-12 20:17:07 -080026}
27
Colin Cross72a8c4a2019-05-28 14:03:41 -070028java_genrule_host {
29 name: "temp_layoutlib",
30 tools: ["layoutlib_create"],
31 out: ["temp_layoutlib.jar"],
32 srcs: [
Shengxiong Xiaa10587d2021-04-30 19:09:31 +000033 ":atf-prebuilt-371374941{.jar}",
Paul Duffind6d63812021-04-21 10:30:35 +010034 ":core-icu4j-for-host{.jar}",
Paul Duffin07ac8442021-04-19 17:26:27 +010035 ":core-libart-for-host{.jar}",
Jerome Gaillard0fe257a2020-01-02 17:50:50 +000036 ":framework-all{.jar}",
Colin Cross72a8c4a2019-05-28 14:03:41 -070037 ":ext{.jar}",
38 ":icu4j-icudata-jarjar{.jar}", // HOST
39 ":icu4j-icutzdata-jarjar{.jar}", // HOST
40 ],
41 cmd: "rm -f $(out) && $(location layoutlib_create) --create-stub $(out) $(in)",
42}
Jerome Gaillard89531a22019-06-06 12:14:09 +010043
44java_genrule_host {
45 name: "layoutlib-native-delegates",
46 tools: ["layoutlib_create"],
47 out: ["layoutlib-native-delegates.jar"],
48 srcs: [
49 ":framework{.jar}",
50 ],
51 cmd: "rm -f $(out) && $(location layoutlib_create) --create-native-only-delegates $(out) $(in)",
52}
Jerome Gaillarda4937002021-09-22 16:00:25 +010053
54java_device_for_host {
55 name: "layoutlib_create-classpath",
56 libs: [
57 "conscrypt-for-host",
58 "core-icu4j-for-host",
59 "core-libart-for-host",
60 "ext",
61 "framework-all",
62 "icu4j-icudata-jarjar",
63 "icu4j-icutzdata-jarjar",
64 ],
65}