Clean up Android.bp files.
- Remove Python sections that are identical to global defaults.
- Correct the license to Android-Apache-2.0.
- Remove redundant license headers.
Bug: 245854393
Test: presubmit
Change-Id: Ia4dc7f5eeb91d5322558519a3b7ff2a75a565272
diff --git a/Android.bp b/Android.bp
index 66e486e..7dbf6b6 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,31 +1,3 @@
-//
-// 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: ["tools_treble_license"],
-}
-
-// Added automatically by a large-scale-change
-// See: http://go/android-license-faq
-license {
- name: "tools_treble_license",
- visibility: [":__subpackages__"],
- license_kinds: [
- "SPDX-license-identifier-Apache-2.0",
- ],
- license_text: [
- "LICENSE",
- ],
+ default_applicable_licenses: ["Android-Apache-2.0"],
}
diff --git a/build/Android.bp b/build/Android.bp
index 7d1731e..32c5bf5 100644
--- a/build/Android.bp
+++ b/build/Android.bp
@@ -1,37 +1,10 @@
-// Copyright (C) 2019 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 {
- // See: http://go/android-license-faq
- // A large-scale-change added 'default_applicable_licenses' to import
- // all of the 'license_kinds' from "tools_treble_license"
- // to get the below license kinds:
- // SPDX-license-identifier-Apache-2.0
- default_applicable_licenses: ["tools_treble_license"],
+ default_applicable_licenses: ["Android-Apache-2.0"],
}
python_defaults {
name: "treble_build_default",
pkg_path: "treble/build",
- version: {
- py2: {
- enabled: false,
- },
- py3: {
- enabled: true,
- },
- },
}
python_library_host {
diff --git a/build/treble_build/app/Android.bp b/build/treble_build/app/Android.bp
index 4906202..39071d9 100644
--- a/build/treble_build/app/Android.bp
+++ b/build/treble_build/app/Android.bp
@@ -1,24 +1,5 @@
-// Copyright (C) 2022 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 {
- // See: http://go/android-license-faq
- // A large-scale-change added 'default_applicable_licenses' to import
- // all of the 'license_kinds' from "tools_treble_license"
- // to get the below license kinds:
- // SPDX-license-identifier-Apache-2.0
- default_applicable_licenses: ["tools_treble_license"],
+ default_applicable_licenses: ["Android-Apache-2.0"],
}
bootstrap_go_package {
diff --git a/build/treble_build/cmd/Android.bp b/build/treble_build/cmd/Android.bp
index ec83692..3a1df69 100644
--- a/build/treble_build/cmd/Android.bp
+++ b/build/treble_build/cmd/Android.bp
@@ -1,24 +1,5 @@
-// Copyright (C) 2022 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 {
- // See: http://go/android-license-faq
- // A large-scale-change added 'default_applicable_licenses' to import
- // all of the 'license_kinds' from "tools_treble_license"
- // to get the below license kinds:
- // SPDX-license-identifier-Apache-2.0
- default_applicable_licenses: ["tools_treble_license"],
+ default_applicable_licenses: ["Android-Apache-2.0"],
}
blueprint_go_binary {
diff --git a/build/treble_build/local/Android.bp b/build/treble_build/local/Android.bp
index 685f885..ffd2781 100644
--- a/build/treble_build/local/Android.bp
+++ b/build/treble_build/local/Android.bp
@@ -1,24 +1,5 @@
-// Copyright (C) 2022 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 {
- // See: http://go/android-license-faq
- // A large-scale-change added 'default_applicable_licenses' to import
- // all of the 'license_kinds' from "tools_treble_license"
- // to get the below license kinds:
- // SPDX-license-identifier-Apache-2.0
- default_applicable_licenses: ["tools_treble_license"],
+ default_applicable_licenses: ["Android-Apache-2.0"],
}
bootstrap_go_package {
diff --git a/build/treble_build/report/Android.bp b/build/treble_build/report/Android.bp
index 32ffea4..33fd57d 100644
--- a/build/treble_build/report/Android.bp
+++ b/build/treble_build/report/Android.bp
@@ -1,24 +1,5 @@
-// Copyright (C) 2022 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 {
- // See: http://go/android-license-faq
- // A large-scale-change added 'default_applicable_licenses' to import
- // all of the 'license_kinds' from "tools_treble_license"
- // to get the below license kinds:
- // SPDX-license-identifier-Apache-2.0
- default_applicable_licenses: ["tools_treble_license"],
+ default_applicable_licenses: ["Android-Apache-2.0"],
}
bootstrap_go_package {
diff --git a/fetcher/Android.bp b/fetcher/Android.bp
index 787d0b7..fd3ff06 100644
--- a/fetcher/Android.bp
+++ b/fetcher/Android.bp
@@ -1,30 +1,9 @@
package {
- // See: http://go/android-license-faq
- // A large-scale-change added 'default_applicable_licenses' to import
- // all of the 'license_kinds' from "tools_treble_license"
- // to get the below license kinds:
- // SPDX-license-identifier-Apache-2.0
- default_applicable_licenses: ["tools_treble_license"],
+ default_applicable_licenses: ["Android-Apache-2.0"],
}
-python_defaults {
- name: "fetcher-defaults",
- version: {
- py2: {
- enabled: false,
- embedded_launcher: false,
- },
- py3: {
- enabled: true,
- embedded_launcher: false,
- },
- },
-}
-
-
python_library_host {
name: "fetcher-lib",
- defaults: ["fetcher-defaults"],
srcs: [
"fetcher_lib.py"
],
@@ -39,7 +18,6 @@
python_binary_host {
name: "fetcher",
main: "fetcher.py",
- defaults: ["fetcher-defaults"],
srcs: [
"fetcher.py",
],
diff --git a/gki/Android.bp b/gki/Android.bp
index d5b886d..29f8077 100644
--- a/gki/Android.bp
+++ b/gki/Android.bp
@@ -1,29 +1,9 @@
package {
- // See: http://go/android-license-faq
- // A large-scale-change added 'default_applicable_licenses' to import
- // all of the 'license_kinds' from "tools_treble_license"
- // to get the below license kinds:
- // SPDX-license-identifier-Apache-2.0
- default_applicable_licenses: ["tools_treble_license"],
-}
-
-python_defaults {
- name: "repack_gki_defaults",
- version: {
- py2: {
- enabled: false,
- embedded_launcher: false,
- },
- py3: {
- enabled: true,
- embedded_launcher: false,
- },
- },
+ default_applicable_licenses: ["Android-Apache-2.0"],
}
python_library_host {
name: "repack_gki_lib",
- defaults: ["repack_gki_defaults"],
srcs: [
"repack_gki_lib.py",
],
@@ -36,7 +16,6 @@
python_binary_host {
name: "repack_gki",
main: "repack_gki.py",
- defaults: ["repack_gki_defaults"],
srcs: [
"repack_gki.py",
],
diff --git a/split/Android.bp b/split/Android.bp
index f35167f..d742681 100644
--- a/split/Android.bp
+++ b/split/Android.bp
@@ -1,37 +1,10 @@
-// Copyright (C) 2020 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 {
- // See: http://go/android-license-faq
- // A large-scale-change added 'default_applicable_licenses' to import
- // all of the 'license_kinds' from "tools_treble_license"
- // to get the below license kinds:
- // SPDX-license-identifier-Apache-2.0
- default_applicable_licenses: ["tools_treble_license"],
+ default_applicable_licenses: ["Android-Apache-2.0"],
}
python_defaults {
name: "treble_split_default",
pkg_path: "treble/split",
- version: {
- py2: {
- enabled: false,
- },
- py3: {
- enabled: true,
- },
- },
libs: [
"py-setuptools",
],