Commit 51feebb4 by Tim Van Patten Committed by Angle LUCI CQ

Add LOCAL_LICENSE_KINDS to generate_android_bp.py

Upstread the AOSP license changes that keep getting reverted: https://android-review.googlesource.com/c/platform/external/angle/+/1704346 Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to: third_party/android_ndk/sources/android/cpufeatures/Android.mk Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD SPDX-license-identifier-GPL SPDX-license-identifier-GPL-2.0 SPDX-license-identifier-GPL-3.0 SPDX-license-identifier-LGPL SPDX-license-identifier-MIT SPDX-license-identifier-Zlib legacy_unencumbered to: Android.bp via generate_android_bp.py Bug: b/186906888 Change-Id: I86081cfe2858702ed350ce8c72afaaa8eb5566b8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2912918Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
parent 7a38f3f5
...@@ -77,6 +77,24 @@ def write_blueprint_key_value(output, name, value, indent=1): ...@@ -77,6 +77,24 @@ def write_blueprint_key_value(output, name, value, indent=1):
def write_blueprint(output, target_type, values): def write_blueprint(output, target_type, values):
if target_type == 'license':
comment = """
// 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"""
output.append(comment)
output.append('%s {' % target_type) output.append('%s {' % target_type)
for (key, value) in values.items(): for (key, value) in values.items():
write_blueprint_key_value(output, key, value) write_blueprint_key_value(output, key, value)
...@@ -503,6 +521,27 @@ def main(): ...@@ -503,6 +521,27 @@ def main():
for target in targets_to_write: for target in targets_to_write:
blueprint_targets.append(gn_target_to_blueprint(target, build_info)) blueprint_targets.append(gn_target_to_blueprint(target, build_info))
# Add license build rules
blueprint_targets.append(('package', {
'default_applicable_licenses': ['external_angle_license'],
}))
blueprint_targets.append(('license', {
'name': 'external_angle_license',
'visibility': [':__subpackages__'],
'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-GPL-3.0',
'SPDX-license-identifier-LGPL',
'SPDX-license-identifier-MIT',
'SPDX-license-identifier-Zlib',
'legacy_unencumbered',
],
'license_text': ['LICENSE'],
}))
# Add APKs with all of the root libraries # Add APKs with all of the root libraries
blueprint_targets.append(( blueprint_targets.append((
'filegroup', 'filegroup',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment