From 318466528f8ad668b6aa957da79638cc44e8f798 Mon Sep 17 00:00:00 2001 From: Bob Badour Date: Fri, 12 Feb 2021 15:38:10 -0800 Subject: [LSC] Add LOCAL_LICENSE_KINDS to external/smali Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to: Android.bp dexlib2/Android.bp Added SPDX-license-identifier-BSD to: baksmali/Android.bp deodexerant/Android.bp smali/Android.bp util/Android.bp Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: Ib54545fe7932e452016833d969b0d42d6b93f1f3 --- Android.bp | 30 ++++++++++++++++++++++++++++++ baksmali/Android.bp | 9 +++++++++ deodexerant/Android.bp | 9 +++++++++ dexlib2/Android.bp | 12 +++++++++++- smali/Android.bp | 9 +++++++++ util/Android.bp | 9 +++++++++ 6 files changed, 77 insertions(+), 1 deletion(-) diff --git a/Android.bp b/Android.bp index 40faeef2..d90b1498 100644 --- a/Android.bp +++ b/Android.bp @@ -12,6 +12,36 @@ // See the License for the specific language governing permissions and // limitations under the License. +package { + default_applicable_licenses: ["external_smali_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: "external_smali_license", + visibility: [":__subpackages__"], + license_kinds: [ + "SPDX-license-identifier-Apache-2.0", + "SPDX-license-identifier-BSD", + ], + license_text: [ + "NOTICE", + ], +} + filegroup { name: "smali_script", srcs: ["scripts/smali"], diff --git a/baksmali/Android.bp b/baksmali/Android.bp index 7f95539d..6d6d4f45 100644 --- a/baksmali/Android.bp +++ b/baksmali/Android.bp @@ -13,6 +13,15 @@ // limitations under the License. //create a new baksmali.properties file using the correct version +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "external_smali_license" + // to get the below license kinds: + // SPDX-license-identifier-BSD + default_applicable_licenses: ["external_smali_license"], +} + genrule { name: "baksmali_version", srcs: [":smali_build.gradle"], diff --git a/deodexerant/Android.bp b/deodexerant/Android.bp index 48d6fe29..a1cd1b47 100644 --- a/deodexerant/Android.bp +++ b/deodexerant/Android.bp @@ -27,6 +27,15 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "external_smali_license" + // to get the below license kinds: + // SPDX-license-identifier-BSD + default_applicable_licenses: ["external_smali_license"], +} + cc_binary { name: "deodexerant", diff --git a/dexlib2/Android.bp b/dexlib2/Android.bp index 4132d45c..e8eb04d5 100644 --- a/dexlib2/Android.bp +++ b/dexlib2/Android.bp @@ -15,6 +15,16 @@ // build dexlib2 jar // ============================================================ +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "external_smali_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + // SPDX-license-identifier-BSD + default_applicable_licenses: ["external_smali_license"], +} + java_library_host { name: "dexlib2", @@ -64,4 +74,4 @@ java_library_host { "jcommander", "jsr305", ], -} \ No newline at end of file +} diff --git a/smali/Android.bp b/smali/Android.bp index 4bbfa1b5..43cfea17 100644 --- a/smali/Android.bp +++ b/smali/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 "external_smali_license" + // to get the below license kinds: + // SPDX-license-identifier-BSD + default_applicable_licenses: ["external_smali_license"], +} + genrule { name: "smali_version", srcs: [":smali_build.gradle"], diff --git a/util/Android.bp b/util/Android.bp index 55f89eb9..69678158 100644 --- a/util/Android.bp +++ b/util/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 "external_smali_license" + // to get the below license kinds: + // SPDX-license-identifier-BSD + default_applicable_licenses: ["external_smali_license"], +} + java_library_host { name: "smali-util", srcs: ["src/main/java/**/*.java"], -- cgit v1.2.3