blob: 048b78e94257b791abe44acd047720db2672ed58 [file] [log] [blame]
Colin Cross17346582019-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 {
24 default_applicable_licenses: ["frameworks_layoutlib_license"],
25}
26
27// Added automatically by a large-scale-change that took the approach of
28// 'apply every license found to every target'. While this makes sure we respect
29// every license restriction, it may not be entirely correct.
30//
31// e.g. GPL in an MIT project might only apply to the contrib/ directory.
32//
33// Please consider splitting the single license below into multiple licenses,
34// taking care not to lose any license_kind information, and overriding the
35// default license using the 'licenses: [...]' property on targets as needed.
36//
37// For unused files, consider creating a 'fileGroup' with "//visibility:private"
38// to attach the license to, and including a comment whether the files may be
39// used in the current project.
40// See: http://go/android-license-faq
41license {
42 name: "frameworks_layoutlib_license",
43 visibility: [":__subpackages__"],
44 license_kinds: [
45 "SPDX-license-identifier-Apache-2.0",
46 "SPDX-license-identifier-EPL",
47 ],
48 // large-scale-change unable to identify any license_text files
49}
50
Colin Cross17346582019-05-28 14:03:41 -070051java_genrule_host {
52 name: "temp_layoutlib",
53 tools: ["layoutlib_create"],
54 out: ["temp_layoutlib.jar"],
55 srcs: [
Jerome Gaillard83924c12020-04-20 20:04:45 +010056 ":atf-prebuilt{.jar}",
Paul Duffind6d63812021-04-21 10:30:35 +010057 ":core-icu4j-for-host{.jar}",
Paul Duffin07ac8442021-04-19 17:26:27 +010058 ":core-libart-for-host{.jar}",
Jerome Gaillard0fe257a2020-01-02 17:50:50 +000059 ":framework-all{.jar}",
Colin Cross17346582019-05-28 14:03:41 -070060 ":ext{.jar}",
61 ":icu4j-icudata-jarjar{.jar}", // HOST
62 ":icu4j-icutzdata-jarjar{.jar}", // HOST
63 ],
64 cmd: "rm -f $(out) && $(location layoutlib_create) --create-stub $(out) $(in)",
65}