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 23package { 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 51java_genrule_host { 52 name: "temp_layoutlib", 53 tools: ["layoutlib_create"], 54 out: ["temp_layoutlib.jar"], 55 srcs: [ 56 ":atf-prebuilt{.jar}", 57 ":core-icu4j-for-host{.jar}", 58 ":core-libart-for-host{.jar}", 59 ":framework-all{.jar}", 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} 66