Colin Cross | 1734658 | 2019-05-28 14:03:41 -0700 | [diff] [blame] | 1 | // |
| 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 Badour | 5da5284 | 2021-02-12 20:17:07 -0800 | [diff] [blame] | 23 | package { |
| 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 |
| 41 | license { |
| 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 Cross | 1734658 | 2019-05-28 14:03:41 -0700 | [diff] [blame] | 51 | java_genrule_host { |
| 52 | name: "temp_layoutlib", |
| 53 | tools: ["layoutlib_create"], |
| 54 | out: ["temp_layoutlib.jar"], |
| 55 | srcs: [ |
Jerome Gaillard | 83924c1 | 2020-04-20 20:04:45 +0100 | [diff] [blame] | 56 | ":atf-prebuilt{.jar}", |
Paul Duffin | d6d6381 | 2021-04-21 10:30:35 +0100 | [diff] [blame] | 57 | ":core-icu4j-for-host{.jar}", |
Paul Duffin | 07ac844 | 2021-04-19 17:26:27 +0100 | [diff] [blame] | 58 | ":core-libart-for-host{.jar}", |
Jerome Gaillard | 0fe257a | 2020-01-02 17:50:50 +0000 | [diff] [blame] | 59 | ":framework-all{.jar}", |
Colin Cross | 1734658 | 2019-05-28 14:03:41 -0700 | [diff] [blame] | 60 | ":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 | } |