Merge tag 'android-14.0.0_r29' into staging/lineage-21.0_merge-android-14.0.0_r29
Android 14.0.0 release 29 # -----BEGIN PGP SIGNATURE----- # # iF0EABECAB0WIQRDQNE1cO+UXoOBCWTorT+BmrEOeAUCZeZW5AAKCRDorT+BmrEO # eDrDAJwJu3i3I5ad+dRRI786NFcELCRJzQCdGE3rG75lW6e2+i3Ijy2A9DsDsAQ= # =xK6q # -----END PGP SIGNATURE----- # gpg: Signature made Tue Mar 5 01:19:00 2024 EET # gpg: using DSA key 4340D13570EF945E83810964E8AD3F819AB10E78 # gpg: Good signature from "The Android Open Source Project <initial-contribution@android.com>" [marginal] # gpg: initial-contribution@android.com: Verified 2357 signatures in the past # 2 years. Encrypted 4 messages in the past 2 years. # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 4340 D135 70EF 945E 8381 0964 E8AD 3F81 9AB1 0E78 # By Anvesh Renikindi (15) and others # Via Automerger Merge Worker (1238) and others * tag 'android-14.0.0_r29': (165 commits) [TeX] Removed JNI dependency Revert^2 "Switch to 'external/google-smali'" DO NOT MERGE: Revert "Merge "Switch to 'external/google-smali'" Revert^2 "Switch to 'external/google-smali'" Revert "Switch to 'external/google-smali'" [TeX] Removed JNI dependency Switch to 'external/google-smali' minsdk version upgrade Add Matt to mainline modularization owners RESTRICT AUTOMERGE Update allowed packages. Add networkstack-aidl-interface-V20 to allowed_deps. create directory before writing into the file. minsdk bump to 19 Adding androidx.wear_wear in allowed dependencies Generate Gantry Metadata and API Diff for NEXT release [TeX] Removed JNI dependency [TeX] Removed JNI dependency Add libbinder_headers_base Added graphics library minsdk bump ... Conflicts: build/allowed_deps.txt Change-Id: Ib915e488dbe5de7a564fe047fc2fb78fc6246159
This commit is contained in:
8
OWNERS
8
OWNERS
@@ -1,9 +1,15 @@
|
||||
# Bug component: 819107
|
||||
# Mainline modularization team
|
||||
|
||||
andreionea@google.com
|
||||
amhk@google.com
|
||||
ancr@google.com
|
||||
dariofreni@google.com
|
||||
gurpreetgs@google.com
|
||||
hansson@google.com
|
||||
harshitmahajan@google.com
|
||||
hsnali@google.com
|
||||
kalyssa@google.com
|
||||
mattcarp@google.com
|
||||
paulduffin@google.com
|
||||
pedroql@google.com
|
||||
robertogil@google.com
|
||||
|
||||
@@ -16,3 +16,7 @@ mattcarp@google.com #{LAST_RESORT_SUGGESTION}
|
||||
ahomer@google.com #{LAST_RESORT_SUGGESTION}
|
||||
robertogil@google.com #{LAST_RESORT_SUGGESTION}
|
||||
paulduffin@google.com #{LAST_RESORT_SUGGESTION}
|
||||
amhk@google.com #{LAST_RESORT_SUGGESTION}
|
||||
gurpreetgs@google.com #{LAST_RESORT_SUGGESTION}
|
||||
hsnali@google.com #{LAST_RESORT_SUGGESTION}
|
||||
kalyssa@google.com #{LAST_RESORT_SUGGESTION}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -55,7 +55,6 @@ readonly -a DEFAULT_MODULES=(
|
||||
com.android.resolv
|
||||
com.android.runtime
|
||||
com.android.sdkext
|
||||
com.android.sepolicy
|
||||
# TODO(b/210694291): include tethering module in the build
|
||||
# com.android.tethering
|
||||
com.android.tzdata
|
||||
@@ -133,6 +132,7 @@ function build_modules() {
|
||||
MODULE_BUILD_FROM_SOURCE=true \
|
||||
${extra_build_params} \
|
||||
"${RUN_ERROR_PRONE:+"RUN_ERROR_PRONE=true"}" \
|
||||
"${CHECK_API:+"checkapi"}" \
|
||||
apps_only \
|
||||
dist \
|
||||
lint-check
|
||||
|
||||
@@ -322,6 +322,9 @@ class SnapshotBuilder:
|
||||
# The out/soong/mainline-sdks directory.
|
||||
mainline_sdks_dir: str = ""
|
||||
|
||||
# True if apex-allowed-deps-check is to be skipped.
|
||||
skip_allowed_deps_check: bool = False
|
||||
|
||||
def __post_init__(self):
|
||||
self.mainline_sdks_dir = os.path.join(self.out_dir,
|
||||
"soong/mainline-sdks")
|
||||
@@ -356,8 +359,9 @@ class SnapshotBuilder:
|
||||
f"TARGET_BUILD_VARIANT={target_build_variant}",
|
||||
"TARGET_PRODUCT=mainline_sdk",
|
||||
"MODULE_BUILD_FROM_SOURCE=true",
|
||||
"out/soong/apex/depsinfo/new-allowed-deps.txt.check",
|
||||
] + target_paths
|
||||
if not self.skip_allowed_deps_check:
|
||||
cmd += ["apex-allowed-deps-check"]
|
||||
print_command(extraEnv, cmd)
|
||||
env = os.environ.copy()
|
||||
env.update(extraEnv)
|
||||
@@ -472,7 +476,8 @@ java_sdk_library_import {{
|
||||
|
||||
@staticmethod
|
||||
def does_sdk_library_support_latest_api(sdk_library):
|
||||
if sdk_library == "conscrypt.module.platform.api":
|
||||
if sdk_library == "conscrypt.module.platform.api" or \
|
||||
sdk_library == "conscrypt.module.intra.core.api":
|
||||
return False
|
||||
return True
|
||||
|
||||
@@ -503,6 +508,10 @@ java_sdk_library_import {{
|
||||
target_dict[sdk_library][scope][target] = scope_json[target]
|
||||
target_paths.append(scope_json["latest_api"])
|
||||
target_paths.append(scope_json["latest_removed_api"])
|
||||
target_paths.append(scope_json["latest_api"]
|
||||
.replace(".latest", ".latest.extension_version"))
|
||||
target_paths.append(scope_json["latest_removed_api"]
|
||||
.replace(".latest", ".latest.extension_version"))
|
||||
|
||||
return target_paths, target_dict
|
||||
|
||||
@@ -560,6 +569,7 @@ java_sdk_library_import {{
|
||||
with open(
|
||||
sdk_api_diff_file, "w",
|
||||
encoding="utf8") as sdk_api_diff_file_object:
|
||||
last_finalized_version_set = set()
|
||||
for sdk_library in target_dict[sdk_info_file]:
|
||||
for scope in target_dict[sdk_info_file][sdk_library]:
|
||||
scope_json = target_dict[sdk_info_file][sdk_library][scope]
|
||||
@@ -575,6 +585,33 @@ java_sdk_library_import {{
|
||||
sdk_zip_file, removed_api,
|
||||
latest_removed_api, snapshots_dir)
|
||||
|
||||
def read_extension_version(target):
|
||||
extension_target = target.replace(
|
||||
".latest", ".latest.extension_version")
|
||||
with open(
|
||||
extension_target, "r", encoding="utf8") as file:
|
||||
version = int(file.read())
|
||||
# version equal to -1 means "not an extension version".
|
||||
if version != -1:
|
||||
last_finalized_version_set.add(version)
|
||||
|
||||
read_extension_version(scope_json["latest_api"])
|
||||
read_extension_version(scope_json["latest_removed_api"])
|
||||
|
||||
if len(last_finalized_version_set) == 0:
|
||||
# Either there is no java sdk library or all java sdk libraries
|
||||
# have not been finalized in sdk extensions yet and hence have
|
||||
# last finalized version set as -1.
|
||||
gantry_metadata_dict["last_finalized_version"] = -1
|
||||
elif len(last_finalized_version_set) == 1:
|
||||
# All java sdk library extension version match.
|
||||
gantry_metadata_dict["last_finalized_version"] =\
|
||||
last_finalized_version_set.pop()
|
||||
else:
|
||||
# Fail the build
|
||||
raise ValueError(
|
||||
"Not all sdk libraries finalized with the same version.\n")
|
||||
|
||||
gantry_metadata_dict["api_diff_file"] = sdk_api_diff_file.rsplit(
|
||||
"/", 1)[-1]
|
||||
gantry_metadata_dict["api_diff_file_size"] = os.path.getsize(
|
||||
@@ -589,6 +626,9 @@ java_sdk_library_import {{
|
||||
"w") as gantry_metadata_json_file_object:
|
||||
gantry_metadata_json_file_object.write(gantry_metadata_json_object)
|
||||
|
||||
if os.path.getsize(sdk_metadata_json_file) > 1048576: # 1 MB
|
||||
raise ValueError("Metadata file size should not exceed 1 MB.\n")
|
||||
|
||||
def get_module_extension_version(self):
|
||||
return int(
|
||||
subprocess.run([
|
||||
@@ -668,6 +708,13 @@ class BuildRelease:
|
||||
preferHandling: PreferHandling = \
|
||||
PreferHandling.USE_SOURCE_CONFIG_VAR_PROPERTY
|
||||
|
||||
# Whether the generated snapshots should include flagged APIs. Defaults to
|
||||
# false because flagged APIs are not suitable for use outside Android.
|
||||
include_flagged_apis: bool = False
|
||||
|
||||
# Whether the build release should generate Gantry metadata and API diff.
|
||||
generate_gantry_metadata_and_api_diff: bool = False
|
||||
|
||||
def __post_init__(self):
|
||||
# The following use object.__setattr__ as this object is frozen and
|
||||
# attempting to set the fields directly would cause an exception to be
|
||||
@@ -769,6 +816,16 @@ UpsideDownCake = BuildRelease(
|
||||
# Insert additional BuildRelease definitions for following releases here,
|
||||
# before LATEST.
|
||||
|
||||
# A build release for the latest build excluding flagged apis.
|
||||
NEXT = BuildRelease(
|
||||
name="next",
|
||||
creator=create_latest_sdk_snapshots,
|
||||
# There are no build release specific environment variables to pass to
|
||||
# Soong.
|
||||
soong_env={},
|
||||
generate_gantry_metadata_and_api_diff=True,
|
||||
)
|
||||
|
||||
# The build release for the latest build supported by this build, i.e. the
|
||||
# current build. This must be the last BuildRelease defined in this script.
|
||||
LATEST = BuildRelease(
|
||||
@@ -777,6 +834,10 @@ LATEST = BuildRelease(
|
||||
# There are no build release specific environment variables to pass to
|
||||
# Soong.
|
||||
soong_env={},
|
||||
# Latest must include flagged APIs because it may be dropped into the main
|
||||
# Android branches.
|
||||
include_flagged_apis=True,
|
||||
generate_gantry_metadata_and_api_diff=True,
|
||||
)
|
||||
|
||||
|
||||
@@ -882,8 +943,7 @@ class MainlineModule:
|
||||
|
||||
# If the module is optional then it needs its own Soong config
|
||||
# variable to allow it to be managed separately from other modules.
|
||||
if (self.last_optional_release and
|
||||
self.last_optional_release > build_release):
|
||||
if self.last_optional_release:
|
||||
config_var = ConfigVar(
|
||||
namespace=f"{self.short_name}_module",
|
||||
name="source_build",
|
||||
@@ -986,6 +1046,14 @@ MAINLINE_MODULES = [
|
||||
# appear to generate a snapshot for it.
|
||||
for_r_build=None,
|
||||
),
|
||||
MainlineModule(
|
||||
apex="com.android.devicelock",
|
||||
sdks=["devicelock-module-sdk"],
|
||||
first_release=UpsideDownCake,
|
||||
# Treat DeviceLock as optional at build time
|
||||
# TODO(b/238203992): remove once all modules are optional at build time.
|
||||
last_optional_release=LATEST,
|
||||
),
|
||||
MainlineModule(
|
||||
apex="com.android.healthfitness",
|
||||
sdks=["healthfitness-module-sdk"],
|
||||
@@ -1017,6 +1085,10 @@ MAINLINE_MODULES = [
|
||||
for_r_build=ForRBuild(sdk_libraries=[
|
||||
SdkLibrary(name="framework-mediaprovider"),
|
||||
]),
|
||||
# MP is a mandatory mainline module but in some cases (b/294190883) this
|
||||
# needs to be optional for Android Go on T. GTS tests might be needed to
|
||||
# to check the specific condition mentioned in the bug.
|
||||
last_optional_release=LATEST,
|
||||
),
|
||||
MainlineModule(
|
||||
apex="com.android.ondevicepersonalization",
|
||||
@@ -1210,7 +1282,7 @@ class SdkDistProducer:
|
||||
modules = [m for m in modules if not m.is_bundled()]
|
||||
snapshots_dir = self.snapshot_builder.build_snapshots(
|
||||
build_release, modules)
|
||||
if build_release == LATEST:
|
||||
if build_release.generate_gantry_metadata_and_api_diff:
|
||||
target_dict = self.snapshot_builder.build_sdk_scope_targets(
|
||||
build_release, modules)
|
||||
self.snapshot_builder.build_snapshot_gantry_metadata_and_api_diff(
|
||||
@@ -1245,13 +1317,21 @@ class SdkDistProducer:
|
||||
shutil.copy(sdk_gantry_metadata_json_path,
|
||||
sdk_dist_gantry_metadata_json_path)
|
||||
|
||||
def dist_generate_sdk_supported_modules_file(self, modules):
|
||||
sdk_modules_file = os.path.join(self.dist_dir, "sdk-modules.txt")
|
||||
os.makedirs(os.path.dirname(sdk_modules_file), exist_ok=True)
|
||||
with open(sdk_modules_file, "w", encoding="utf8") as file:
|
||||
for module in modules:
|
||||
if module in MAINLINE_MODULES:
|
||||
file.write(aosp_to_google_name(module.apex) + "\n")
|
||||
|
||||
def populate_unbundled_dist(self, build_release, modules, snapshots_dir):
|
||||
build_release_dist_dir = os.path.join(self.mainline_sdks_dir,
|
||||
build_release.sub_dir)
|
||||
for module in modules:
|
||||
for sdk in module.sdks:
|
||||
sdk_dist_dir = os.path.join(build_release_dist_dir, SDK_VERSION)
|
||||
if build_release == LATEST:
|
||||
if build_release.generate_gantry_metadata_and_api_diff:
|
||||
self.dist_sdk_snapshot_gantry_metadata_and_api_diff(
|
||||
sdk_dist_dir, sdk, module, snapshots_dir)
|
||||
self.populate_dist_snapshot(build_release, module, sdk,
|
||||
@@ -1378,7 +1458,7 @@ def apply_transformations(producer, tmp_dir, transformations, build_release):
|
||||
os.utime(path, (modified, modified))
|
||||
|
||||
|
||||
def create_producer(tool_path):
|
||||
def create_producer(tool_path, skip_allowed_deps_check):
|
||||
# Variables initialized from environment variables that are set by the
|
||||
# calling mainline_modules_sdks.sh.
|
||||
out_dir = os.environ["OUT_DIR"]
|
||||
@@ -1393,6 +1473,7 @@ def create_producer(tool_path):
|
||||
tool_path=tool_path,
|
||||
subprocess_runner=subprocess_runner,
|
||||
out_dir=out_dir,
|
||||
skip_allowed_deps_check=skip_allowed_deps_check,
|
||||
)
|
||||
return SdkDistProducer(
|
||||
subprocess_runner=subprocess_runner,
|
||||
@@ -1488,6 +1569,11 @@ def main(args):
|
||||
"Defaults to true when TARGET_BUILD_APPS is not set. "
|
||||
"Applicable only if the \"latest\" build release is built.",
|
||||
)
|
||||
args_parser.add_argument(
|
||||
"--skip-allowed-deps-check",
|
||||
action="store_true",
|
||||
help="Skip apex-allowed-deps-check.",
|
||||
)
|
||||
args = args_parser.parse_args(args)
|
||||
|
||||
build_releases = ALL_BUILD_RELEASES
|
||||
@@ -1507,7 +1593,8 @@ def main(args):
|
||||
if not target_build_apps or args.build_platform_sdks_for_mainline:
|
||||
modules += PLATFORM_SDKS_FOR_MAINLINE
|
||||
|
||||
producer = create_producer(args.tool_path)
|
||||
producer = create_producer(args.tool_path, args.skip_allowed_deps_check)
|
||||
producer.dist_generate_sdk_supported_modules_file(modules)
|
||||
producer.produce_dist(modules, build_releases)
|
||||
|
||||
|
||||
|
||||
@@ -50,7 +50,8 @@ function main() {
|
||||
|
||||
# Building with --soong-only and module products requires build_number.txt for
|
||||
# some targets.
|
||||
echo -n "${BUILD_NUMBER}" > "${OUT_DIR}"/soong/build_number.txt
|
||||
# Command to populate {OUT_DIR}/soong/build_number.txt.
|
||||
build/soong/soong_ui.bash --make-mode nothing
|
||||
|
||||
# Delegate the SDK generation to the python script. Use the python version
|
||||
# provided by the build to ensure consistency across build environments.
|
||||
|
||||
@@ -130,6 +130,10 @@ class FakeSnapshotBuilder(mm.SnapshotBuilder):
|
||||
|
||||
for target_path in target_paths:
|
||||
os.makedirs(os.path.split(target_path)[0])
|
||||
if ".latest.extension_version" in target_path:
|
||||
self.write_data_to_file(
|
||||
target_path, str(self.get_module_extension_version()))
|
||||
else:
|
||||
self.write_data_to_file(target_path, "")
|
||||
|
||||
return target_dict
|
||||
@@ -343,6 +347,11 @@ class TestProduceDist(unittest.TestCase):
|
||||
5,
|
||||
msg="The module extension version does not match the expected value."
|
||||
)
|
||||
self.assertEqual(
|
||||
json_data["last_finalized_version"],
|
||||
5,
|
||||
msg="The last finalized version does not match the expected value."
|
||||
)
|
||||
|
||||
def create_build_number_file(self):
|
||||
soong_dir = os.path.join(self.tmp_out_dir, "soong")
|
||||
@@ -410,6 +419,84 @@ class TestProduceDist(unittest.TestCase):
|
||||
),
|
||||
], snapshot_builder.snapshots)
|
||||
|
||||
def test_generate_sdk_supported_modules_file(self):
|
||||
subprocess_runner = mm.SubprocessRunner()
|
||||
snapshot_builder = FakeSnapshotBuilder(
|
||||
tool_path="path/to/mainline_modules_sdks.sh",
|
||||
subprocess_runner=subprocess_runner,
|
||||
out_dir=self.tmp_out_dir,
|
||||
)
|
||||
producer = mm.SdkDistProducer(
|
||||
subprocess_runner=subprocess_runner,
|
||||
snapshot_builder=snapshot_builder,
|
||||
dist_dir=self.tmp_dist_dir,
|
||||
)
|
||||
producer = mm.SdkDistProducer(
|
||||
subprocess_runner=subprocess_runner,
|
||||
snapshot_builder=snapshot_builder,
|
||||
dist_dir=self.tmp_dist_dir,
|
||||
)
|
||||
|
||||
# Contains only sdk modules.
|
||||
modules = [
|
||||
MAINLINE_MODULES_BY_APEX["com.android.adservices"],
|
||||
MAINLINE_MODULES_BY_APEX["com.android.art"],
|
||||
MAINLINE_MODULES_BY_APEX["com.android.mediaprovider"],
|
||||
]
|
||||
producer.dist_generate_sdk_supported_modules_file(modules)
|
||||
with open(os.path.join(self.tmp_dist_dir, "sdk-modules.txt"), "r",
|
||||
encoding="utf8") as sdk_modules_file:
|
||||
sdk_modules = sdk_modules_file.readlines()
|
||||
|
||||
self.assertTrue("com.google.android.adservices\n" in sdk_modules)
|
||||
self.assertTrue("com.google.android.art\n" in sdk_modules)
|
||||
self.assertTrue("com.google.android.mediaprovider\n" in sdk_modules)
|
||||
|
||||
# Contains only non-sdk modules.
|
||||
modules = [
|
||||
mm.MainlineModule(
|
||||
apex="com.android.adbd",
|
||||
sdks=[],
|
||||
first_release="",
|
||||
),
|
||||
mm.MainlineModule(
|
||||
apex="com.android.adbd",
|
||||
sdks=[],
|
||||
first_release="",
|
||||
),
|
||||
]
|
||||
producer.dist_generate_sdk_supported_modules_file(modules)
|
||||
with open(os.path.join(self.tmp_dist_dir, "sdk-modules.txt"), "r",
|
||||
encoding="utf8") as sdk_modules_file:
|
||||
sdk_modules = sdk_modules_file.readlines()
|
||||
|
||||
self.assertEqual(len(sdk_modules), 0)
|
||||
|
||||
# Contains mixture of sdk and non-sdk modules.
|
||||
modules = [
|
||||
MAINLINE_MODULES_BY_APEX["com.android.adservices"],
|
||||
MAINLINE_MODULES_BY_APEX["com.android.mediaprovider"],
|
||||
mm.MainlineModule(
|
||||
apex="com.android.adbd",
|
||||
sdks=[],
|
||||
first_release="",
|
||||
),
|
||||
mm.MainlineModule(
|
||||
apex="com.android.adbd",
|
||||
sdks=[],
|
||||
first_release="",
|
||||
),
|
||||
]
|
||||
producer.dist_generate_sdk_supported_modules_file(modules)
|
||||
with open(os.path.join(self.tmp_dist_dir, "sdk-modules.txt"), "r",
|
||||
encoding="utf8") as sdk_modules_file:
|
||||
sdk_modules = sdk_modules_file.readlines()
|
||||
|
||||
self.assertTrue("com.google.android.adservices\n" in sdk_modules)
|
||||
self.assertTrue("com.google.android.mediaprovider\n" in sdk_modules)
|
||||
self.assertFalse("com.google.android.adbd\n" in sdk_modules)
|
||||
self.assertFalse("com.google.android.extservices\n" in sdk_modules)
|
||||
|
||||
|
||||
def path_to_test_data(relative_path):
|
||||
"""Construct a path to a test data file.
|
||||
@@ -520,6 +607,21 @@ class TestAndroidBpTransformations(unittest.TestCase):
|
||||
|
||||
self.apply_transformations(src, transformations, mm.Tiramisu, expected)
|
||||
|
||||
def test_optional_mainline_module_latest(self):
|
||||
"""Tests the transformations applied to an optional mainline sdk LATEST.
|
||||
|
||||
This uses wifi as an example of a optional mainline sdk. This checks
|
||||
that the use_source_config_var property is inserted.
|
||||
"""
|
||||
src = read_test_data("wifi_Android.bp.input")
|
||||
|
||||
expected = read_test_data("wifi_latest_Android.bp.expected")
|
||||
|
||||
module = MAINLINE_MODULES_BY_APEX["com.android.wifi"]
|
||||
transformations = module.transformations(mm.LATEST, mm.Sdk)
|
||||
|
||||
self.apply_transformations(src, transformations, mm.LATEST, expected)
|
||||
|
||||
def test_art(self):
|
||||
"""Tests the transformations applied to a the ART mainline module.
|
||||
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
// This is auto-generated. DO NOT EDIT.
|
||||
|
||||
package {
|
||||
// A default list here prevents the license LSC from adding its own list which would
|
||||
// be unnecessary as every module in the sdk already has its own licenses property.
|
||||
default_applicable_licenses: ["Android-Apache-2.0"],
|
||||
}
|
||||
|
||||
prebuilt_bootclasspath_fragment {
|
||||
name: "com.android.wifi-bootclasspath-fragment",
|
||||
// Do not prefer prebuilt if the Soong config variable "source_build" in namespace "wifi_module" is true.
|
||||
use_source_config_var: {
|
||||
config_namespace: "wifi_module",
|
||||
var_name: "source_build",
|
||||
},
|
||||
visibility: ["//visibility:public"],
|
||||
apex_available: ["com.android.wifi"],
|
||||
licenses: ["wifi-module-sdk_Android-Apache-2.0"],
|
||||
contents: ["framework-wifi"],
|
||||
fragments: [
|
||||
{
|
||||
apex: "com.android.art",
|
||||
module: "art-bootclasspath-fragment",
|
||||
},
|
||||
],
|
||||
hidden_api: {
|
||||
unsupported: ["hiddenapi/hiddenapi-unsupported.txt"],
|
||||
max_target_r_low_priority: ["hiddenapi/hiddenapi-max-target-r-low-priority.txt"],
|
||||
max_target_o_low_priority: ["hiddenapi/hiddenapi-max-target-o-low-priority.txt"],
|
||||
annotation_flags: "hiddenapi/annotation-flags.csv",
|
||||
metadata: "hiddenapi/metadata.csv",
|
||||
index: "hiddenapi/index.csv",
|
||||
signature_patterns: "hiddenapi/signature-patterns.csv",
|
||||
filtered_stub_flags: "hiddenapi/filtered-stub-flags.csv",
|
||||
filtered_flags: "hiddenapi/filtered-flags.csv",
|
||||
},
|
||||
}
|
||||
|
||||
java_sdk_library_import {
|
||||
name: "framework-wifi",
|
||||
// Do not prefer prebuilt if the Soong config variable "source_build" in namespace "wifi_module" is true.
|
||||
use_source_config_var: {
|
||||
config_namespace: "wifi_module",
|
||||
var_name: "source_build",
|
||||
},
|
||||
visibility: ["//visibility:public"],
|
||||
apex_available: [
|
||||
"com.android.wifi",
|
||||
"test_com.android.wifi",
|
||||
],
|
||||
licenses: ["wifi-module-sdk_Android-Apache-2.0"],
|
||||
shared_library: false,
|
||||
permitted_packages: [
|
||||
"android.hardware.wifi",
|
||||
"android.net.wifi",
|
||||
"com.android.wifi.x",
|
||||
],
|
||||
public: {
|
||||
jars: ["sdk_library/public/framework-wifi-stubs.jar"],
|
||||
stub_srcs: ["sdk_library/public/framework-wifi_stub_sources"],
|
||||
current_api: "sdk_library/public/framework-wifi.txt",
|
||||
removed_api: "sdk_library/public/framework-wifi-removed.txt",
|
||||
annotations: "sdk_library/public/framework-wifi_annotations.zip",
|
||||
sdk_version: "module_current",
|
||||
},
|
||||
system: {
|
||||
jars: ["sdk_library/system/framework-wifi-stubs.jar"],
|
||||
stub_srcs: ["sdk_library/system/framework-wifi_stub_sources"],
|
||||
current_api: "sdk_library/system/framework-wifi.txt",
|
||||
removed_api: "sdk_library/system/framework-wifi-removed.txt",
|
||||
annotations: "sdk_library/system/framework-wifi_annotations.zip",
|
||||
sdk_version: "module_current",
|
||||
},
|
||||
module_lib: {
|
||||
jars: ["sdk_library/module-lib/framework-wifi-stubs.jar"],
|
||||
stub_srcs: ["sdk_library/module-lib/framework-wifi_stub_sources"],
|
||||
current_api: "sdk_library/module-lib/framework-wifi.txt",
|
||||
removed_api: "sdk_library/module-lib/framework-wifi-removed.txt",
|
||||
annotations: "sdk_library/module-lib/framework-wifi_annotations.zip",
|
||||
sdk_version: "module_current",
|
||||
},
|
||||
}
|
||||
|
||||
java_import {
|
||||
name: "service-wifi",
|
||||
// Do not prefer prebuilt if the Soong config variable "source_build" in namespace "wifi_module" is true.
|
||||
use_source_config_var: {
|
||||
config_namespace: "wifi_module",
|
||||
var_name: "source_build",
|
||||
},
|
||||
visibility: [
|
||||
"//frameworks/opt/net/wifi/service/apex",
|
||||
"//frameworks/opt/net/wifi/tests/wifitests/apex",
|
||||
"//packages/modules/Wifi/apex",
|
||||
"//packages/modules/Wifi/service",
|
||||
"//packages/modules/Wifi/service/tests/wifitests/apex",
|
||||
],
|
||||
apex_available: [
|
||||
"com.android.wifi",
|
||||
"test_com.android.wifi",
|
||||
],
|
||||
licenses: ["wifi-module-sdk_Android-Apache-2.0"],
|
||||
jars: ["java_systemserver_libs/snapshot/jars/are/invalid/service-wifi.jar"],
|
||||
}
|
||||
|
||||
license {
|
||||
name: "wifi-module-sdk_Android-Apache-2.0",
|
||||
visibility: ["//visibility:private"],
|
||||
license_kinds: ["SPDX-license-identifier-Apache-2.0"],
|
||||
license_text: ["licenses/build/soong/licenses/LICENSE"],
|
||||
}
|
||||
|
||||
prebuilt_systemserverclasspath_fragment {
|
||||
name: "com.android.wifi-systemserverclasspath-fragment",
|
||||
// Do not prefer prebuilt if the Soong config variable "source_build" in namespace "wifi_module" is true.
|
||||
use_source_config_var: {
|
||||
config_namespace: "wifi_module",
|
||||
var_name: "source_build",
|
||||
},
|
||||
visibility: ["//visibility:public"],
|
||||
apex_available: ["com.android.wifi"],
|
||||
licenses: ["wifi-module-sdk_Android-Apache-2.0"],
|
||||
standalone_contents: ["service-wifi"],
|
||||
}
|
||||
@@ -46,7 +46,7 @@ import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Objects;
|
||||
|
||||
import org.jf.dexlib2.iface.ClassDef;
|
||||
import com.android.tools.smali.dexlib2.iface.ClassDef;
|
||||
|
||||
/*
|
||||
* Target preparer that fetches classpath relevant artifacts for a test in a 'reentrant' manner.
|
||||
|
||||
@@ -21,7 +21,7 @@ package {
|
||||
java_test_host {
|
||||
name: "ApkInApexTest",
|
||||
srcs: [
|
||||
"ApkInApexTest.java"
|
||||
"ApkInApexTest.java",
|
||||
],
|
||||
libs: ["tradefed"],
|
||||
java_resources: [
|
||||
@@ -32,7 +32,7 @@ java_test_host {
|
||||
"cts-install-lib-host",
|
||||
"frameworks-base-hostutils",
|
||||
"modules-utils-build-testing",
|
||||
"truth-prebuilt",
|
||||
"truth",
|
||||
],
|
||||
test_suites: [
|
||||
"general-tests",
|
||||
|
||||
@@ -34,6 +34,7 @@ apex_test {
|
||||
key: "test_com.android.modules.apkinapex.key",
|
||||
certificate: ":test_com.android.modules.apkinapex.certificate",
|
||||
updatable: false,
|
||||
min_sdk_version: "33",
|
||||
apps: [
|
||||
"com.android.modules.apkinapex.apps.installable",
|
||||
"com.android.modules.apkinapex.apps.futureminsdk",
|
||||
|
||||
@@ -29,6 +29,7 @@ android_test_helper_app {
|
||||
|
||||
android_test_helper_app {
|
||||
name: "com.android.modules.apkinapex.apps.futuretargetsdk",
|
||||
min_sdk_version: "33",
|
||||
target_sdk_version: "Tiramisu",
|
||||
apex_available: [ "test_com.android.modules.apkinapex" ],
|
||||
manifest: "FutureTargetSdkAndroidManifest.xml"
|
||||
@@ -36,6 +37,7 @@ android_test_helper_app {
|
||||
|
||||
android_test_helper_app {
|
||||
name: "com.android.modules.apkinapex.apps.pastmaxsdk",
|
||||
min_sdk_version: "29",
|
||||
target_sdk_version: "Tiramisu",
|
||||
apex_available: [ "test_com.android.modules.apkinapex" ],
|
||||
manifest: "PastMaxSdkAndroidManifest.xml"
|
||||
|
||||
@@ -24,7 +24,7 @@ java_test_host {
|
||||
static_libs: [
|
||||
"junit",
|
||||
"ClasspathFetcher",
|
||||
"truth-prebuilt",
|
||||
"truth",
|
||||
"objenesis",
|
||||
],
|
||||
libs: [
|
||||
|
||||
@@ -28,6 +28,7 @@ import com.android.modules.proto.ClasspathClasses.ClasspathEntry;
|
||||
import com.android.modules.proto.ClasspathClasses.Jar;
|
||||
import com.android.modules.targetprep.ClasspathFetcher;
|
||||
import com.android.modules.utils.build.testing.DeviceSdkLevel;
|
||||
import com.android.tools.smali.dexlib2.iface.ClassDef;
|
||||
import com.android.tradefed.config.Option;
|
||||
import com.android.tradefed.device.DeviceNotAvailableException;
|
||||
import com.android.tradefed.device.ITestDevice;
|
||||
@@ -47,7 +48,6 @@ import com.google.common.collect.ImmutableSetMultimap;
|
||||
import com.google.common.collect.Multimap;
|
||||
import com.google.common.collect.Multimaps;
|
||||
|
||||
import org.jf.dexlib2.iface.ClassDef;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@@ -24,13 +24,13 @@ java_test_host {
|
||||
unit_test: true,
|
||||
},
|
||||
srcs: [
|
||||
"ClasspathFetcherTest.java"
|
||||
"ClasspathFetcherTest.java",
|
||||
],
|
||||
static_libs: [
|
||||
"ClasspathFetcher",
|
||||
"mockito-host",
|
||||
"objenesis",
|
||||
"truth-prebuilt",
|
||||
"truth",
|
||||
"junit",
|
||||
"tradefed",
|
||||
],
|
||||
|
||||
@@ -21,7 +21,7 @@ package {
|
||||
java_test_host {
|
||||
name: "UpdatableSharedLibsTest",
|
||||
srcs: [
|
||||
"UpdatableSharedLibsTest.java"
|
||||
"UpdatableSharedLibsTest.java",
|
||||
],
|
||||
libs: ["tradefed"],
|
||||
java_resources: [
|
||||
@@ -37,10 +37,10 @@ java_test_host {
|
||||
"cts-install-lib-host",
|
||||
"frameworks-base-hostutils",
|
||||
"modules-utils-build-testing",
|
||||
"truth-prebuilt",
|
||||
"truth",
|
||||
],
|
||||
test_suites: [
|
||||
"general-tests",
|
||||
"mts-core",
|
||||
"mts-mainline-infra",
|
||||
],
|
||||
}
|
||||
|
||||
@@ -37,4 +37,5 @@ apex_test {
|
||||
"com.android.modules.updatablesharedlibs.libs.since.t",
|
||||
],
|
||||
updatable: false,
|
||||
min_sdk_version: "33",
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ android_test_helper_app {
|
||||
static_libs: [
|
||||
"androidx.test.rules",
|
||||
"androidx.test.core",
|
||||
"truth-prebuilt",
|
||||
"truth",
|
||||
],
|
||||
sdk_version: "current",
|
||||
min_sdk_version: "31",
|
||||
|
||||
@@ -22,7 +22,7 @@ android_test_helper_app {
|
||||
static_libs: [
|
||||
"androidx.test.rules",
|
||||
"androidx.test.core",
|
||||
"truth-prebuilt",
|
||||
"truth",
|
||||
],
|
||||
sdk_version: "current",
|
||||
min_sdk_version: "Tiramisu",
|
||||
|
||||
@@ -17,39 +17,6 @@ package {
|
||||
default_applicable_licenses: ["Android-Apache-2.0"],
|
||||
}
|
||||
|
||||
mainline_stubs_args =
|
||||
"--error UnhiddenSystemApi " +
|
||||
"--hide CallbackInterface " +
|
||||
"--hide HiddenTypedefConstant " +
|
||||
"--hide RequiresPermission " +
|
||||
"--enhance-documentation "
|
||||
|
||||
// TODO: remove the hiding when server classes are cleaned up.
|
||||
mainline_framework_stubs_args =
|
||||
mainline_stubs_args +
|
||||
"--hide-package com.android.server "
|
||||
|
||||
priv_apps = " " +
|
||||
"--show-annotation android.annotation.SystemApi\\(" +
|
||||
"client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" +
|
||||
"\\) "
|
||||
|
||||
module_libs = " " +
|
||||
" --show-annotation android.annotation.SystemApi\\(" +
|
||||
"client=android.annotation.SystemApi.Client.MODULE_LIBRARIES" +
|
||||
"\\)" +
|
||||
" --show-for-stub-purposes-annotation android.annotation.SystemApi\\(" +
|
||||
"client=android.annotation.SystemApi.Client.PRIVILEGED_APPS" +
|
||||
"\\) "
|
||||
|
||||
mainline_service_stubs_args =
|
||||
mainline_stubs_args +
|
||||
"--show-annotation android.annotation.SystemApi\\(" +
|
||||
"client=android.annotation.SystemApi.Client.SYSTEM_SERVER" +
|
||||
"\\) " +
|
||||
"--hide-annotation android.annotation.Hide " +
|
||||
"--hide InternalClasses " // com.android.* classes are okay in this interface
|
||||
|
||||
// Defaults common to all mainline module java_sdk_library instances.
|
||||
java_defaults {
|
||||
name: "framework-module-common-defaults",
|
||||
@@ -78,6 +45,7 @@ java_defaults {
|
||||
// TODO(b/156126315) - Remove when no longer needed.
|
||||
api_lint: {
|
||||
enabled: true,
|
||||
legacy_errors_allowed: false,
|
||||
},
|
||||
|
||||
// The API scope specific properties.
|
||||
@@ -91,7 +59,12 @@ java_defaults {
|
||||
installable: false,
|
||||
|
||||
// Configure framework module specific metalava options.
|
||||
droiddoc_options: [mainline_stubs_args],
|
||||
droiddoc_options: [
|
||||
"--error UnhiddenSystemApi",
|
||||
"--error UnflaggedApi",
|
||||
"--hide CallbackInterface",
|
||||
"--enhance-documentation",
|
||||
],
|
||||
|
||||
annotations_enabled: true,
|
||||
|
||||
@@ -133,6 +106,8 @@ java_defaults {
|
||||
},
|
||||
|
||||
defaults_visibility: [
|
||||
"//frameworks/base",
|
||||
"//frameworks/base/api",
|
||||
"//packages/modules/Virtualization:__subpackages__",
|
||||
],
|
||||
}
|
||||
@@ -159,6 +134,8 @@ java_defaults {
|
||||
|
||||
defaults_visibility: [
|
||||
":__subpackages__",
|
||||
// TODO(b/237461653): Move this to packages/modules/Nfc
|
||||
"//frameworks/base/core/java",
|
||||
"//frameworks/base/apex:__subpackages__",
|
||||
"//frameworks/base/libs/hwui",
|
||||
"//frameworks/base/wifi",
|
||||
@@ -193,40 +170,6 @@ java_defaults {
|
||||
],
|
||||
}
|
||||
|
||||
stubs_defaults {
|
||||
name: "service-module-stubs-srcs-defaults",
|
||||
args: mainline_service_stubs_args,
|
||||
installable: false,
|
||||
annotations_enabled: true,
|
||||
merge_annotations_dirs: [
|
||||
"metalava-manual",
|
||||
],
|
||||
filter_packages: ["com.android."],
|
||||
check_api: {
|
||||
current: {
|
||||
api_file: "api/current.txt",
|
||||
removed_api_file: "api/removed.txt",
|
||||
},
|
||||
api_lint: {
|
||||
enabled: true,
|
||||
},
|
||||
},
|
||||
dist: {
|
||||
targets: ["sdk"],
|
||||
dir: "apistubs/android/system-server/api",
|
||||
},
|
||||
}
|
||||
|
||||
// Empty for now, but a convenient place to add rules for all
|
||||
// module java_library system_server stub libs.
|
||||
java_defaults {
|
||||
name: "service-module-stubs-defaults",
|
||||
dist: {
|
||||
targets: ["sdk"],
|
||||
dir: "apistubs/android/system-server",
|
||||
},
|
||||
}
|
||||
|
||||
filegroup_defaults {
|
||||
name: "framework-sources-module-defaults",
|
||||
visibility: [
|
||||
@@ -239,7 +182,7 @@ filegroup_defaults {
|
||||
// These apex_defaults serve as a common place to add properties which should
|
||||
// affect all mainline modules.
|
||||
|
||||
APEX_LOWEST_MIN_SDK_VERSION = "29"
|
||||
APEX_LOWEST_MIN_SDK_VERSION = "30"
|
||||
DCLA_MIN_SDK_VERSION = "31"
|
||||
|
||||
apex_defaults {
|
||||
@@ -251,7 +194,7 @@ apex_defaults {
|
||||
apex_defaults {
|
||||
name: "q-launched-apex-module",
|
||||
defaults: ["any-launched-apex-modules"],
|
||||
min_sdk_version: "29",
|
||||
min_sdk_version: APEX_LOWEST_MIN_SDK_VERSION,
|
||||
defaults_visibility: ["//visibility:public"],
|
||||
}
|
||||
|
||||
@@ -313,7 +256,6 @@ apex_defaults {
|
||||
name: "s-launched-apex-module",
|
||||
defaults: ["any-launched-apex-modules"],
|
||||
min_sdk_version: "31",
|
||||
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,
|
||||
@@ -333,7 +275,6 @@ apex_defaults {
|
||||
defaults_visibility: ["//packages/modules:__subpackages__"],
|
||||
}
|
||||
|
||||
|
||||
apex_defaults {
|
||||
name: "u-launched-apex-module",
|
||||
defaults: ["any-launched-apex-modules"],
|
||||
@@ -344,10 +285,20 @@ apex_defaults {
|
||||
defaults_visibility: ["//packages/modules:__subpackages__"],
|
||||
}
|
||||
|
||||
apex_defaults {
|
||||
name: "v-launched-apex-module",
|
||||
defaults: ["any-launched-apex-modules"],
|
||||
min_sdk_version: "VanillaIceCream",
|
||||
// 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__"],
|
||||
}
|
||||
|
||||
library_linking_strategy_cc_defaults {
|
||||
name: "apex-lowest-min-sdk-version",
|
||||
defaults_visibility: [
|
||||
"//system/core/libutils",
|
||||
"//system/core/libutils:__subpackages__",
|
||||
],
|
||||
min_sdk_version: APEX_LOWEST_MIN_SDK_VERSION,
|
||||
soong_config_variables: {
|
||||
|
||||
@@ -23,9 +23,9 @@ BUILD_TARGET_TRAIN = 'train_build'
|
||||
# This build target is used when fetching from a non-train build (XXXXXXXX)
|
||||
BUILD_TARGET_CONTINUOUS = 'mainline_modules_sdks-userdebug'
|
||||
# The glob of sdk artifacts to fetch from remote build
|
||||
ARTIFACT_PATTERN = 'mainline-sdks/for-latest-build/current/{module_name}/sdk/*.zip'
|
||||
ARTIFACT_PATTERN = 'mainline-sdks/for-next-build/current/{module_name}/sdk/*.zip'
|
||||
# The glob of sdk artifacts to fetch from local build
|
||||
ARTIFACT_LOCAL_PATTERN = 'out/dist/mainline-sdks/for-latest-build/current/{module_name}/sdk/*.zip'
|
||||
ARTIFACT_LOCAL_PATTERN = 'out/dist/mainline-sdks/for-next-build/current/{module_name}/sdk/*.zip'
|
||||
COMMIT_TEMPLATE = """Finalize artifacts for extension SDK %d
|
||||
|
||||
Import from build id %s.
|
||||
|
||||
Reference in New Issue
Block a user