aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-07-26 17:28:12 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-07-26 17:28:12 +0000
commit44b3bfcc86074aef10cdc1efd36aa759c0bcf860 (patch)
tree08e9d4445d8b04ef114d8de61947f4df60d29099
parent7d080a1107099fa88f9824f9e9bc9308011f5dc7 (diff)
parent2e5a9661381e5ffc01699074341c1d59e8900e94 (diff)
downloadcommon-android13-mainline-go-cellbroadcast-release.tar.gz
Snap for 8871491 from 2e5a9661381e5ffc01699074341c1d59e8900e94 to mainline-go-cellbroadcast-releaseaml_go_cbr_330912000android13-mainline-go-cellbroadcast-release
Change-Id: If003bb8e28e29c795deef9da17342b8da9599e25
-rw-r--r--build/allowed_deps.txt11
-rwxr-xr-xbuild/mainline_modules_sdks.py53
-rw-r--r--proguard/Android.bp22
-rw-r--r--proguard/system-server.pro1
-rw-r--r--sdk/ModuleDefaults.bp6
5 files changed, 87 insertions, 6 deletions
diff --git a/build/allowed_deps.txt b/build/allowed_deps.txt
index d83e4f02..8f2356d3 100644
--- a/build/allowed_deps.txt
+++ b/build/allowed_deps.txt
@@ -101,6 +101,7 @@ android.net.ipsec.ike.xml(minSdkVersion:(no version))
android.system.suspend-V1-ndk(minSdkVersion:30)
android.system.suspend-V1-ndk(minSdkVersion:Tiramisu)
android.system.suspend.control-V1-ndk(minSdkVersion:30)
+android_checker_annotation_stubs(minSdkVersion:current)
android_downloader_lib(minSdkVersion:30)
androidx-constraintlayout_constraintlayout(minSdkVersion:14)
androidx-constraintlayout_constraintlayout-solver(minSdkVersion:24)
@@ -212,6 +213,7 @@ car-rotary-lib(minSdkVersion:28)
car-rotary-lib-resources(minSdkVersion:28)
car-ui-lib(minSdkVersion:28)
car-ui-lib-resources(minSdkVersion:28)
+cbor-java(minSdkVersion:30)
census(minSdkVersion:30)
clatd(minSdkVersion:30)
codecs_g711dec(minSdkVersion:29)
@@ -239,7 +241,9 @@ crtend_so(minSdkVersion:16)
crtend_so(minSdkVersion:30)
crtend_so(minSdkVersion:apex_inherit)
crtend_so(minSdkVersion:current)
+dagger2(minSdkVersion:current)
datastallprotosnano(minSdkVersion:29)
+dlmalloc(minSdkVersion:apex_inherit)
dnsproxyd_protocol_headers(minSdkVersion:29)
DocumentsUI-res-lib(minSdkVersion:29)
exoplayer-annotation_stubs(minSdkVersion:16)
@@ -289,6 +293,7 @@ jacocoagent(minSdkVersion:9)
jni_headers(minSdkVersion:29)
jni_platform_headers(minSdkVersion:S)
jsr305(minSdkVersion:14)
+jsr330(minSdkVersion:current)
kotlinx-coroutines-android(minSdkVersion:28)
kotlinx-coroutines-android(minSdkVersion:current)
kotlinx-coroutines-core(minSdkVersion:current)
@@ -740,6 +745,9 @@ MediaProviderGoogle(minSdkVersion:30)
mediaswcodec(minSdkVersion:29)
metrics-constants-protos(minSdkVersion:29)
metrics-constants-protos(minSdkVersion:current)
+mobile-data-download-java-proto-lite(minSdkVersion:30)
+mobile-data-download-populator-java-proto-lite(minSdkVersion:30)
+mobile_data_downloader_lib(minSdkVersion:30)
modules-utils-backgroundthread(minSdkVersion:29)
modules-utils-build(minSdkVersion:29)
modules-utils-build_system(minSdkVersion:29)
@@ -764,6 +772,7 @@ ndk_libc++abi(minSdkVersion:16)
ndk_libunwind(minSdkVersion:16)
net-utils-device-common(minSdkVersion:29)
net-utils-device-common-bpf(minSdkVersion:29)
+net-utils-device-common-ip(minSdkVersion:29)
net-utils-device-common-netlink(minSdkVersion:29)
net-utils-device-common-struct(minSdkVersion:29)
net-utils-framework-common(minSdkVersion:29)
@@ -1086,4 +1095,4 @@ wifi-lite-protos(minSdkVersion:30)
wifi-nano-protos(minSdkVersion:30)
wifi-service-pre-jarjar(minSdkVersion:30)
xz-java(minSdkVersion:29)
-xz-java(minSdkVersion:current)
+xz-java(minSdkVersion:current) \ No newline at end of file
diff --git a/build/mainline_modules_sdks.py b/build/mainline_modules_sdks.py
index eaa4639c..cb02e2c9 100755
--- a/build/mainline_modules_sdks.py
+++ b/build/mainline_modules_sdks.py
@@ -20,6 +20,7 @@ the APEXes in it are built, otherwise all configured SDKs are built.
"""
import argparse
import dataclasses
+import datetime
import functools
import io
import json
@@ -255,6 +256,22 @@ def sdk_snapshot_api_diff_file(snapshots_dir, sdk_name, sdk_version):
return os.path.join(snapshots_dir, f"{sdk_name}-{sdk_version}-api-diff.txt")
+# The default time to use in zip entries. Ideally, this should be the same as is
+# used by soong_zip and ziptime but there is no strict need for that to be the
+# case. What matters is this is a fixed time so that the contents of zip files
+# created by this script do not depend on when it is run, only the inputs.
+default_zip_time = datetime.datetime(2008, 1, 1, 0, 0, 0, 0,
+ datetime.timezone.utc)
+
+
+# set the timestamps of the paths to the default_zip_time.
+def set_default_timestamp(base_dir, paths):
+ for path in paths:
+ timestamp = default_zip_time.timestamp()
+ p = os.path.join(base_dir, path)
+ os.utime(p, (timestamp, timestamp))
+
+
@dataclasses.dataclass()
class SnapshotBuilder:
"""Builds sdk snapshots"""
@@ -409,6 +426,13 @@ java_sdk_library_import {{
dest_dir, "snapshot-creation-build-number.txt")
shutil.copy(build_number_file, snapshot_build_number_file)
+ # Make sure that all the paths being added to the zip file have a
+ # fixed timestamp so that the contents of the zip file do not depend
+ # on when this script is run, only the inputs.
+ for root, dirs, files in os.walk(dest_dir):
+ set_default_timestamp(root, dirs)
+ set_default_timestamp(root, files)
+
# Now zip up the files into a snapshot zip file.
base_file = os.path.join(r_snapshot_dir, sdk_name + "-current")
shutil.make_archive(base_file, "zip", dest_dir)
@@ -417,10 +441,7 @@ java_sdk_library_import {{
@staticmethod
def does_sdk_library_support_latest_api(sdk_library):
- # TODO(b/235330409): remove service art from the exception list once
- # this bug is fixed.
- if sdk_library == "service-art" or \
- sdk_library == "conscrypt.module.platform.api":
+ if sdk_library == "conscrypt.module.platform.api":
return False
return True
@@ -739,6 +760,19 @@ class MainlineModule:
#
# This field records the last build release in which they are optional. It
# defaults to None which indicates that the module was never optional.
+ #
+ # TODO(b/238203992): remove the following warning once all modules can be
+ # treated as optional at build time.
+ #
+ # DO NOT use this attr for anything other than controlling whether the
+ # generated snapshot uses its own Soong config variable or the common one.
+ # That is because this is being temporarily used to force Permission to have
+ # its own Soong config variable even though Permission is not actually
+ # optional at runtime on a GMS capable device.
+ #
+ # b/238203992 will make all modules have their own Soong config variable by
+ # default at which point this will no longer be needed on Permission and so
+ # it can be used to indicate that a module is optional at runtime.
last_optional_release: typing.Optional[BuildRelease] = None
# The short name for the module.
@@ -903,6 +937,11 @@ MAINLINE_MODULES = [
# that are provided in R by non-updatable parts of the
# bootclasspath.
]),
+ # Although Permission is not, and has never been, optional for GMS
+ # capable devices it does need to be treated as optional at build time
+ # when building non-GMS devices.
+ # TODO(b/238203992): remove once all modules are optional at build time.
+ last_optional_release=LATEST,
),
MainlineModule(
apex="com.android.scheduling",
@@ -1212,6 +1251,12 @@ def copy_zip_and_replace(producer, src_zip_path, dest_zip_path, src_dir, paths):
# not affected by a change of directory.
abs_src_zip_path = os.path.abspath(src_zip_path)
abs_dest_zip_path = os.path.abspath(dest_zip_path)
+
+ # Make sure that all the paths being added to the zip file have a fixed
+ # timestamp so that the contents of the zip file do not depend on when this
+ # script is run, only the inputs.
+ set_default_timestamp(src_dir, paths)
+
producer.subprocess_runner.run(
["zip", "-q", abs_src_zip_path, "--out", abs_dest_zip_path] + paths,
# Change into the source directory before running zip.
diff --git a/proguard/Android.bp b/proguard/Android.bp
index e011a61d..77f336b0 100644
--- a/proguard/Android.bp
+++ b/proguard/Android.bp
@@ -16,7 +16,7 @@ package {
default_applicable_licenses: ["Android-Apache-2.0"],
default_visibility: [
":__subpackages__",
- "//packages/modules/Permission:__subpackages__",
+ "//packages/modules:__subpackages__",
],
}
@@ -38,3 +38,23 @@ java_defaults {
proguard_flags_files: [":framework-system-server-module-optimize-proguard-rules"],
},
}
+
+// Needed because otherwise java_defaults would resolve it in module directory.
+filegroup {
+ name: "standalone-system-server-module-optimize-proguard-rules",
+ srcs: [
+ "system-server.pro",
+ ],
+}
+
+java_defaults {
+ name: "standalone-system-server-module-optimize-defaults",
+ optimize: {
+ enabled: true,
+ shrink: true,
+ optimize: false,
+ obfuscate: false,
+ proguard_compatibility: false,
+ proguard_flags_files: [":standalone-system-server-module-optimize-proguard-rules"],
+ },
+}
diff --git a/proguard/system-server.pro b/proguard/system-server.pro
new file mode 100644
index 00000000..c6eaffb7
--- /dev/null
+++ b/proguard/system-server.pro
@@ -0,0 +1 @@
+-keep class * extends com.android.server.SystemService { *; }
diff --git a/sdk/ModuleDefaults.bp b/sdk/ModuleDefaults.bp
index d9e3af53..e5b05c47 100644
--- a/sdk/ModuleDefaults.bp
+++ b/sdk/ModuleDefaults.bp
@@ -239,6 +239,9 @@ library_linking_strategy_apex_defaults {
apex_defaults {
name: "s-launched-apex-module",
min_sdk_version: "31",
+ // Indicates that pre-installed version of this apex can be compressed.
+ // Whether it actually will be compressed is controlled on per-device basis.
+ compressible:true,
updatable: true,
defaults_visibility: [
"//art:__subpackages__",
@@ -250,5 +253,8 @@ apex_defaults {
name: "t-launched-apex-module",
min_sdk_version: "Tiramisu",
updatable: true,
+ // Indicates that pre-installed version of this apex can be compressed.
+ // Whether it actually will be compressed is controlled on per-device basis.
+ compressible:true,
defaults_visibility: ["//packages/modules:__subpackages__"],
}