diff --git a/Android.bp b/Android.bp new file mode 100644 index 000000000..ab2564e9e --- /dev/null +++ b/Android.bp @@ -0,0 +1,49 @@ +// +// Copyright (C) 2021 The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package { + default_applicable_licenses: ["build_make_license"], +} + +// Added automatically by a large-scale-change that took the approach of +// 'apply every license found to every target'. While this makes sure we respect +// every license restriction, it may not be entirely correct. +// +// e.g. GPL in an MIT project might only apply to the contrib/ directory. +// +// Please consider splitting the single license below into multiple licenses, +// taking care not to lose any license_kind information, and overriding the +// default license using the 'licenses: [...]' property on targets as needed. +// +// For unused files, consider creating a 'fileGroup' with "//visibility:private" +// to attach the license to, and including a comment whether the files may be +// used in the current project. +// See: http://go/android-license-faq +license { + name: "build_make_license", + visibility: [":__subpackages__"], + license_kinds: [ + "SPDX-license-identifier-Apache-2.0", + "SPDX-license-identifier-BSD", + "SPDX-license-identifier-CC-BY", + "SPDX-license-identifier-GPL", + "SPDX-license-identifier-GPL-2.0", + "SPDX-license-identifier-LGPL", + "SPDX-license-identifier-MIT", + "legacy_not_a_contribution", + "legacy_restricted", + ], + // large-scale-change unable to identify any license_text files +} diff --git a/core/base_rules.mk b/core/base_rules.mk index 68f880f26..196dc4830 100644 --- a/core/base_rules.mk +++ b/core/base_rules.mk @@ -28,6 +28,8 @@ endif ########################################################### LOCAL_MODULE := $(strip $(LOCAL_MODULE)) +LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD SPDX-license-identifier-GPL SPDX-license-identifier-GPL-2.0 SPDX-license-identifier-LGPL SPDX-license-identifier-MIT +LOCAL_LICENSE_CONDITIONS := notice restricted ifeq ($(LOCAL_MODULE),) $(error $(LOCAL_PATH): LOCAL_MODULE is not defined) endif diff --git a/core/dex_preopt_libart.mk b/core/dex_preopt_libart.mk index 8f0702ba6..d69332083 100644 --- a/core/dex_preopt_libart.mk +++ b/core/dex_preopt_libart.mk @@ -60,6 +60,8 @@ ifneq (,$(my_copy_pairs)) include $(CLEAR_VARS) LOCAL_MODULE := dexpreopt_bootjar.$(my_suffix) + LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD SPDX-license-identifier-GPL SPDX-license-identifier-GPL-2.0 SPDX-license-identifier-LGPL SPDX-license-identifier-MIT + LOCAL_LICENSE_CONDITIONS := notice restricted LOCAL_PREBUILT_MODULE_FILE := $(my_first_src) LOCAL_MODULE_PATH := $(dir $(my_first_dest)) LOCAL_MODULE_STEM := $(notdir $(my_first_dest)) diff --git a/core/package_internal.mk b/core/package_internal.mk index 1b4062429..6cb1589a1 100644 --- a/core/package_internal.mk +++ b/core/package_internal.mk @@ -39,6 +39,8 @@ ifneq ($(strip $(LOCAL_MODULE)),) $(error $(LOCAL_PATH): Package modules may not define LOCAL_MODULE) endif LOCAL_MODULE := $(LOCAL_PACKAGE_NAME) +LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD SPDX-license-identifier-GPL SPDX-license-identifier-GPL-2.0 SPDX-license-identifier-LGPL SPDX-license-identifier-MIT +LOCAL_LICENSE_CONDITIONS := notice restricted ifneq ($(strip $(LOCAL_MODULE_CLASS)),) $(error $(LOCAL_PATH): Package modules may not set LOCAL_MODULE_CLASS) diff --git a/core/tasks/tools/package-modules.mk b/core/tasks/tools/package-modules.mk index 2b43f0fed..63a25b502 100644 --- a/core/tasks/tools/package-modules.mk +++ b/core/tasks/tools/package-modules.mk @@ -19,6 +19,8 @@ my_makefile := $(lastword $(filter-out $(lastword $(MAKEFILE_LIST)),$(MAKEFILE_L include $(CLEAR_VARS) LOCAL_MODULE := $(my_package_name) +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted LOCAL_MODULE_CLASS := PACKAGING LOCAL_MODULE_STEM := $(my_package_name).zip LOCAL_UNINSTALLABLE_MODULE := true diff --git a/target/board/Android.mk b/target/board/Android.mk index 9edc85c8e..4dd6b17e3 100644 --- a/target/board/Android.mk +++ b/target/board/Android.mk @@ -35,6 +35,8 @@ ifdef DEVICE_MANIFEST_FILE # $(DEVICE_MANIFEST_FILE) can be a list of files include $(CLEAR_VARS) LOCAL_MODULE := vendor_manifest.xml +LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 legacy_not_a_contribution +LOCAL_LICENSE_CONDITIONS := by_exception_only not_allowed notice LOCAL_MODULE_STEM := manifest.xml LOCAL_MODULE_CLASS := ETC LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/vintf @@ -65,6 +67,8 @@ endif my_fragment_files := $$($$(my_fragment_files_var)) include $$(CLEAR_VARS) LOCAL_MODULE := vendor_manifest_$(1).xml +LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 legacy_not_a_contribution +LOCAL_LICENSE_CONDITIONS := by_exception_only not_allowed notice LOCAL_MODULE_STEM := manifest_$(1).xml LOCAL_MODULE_CLASS := ETC LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/vintf @@ -94,6 +98,8 @@ ifdef ODM_MANIFEST_FILES # ODM_MANIFEST_FILES is a list of files that is combined and installed as the default ODM manifest. include $(CLEAR_VARS) LOCAL_MODULE := odm_manifest.xml +LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 legacy_not_a_contribution +LOCAL_LICENSE_CONDITIONS := by_exception_only not_allowed notice LOCAL_MODULE_STEM := manifest.xml LOCAL_MODULE_CLASS := ETC LOCAL_MODULE_RELATIVE_PATH := vintf @@ -124,6 +130,8 @@ endif my_fragment_files := $$($$(my_fragment_files_var)) include $$(CLEAR_VARS) LOCAL_MODULE := odm_manifest_$(1).xml +LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 legacy_not_a_contribution +LOCAL_LICENSE_CONDITIONS := by_exception_only not_allowed notice LOCAL_MODULE_STEM := manifest_$(1).xml LOCAL_MODULE_CLASS := ETC LOCAL_MODULE_RELATIVE_PATH := vintf diff --git a/target/product/gsi/Android.bp b/target/product/gsi/Android.bp index b7ce86e47..88472ebe5 100644 --- a/target/product/gsi/Android.bp +++ b/target/product/gsi/Android.bp @@ -12,6 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "build_make_license" + // to get the below license kinds: + // legacy_restricted + default_applicable_licenses: ["build_make_license"], +} + filegroup { name: "vndk_lib_lists", srcs: [ diff --git a/target/product/gsi/Android.mk b/target/product/gsi/Android.mk index f21fe1691..ecce01a26 100644 --- a/target/product/gsi/Android.mk +++ b/target/product/gsi/Android.mk @@ -63,6 +63,8 @@ $(check-vndk-list-timestamp): $(INTERNAL_VNDK_LIB_LIST) $(LATEST_VNDK_LIB_LIST) # Script to update the latest VNDK lib list include $(CLEAR_VARS) LOCAL_MODULE := update-vndk-list.sh +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted LOCAL_MODULE_CLASS := EXECUTABLES LOCAL_MODULE_STEM := $(LOCAL_MODULE) LOCAL_IS_HOST_MODULE := true @@ -146,6 +148,8 @@ ifneq ($(BOARD_VNDK_VERSION),) include $(CLEAR_VARS) LOCAL_MODULE := vndk_package +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted # Filter LLNDK libs moved to APEX to avoid pulling them into /system/LIB LOCAL_REQUIRED_MODULES := \ $(filter-out $(LLNDK_MOVED_TO_APEX_LIBRARIES),$(LLNDK_LIBRARIES)) @@ -169,6 +173,8 @@ ifneq ($(BOARD_VNDK_VERSION),current) _vndk_versions += $(BOARD_VNDK_VERSION) endif LOCAL_MODULE := vndk_apex_snapshot_package +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted LOCAL_REQUIRED_MODULES := $(foreach vndk_ver,$(_vndk_versions),com.android.vndk.v$(vndk_ver)) include $(BUILD_PHONY_PACKAGE) @@ -181,6 +187,8 @@ endif # BOARD_VNDK_VERSION is set include $(CLEAR_VARS) LOCAL_MODULE := gsi_skip_mount.cfg +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted LOCAL_MODULE_STEM := skip_mount.cfg LOCAL_SRC_FILES := $(LOCAL_MODULE) LOCAL_MODULE_CLASS := ETC @@ -204,6 +212,8 @@ include $(BUILD_PREBUILT) include $(CLEAR_VARS) LOCAL_MODULE := init.gsi.rc +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted LOCAL_SRC_FILES := $(LOCAL_MODULE) LOCAL_MODULE_CLASS := ETC LOCAL_SYSTEM_EXT_MODULE := true @@ -214,6 +224,8 @@ include $(BUILD_PREBUILT) include $(CLEAR_VARS) LOCAL_MODULE := init.vndk-nodef.rc +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted LOCAL_SRC_FILES := $(LOCAL_MODULE) LOCAL_MODULE_CLASS := ETC LOCAL_SYSTEM_EXT_MODULE := true diff --git a/target/product/security/Android.bp b/target/product/security/Android.bp index 5f4f82b3e..98698c579 100644 --- a/target/product/security/Android.bp +++ b/target/product/security/Android.bp @@ -1,4 +1,13 @@ // AOSP test certificate +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "build_make_license" + // to get the below license kinds: + // legacy_restricted + default_applicable_licenses: ["build_make_license"], +} + android_app_certificate { name: "aosp-testkey", certificate: "testkey", diff --git a/target/product/security/Android.mk b/target/product/security/Android.mk index d6a8b5378..83f0a4bc1 100644 --- a/target/product/security/Android.mk +++ b/target/product/security/Android.mk @@ -5,6 +5,8 @@ LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := verity_key +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted LOCAL_SRC_FILES := $(LOCAL_MODULE) LOCAL_MODULE_CLASS := ETC LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) @@ -24,6 +26,8 @@ include $(BUILD_PREBUILT) ifneq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) include $(CLEAR_VARS) LOCAL_MODULE := verity_key_ramdisk + LOCAL_LICENSE_KINDS := legacy_restricted + LOCAL_LICENSE_CONDITIONS := restricted LOCAL_MODULE_CLASS := ETC LOCAL_SRC_FILES := verity_key LOCAL_MODULE_STEM := verity_key @@ -37,6 +41,8 @@ ifdef PRODUCT_ADB_KEYS ifneq ($(filter eng userdebug,$(TARGET_BUILD_VARIANT)),) include $(CLEAR_VARS) LOCAL_MODULE := adb_keys + LOCAL_LICENSE_KINDS := legacy_restricted + LOCAL_LICENSE_CONDITIONS := restricted LOCAL_MODULE_CLASS := ETC LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) LOCAL_PREBUILT_MODULE_FILE := $(PRODUCT_ADB_KEYS) @@ -51,6 +57,8 @@ endif include $(CLEAR_VARS) LOCAL_MODULE := otacerts +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted LOCAL_MODULE_CLASS := ETC LOCAL_MODULE_STEM := otacerts.zip LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/security @@ -65,6 +73,8 @@ $(LOCAL_BUILT_MODULE): $(SOONG_ZIP) $(DEFAULT_SYSTEM_DEV_CERTIFICATE).x509.pem include $(CLEAR_VARS) LOCAL_MODULE := otacerts.recovery +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted LOCAL_MODULE_CLASS := ETC LOCAL_MODULE_STEM := otacerts.zip LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/system/etc/security diff --git a/target/product/sysconfig/Android.bp b/target/product/sysconfig/Android.bp index 5632d17ca..29122e4af 100644 --- a/target/product/sysconfig/Android.bp +++ b/target/product/sysconfig/Android.bp @@ -12,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + prebuilt_etc { name: "preinstalled-packages-platform-aosp-product.xml", product_specific: true, @@ -30,4 +34,4 @@ prebuilt_etc { product_specific: true, sub_dir: "sysconfig", src: "preinstalled-packages-platform-handheld-product.xml", -} \ No newline at end of file +} diff --git a/tools/Android.bp b/tools/Android.bp index 357ee2ad1..269e610c7 100644 --- a/tools/Android.bp +++ b/tools/Android.bp @@ -12,6 +12,19 @@ // See the License for the specific language governing permissions and // limitations under the License. +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "build_make_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + // SPDX-license-identifier-BSD + // SPDX-license-identifier-CC-BY + // SPDX-license-identifier-GPL + // SPDX-license-identifier-MIT + default_applicable_licenses: ["build_make_license"], +} + python_binary_host { name: "generate-self-extracting-archive", srcs: ["generate-self-extracting-archive.py"], diff --git a/tools/acp/Android.bp b/tools/acp/Android.bp index 64f5a1013..78738b06a 100644 --- a/tools/acp/Android.bp +++ b/tools/acp/Android.bp @@ -2,6 +2,15 @@ // // Custom version of cp. +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "build_make_license" + // to get the below license kinds: + // legacy_restricted + default_applicable_licenses: ["build_make_license"], +} + cc_binary_host { srcs: ["acp.c"], diff --git a/tools/apicheck/Android.bp b/tools/apicheck/Android.bp index 8fe20e91f..f58042f67 100644 --- a/tools/apicheck/Android.bp +++ b/tools/apicheck/Android.bp @@ -12,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + java_binary_host { name: "apicheck", wrapper: "etc/apicheck", diff --git a/tools/atree/Android.bp b/tools/atree/Android.bp index 5fbe042ea..7906d8b5e 100644 --- a/tools/atree/Android.bp +++ b/tools/atree/Android.bp @@ -2,6 +2,15 @@ // // Copies files into the directory structure described by a manifest +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "build_make_license" + // to get the below license kinds: + // legacy_restricted + default_applicable_licenses: ["build_make_license"], +} + cc_binary_host { name: "atree", srcs: [ diff --git a/tools/droiddoc/Android.bp b/tools/droiddoc/Android.bp index 042806850..efd30c184 100644 --- a/tools/droiddoc/Android.bp +++ b/tools/droiddoc/Android.bp @@ -12,6 +12,19 @@ // See the License for the specific language governing permissions and // limitations under the License. +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "build_make_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + // SPDX-license-identifier-BSD + // SPDX-license-identifier-CC-BY + // SPDX-license-identifier-GPL + // SPDX-license-identifier-MIT + default_applicable_licenses: ["build_make_license"], +} + droiddoc_exported_dir { name: "droiddoc-templates-pdk", path: "templates-pdk", diff --git a/tools/fs_config/Android.bp b/tools/fs_config/Android.bp index 1dd5e4a45..4544e076c 100644 --- a/tools/fs_config/Android.bp +++ b/tools/fs_config/Android.bp @@ -12,6 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "build_make_license" + // to get the below license kinds: + // legacy_restricted + default_applicable_licenses: ["build_make_license"], +} + bootstrap_go_package { name: "soong-fs_config", pkgPath: "android/soong/fs_config", diff --git a/tools/fs_config/Android.mk b/tools/fs_config/Android.mk index c338462da..10d25e04c 100644 --- a/tools/fs_config/Android.mk +++ b/tools/fs_config/Android.mk @@ -42,6 +42,8 @@ fs_config_generate_extra_partition_list := $(strip \ include $(CLEAR_VARS) LOCAL_MODULE := fs_config_dirs +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted LOCAL_REQUIRED_MODULES := \ fs_config_dirs_system \ fs_config_dirs_system_ext \ @@ -55,6 +57,8 @@ include $(BUILD_PHONY_PACKAGE) include $(CLEAR_VARS) LOCAL_MODULE := fs_config_files +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted LOCAL_REQUIRED_MODULES := \ fs_config_files_system \ fs_config_files_system_ext \ @@ -69,6 +73,8 @@ include $(BUILD_PHONY_PACKAGE) include $(CLEAR_VARS) LOCAL_MODULE := fs_config_dirs_system_ext +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted LOCAL_REQUIRED_MODULES := $(if $(BOARD_USES_SYSTEM_EXTIMAGE)$(BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE),_fs_config_dirs_system_ext) include $(BUILD_PHONY_PACKAGE) @@ -79,6 +85,8 @@ include $(BUILD_PHONY_PACKAGE) include $(CLEAR_VARS) LOCAL_MODULE := fs_config_files_system_ext +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted LOCAL_REQUIRED_MODULES := $(if $(BOARD_USES_SYSTEM_EXTIMAGE)$(BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE),_fs_config_files_system_ext) include $(BUILD_PHONY_PACKAGE) @@ -89,6 +97,8 @@ include $(BUILD_PHONY_PACKAGE) include $(CLEAR_VARS) LOCAL_MODULE := fs_config_dirs_product +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted LOCAL_REQUIRED_MODULES := $(if $(BOARD_USES_PRODUCTIMAGE)$(BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE),_fs_config_dirs_product) include $(BUILD_PHONY_PACKAGE) @@ -99,6 +109,8 @@ include $(BUILD_PHONY_PACKAGE) include $(CLEAR_VARS) LOCAL_MODULE := fs_config_files_product +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted LOCAL_REQUIRED_MODULES := $(if $(BOARD_USES_PRODUCTIMAGE)$(BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE),_fs_config_files_product) include $(BUILD_PHONY_PACKAGE) @@ -109,6 +121,8 @@ include $(BUILD_PHONY_PACKAGE) include $(CLEAR_VARS) LOCAL_MODULE := fs_config_dirs_nonsystem +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted LOCAL_REQUIRED_MODULES := $(foreach t,$(fs_config_generate_extra_partition_list),_fs_config_dirs_$(t)) include $(BUILD_PHONY_PACKAGE) @@ -119,6 +133,8 @@ include $(BUILD_PHONY_PACKAGE) include $(CLEAR_VARS) LOCAL_MODULE := fs_config_files_nonsystem +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted LOCAL_REQUIRED_MODULES := $(foreach t,$(fs_config_generate_extra_partition_list),_fs_config_files_$(t)) include $(BUILD_PHONY_PACKAGE) @@ -129,6 +145,8 @@ include $(BUILD_PHONY_PACKAGE) include $(CLEAR_VARS) LOCAL_MODULE := fs_config_dirs_system +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted LOCAL_MODULE_CLASS := ETC LOCAL_INSTALLED_MODULE_STEM := fs_config_dirs include $(BUILD_SYSTEM)/base_rules.mk @@ -154,6 +172,8 @@ $(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/fs_config_generator.py $(TARGET_FS_CONFIG_G include $(CLEAR_VARS) LOCAL_MODULE := fs_config_files_system +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted LOCAL_MODULE_CLASS := ETC LOCAL_INSTALLED_MODULE_STEM := fs_config_files include $(BUILD_SYSTEM)/base_rules.mk @@ -180,6 +200,8 @@ ifneq ($(filter vendor,$(fs_config_generate_extra_partition_list)),) include $(CLEAR_VARS) LOCAL_MODULE := _fs_config_dirs_vendor +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted LOCAL_MODULE_CLASS := ETC LOCAL_INSTALLED_MODULE_STEM := fs_config_dirs LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc @@ -204,6 +226,8 @@ $(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/fs_config_generator.py $(TARGET_FS_CONFIG_G include $(CLEAR_VARS) LOCAL_MODULE := _fs_config_files_vendor +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted LOCAL_MODULE_CLASS := ETC LOCAL_INSTALLED_MODULE_STEM := fs_config_files LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc @@ -231,6 +255,8 @@ ifneq ($(filter oem,$(fs_config_generate_extra_partition_list)),) include $(CLEAR_VARS) LOCAL_MODULE := _fs_config_dirs_oem +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted LOCAL_MODULE_CLASS := ETC LOCAL_INSTALLED_MODULE_STEM := fs_config_dirs LOCAL_MODULE_PATH := $(TARGET_OUT_OEM)/etc @@ -255,6 +281,8 @@ $(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/fs_config_generator.py $(TARGET_FS_CONFIG_G include $(CLEAR_VARS) LOCAL_MODULE := _fs_config_files_oem +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted LOCAL_MODULE_CLASS := ETC LOCAL_INSTALLED_MODULE_STEM := fs_config_files LOCAL_MODULE_PATH := $(TARGET_OUT_OEM)/etc @@ -282,6 +310,8 @@ ifneq ($(filter odm,$(fs_config_generate_extra_partition_list)),) include $(CLEAR_VARS) LOCAL_MODULE := _fs_config_dirs_odm +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted LOCAL_MODULE_CLASS := ETC LOCAL_INSTALLED_MODULE_STEM := fs_config_dirs LOCAL_MODULE_PATH := $(TARGET_OUT_ODM)/etc @@ -306,6 +336,8 @@ $(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/fs_config_generator.py $(TARGET_FS_CONFIG_G include $(CLEAR_VARS) LOCAL_MODULE := _fs_config_files_odm +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted LOCAL_MODULE_CLASS := ETC LOCAL_INSTALLED_MODULE_STEM := fs_config_files LOCAL_MODULE_PATH := $(TARGET_OUT_ODM)/etc @@ -333,6 +365,8 @@ ifneq ($(filter vendor_dlkm,$(fs_config_generate_extra_partition_list)),) include $(CLEAR_VARS) LOCAL_MODULE := _fs_config_dirs_vendor_dlkm +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted LOCAL_MODULE_CLASS := ETC LOCAL_INSTALLED_MODULE_STEM := fs_config_dirs LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_DLKM)/etc @@ -357,6 +391,8 @@ $(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/fs_config_generator.py $(TARGET_FS_CONFIG_G include $(CLEAR_VARS) LOCAL_MODULE := _fs_config_files_vendor_dlkm +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted LOCAL_MODULE_CLASS := ETC LOCAL_INSTALLED_MODULE_STEM := fs_config_files LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_DLKM)/etc @@ -384,6 +420,8 @@ ifneq ($(filter odm_dlkm,$(fs_config_generate_extra_partition_list)),) include $(CLEAR_VARS) LOCAL_MODULE := _fs_config_dirs_odm_dlkm +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted LOCAL_MODULE_CLASS := ETC LOCAL_INSTALLED_MODULE_STEM := fs_config_dirs LOCAL_MODULE_PATH := $(TARGET_OUT_ODM_DLKM)/etc @@ -408,6 +446,8 @@ $(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/fs_config_generator.py $(TARGET_FS_CONFIG_G include $(CLEAR_VARS) LOCAL_MODULE := _fs_config_files_odm_dlkm +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted LOCAL_MODULE_CLASS := ETC LOCAL_INSTALLED_MODULE_STEM := fs_config_files LOCAL_MODULE_PATH := $(TARGET_OUT_ODM_DLKM)/etc @@ -435,6 +475,8 @@ ifneq ($(BOARD_USES_PRODUCTIMAGE)$(BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE),) include $(CLEAR_VARS) LOCAL_MODULE := _fs_config_dirs_product +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted LOCAL_MODULE_CLASS := ETC LOCAL_INSTALLED_MODULE_STEM := fs_config_dirs LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT)/etc @@ -459,6 +501,8 @@ $(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/fs_config_generator.py $(TARGET_FS_CONFIG_G include $(CLEAR_VARS) LOCAL_MODULE := _fs_config_files_product +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted LOCAL_MODULE_CLASS := ETC LOCAL_INSTALLED_MODULE_STEM := fs_config_files LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT)/etc @@ -485,6 +529,8 @@ ifneq ($(BOARD_USES_SYSTEM_EXTIMAGE)$(BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE),) include $(CLEAR_VARS) LOCAL_MODULE := _fs_config_dirs_system_ext +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted LOCAL_MODULE_CLASS := ETC LOCAL_INSTALLED_MODULE_STEM := fs_config_dirs LOCAL_MODULE_PATH := $(TARGET_OUT_SYSTEM_EXT)/etc @@ -509,6 +555,8 @@ $(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/fs_config_generator.py $(TARGET_FS_CONFIG_G include $(CLEAR_VARS) LOCAL_MODULE := _fs_config_files_system_ext +LOCAL_LICENSE_KINDS := legacy_restricted +LOCAL_LICENSE_CONDITIONS := restricted LOCAL_MODULE_CLASS := ETC LOCAL_INSTALLED_MODULE_STEM := fs_config_files LOCAL_MODULE_PATH := $(TARGET_OUT_SYSTEM_EXT)/etc diff --git a/tools/fs_get_stats/Android.bp b/tools/fs_get_stats/Android.bp index 67742b836..9457de42e 100644 --- a/tools/fs_get_stats/Android.bp +++ b/tools/fs_get_stats/Android.bp @@ -1,3 +1,12 @@ +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "build_make_license" + // to get the below license kinds: + // legacy_restricted + default_applicable_licenses: ["build_make_license"], +} + cc_binary_host { name: "fs_get_stats", srcs: ["fs_get_stats.c"], diff --git a/tools/libhost/Android.bp b/tools/libhost/Android.bp index 4c9100f15..a83f2e770 100644 --- a/tools/libhost/Android.bp +++ b/tools/libhost/Android.bp @@ -1,3 +1,12 @@ +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "build_make_license" + // to get the below license kinds: + // legacy_restricted + default_applicable_licenses: ["build_make_license"], +} + cc_library_host_static { srcs: ["CopyFile.c"], diff --git a/tools/product_config/Android.bp b/tools/product_config/Android.bp index 9523b4df6..5fdbcf0a3 100644 --- a/tools/product_config/Android.bp +++ b/tools/product_config/Android.bp @@ -1,3 +1,7 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + java_defaults { name: "product-config-defaults", srcs: ["src/**/*.java"], @@ -21,4 +25,3 @@ java_test_host { manifest: "TEST_MANIFEST.MF", test_suites: ["general-tests"] } - diff --git a/tools/releasetools/Android.bp b/tools/releasetools/Android.bp index 2429f17ee..81528ae35 100644 --- a/tools/releasetools/Android.bp +++ b/tools/releasetools/Android.bp @@ -22,6 +22,10 @@ // `releasetools_X_defaults` in their defaults. // +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + python_defaults { name: "releasetools_add_img_to_target_files_defaults", srcs: [ diff --git a/tools/signapk/Android.bp b/tools/signapk/Android.bp index b90f010b0..bee6a6f11 100644 --- a/tools/signapk/Android.bp +++ b/tools/signapk/Android.bp @@ -16,6 +16,10 @@ // the signapk tool (a .jar application used to sign packages) // ============================================================ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + java_binary_host { name: "signapk", srcs: ["src/**/*.java"], diff --git a/tools/signtos/Android.bp b/tools/signtos/Android.bp index 688e7b8e7..cd41accde 100644 --- a/tools/signtos/Android.bp +++ b/tools/signtos/Android.bp @@ -16,6 +16,10 @@ // the signtos tool - signs Trusty images // ============================================================ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + java_library_host { name: "signtos", srcs: ["SignTos.java"], diff --git a/tools/zipalign/Android.bp b/tools/zipalign/Android.bp index 1ebf4eb38..8cab04cd1 100644 --- a/tools/zipalign/Android.bp +++ b/tools/zipalign/Android.bp @@ -4,6 +4,10 @@ // Zip alignment tool // +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_defaults { name: "zipalign_defaults", target: { diff --git a/tools/ziptime/Android.bp b/tools/ziptime/Android.bp index 5ef45ed40..fa46b30fa 100644 --- a/tools/ziptime/Android.bp +++ b/tools/ziptime/Android.bp @@ -18,6 +18,10 @@ // Zip timestamp removal tool // +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + cc_binary_host { srcs: [