platform_build_soong/java
Jiyong Park ec47e99b4d Limit System SDK to 34 for Java modules in the vendor partition
This change disallows Java modules in the vendor partition to use System
SDK that is newer than API level 34; 34 is the latest allowed.

Background 1: with Trunk Stable, the system/vendor interface is released
at Q2 whereas the system/app interface is released at Q3. In other
words, at Q2, the APIs which will be added to the system SDK at Q3 are
not available. Since the system/vendor interface (which is fronzen at
Q2) is what the modules in the vendor partition will be building
against, they can't and shouldn't use those new APIs that will be added
in the future (Q3). Using those APIs is risky because there's a chance
that those APIs get removed or changed between Q2 and Q3. For example,
2024 Q2 is technically still Android U, not Android V.

Background 2: The use of Java APIs in the vendor partition had many
issues. Most significantly, those "vendor" Java apps are categorized as
part of the system partition because all Java app processes require
access to platform internal libraries that are prohibited to vendor
processes. Furthermore, since the Project Treble, the vendor partition
was re-purposed to a partition to host SoC-dependent bits - usually
HALs. Implementing HALs in Java has never been officially supported and
has had many loop holes.

We'd like to use both background 1 and 2 as a chance to disallow any
Java code in the vendor partition. However, since there are already some
Java modules in the partition, we can't suddenly ban it. The deprecation
will be made gradually, and this CL is the start.

Note that sdk_version: "current" or "system_current" is automatically
overridden into 34 or system_34. This is to prevent sudden breakage of
vendor modules that have been targetting the latest (i.e. current) API
level. They will however fail if they use APIs newer than API level 34.

Bug: 314011075
Test: m blueprint_tests
Change-Id: I59f5ac15ce9ac2ff7cc89e9c110169359077c37c
2024-01-04 13:29:04 +09:00
..
config Remove setting com.android.tools.r8.emitRecordAnnotationsExInDex 2023-12-19 10:49:58 +01:00
core-libraries Remove TxtStubLibraries.bp 2023-11-02 01:02:40 +00:00
aapt2.go Add aconfig flag support for android_app 2023-12-07 23:01:26 +00:00
aar.go Convert OtherModuleProvider to generic providers API 2023-12-14 16:12:22 -08:00
aar_test.go Convert ModuleProvder to generic providers API 2023-12-14 16:12:22 -08:00
Android.bp Limit System SDK to 34 for Java modules in the vendor partition 2024-01-04 13:29:04 +09:00
android_manifest.go add manifest_values application id property to soong 2023-10-23 18:26:53 +00:00
android_manifest_test.go Remove sdkPreSingleton and overlaySingleton 2023-11-01 15:29:09 -07:00
android_resources.go Remove sdkPreSingleton and overlaySingleton 2023-11-01 15:29:09 -07:00
androidmk.go Move dexpreopt processing from java_*_import to prebuilt_apex 2023-12-18 23:17:26 +00:00
androidmk_test.go
app.go move CollectDependencyAconfigFiles to android 2023-12-19 19:34:00 +00:00
app_builder.go Reapply "Use R8 for resource shrinking" 2023-11-29 05:07:50 +00:00
app_import.go Convert Provider to generic providers API 2023-12-14 16:12:21 -08:00
app_import_test.go Move dexpreopt processing from java_*_import to prebuilt_apex 2023-12-18 23:17:26 +00:00
app_set.go Add skip-sdk-check to extract_apks 2023-03-21 08:13:25 -07:00
app_set_test.go Add skip-sdk-check to extract_apks 2023-03-21 08:13:25 -07:00
app_test.go Move dexpreopt processing from java_*_import to prebuilt_apex 2023-12-18 23:17:26 +00:00
base.go move CollectDependencyAconfigFiles to android 2023-12-19 19:34:00 +00:00
boot_jars.go
bootclasspath.go Refactor dexpreopt for boot jars to make it flexible to config changes. 2023-07-14 12:13:28 +01:00
bootclasspath_fragment.go Use the correct bootjars when multiple prebuilt apexes exist 2023-12-20 16:43:01 +00:00
bootclasspath_fragment_test.go Convert ModuleProvder to generic providers API 2023-12-14 16:12:22 -08:00
builder.go Don't write transitive dependencies to Android-${TARGET_PRODUCT}.mk 2023-11-29 10:31:13 -08:00
classpath_element.go Convert OtherModuleProvider to generic providers API 2023-12-14 16:12:22 -08:00
classpath_fragment.go Convert SetProvider to generic providers API 2023-12-14 16:12:20 -08:00
code_metadata_test.go Write raw files to disk instead of the ninja file 2023-12-19 16:33:46 -08:00
device_host_converter.go Convert OtherModuleProvider to generic providers API 2023-12-14 16:12:22 -08:00
device_host_converter_test.go Strip META-INF/services from implementation jars when using as header jars 2023-07-19 21:48:11 +00:00
dex.go Merge "Revert^6 "Enable dex container (DEX v41) for the whole system"" into main 2023-12-20 01:37:06 +00:00
dex_test.go transitive r8 flags for installable {android,java}_libraries 2023-10-31 18:59:04 +00:00
dexpreopt.go Use the correct bootjars when multiple prebuilt apexes exist 2023-12-20 16:43:01 +00:00
dexpreopt_bootjars.go Use the correct bootjars for hiddneapi when multiple prebuilts exist 2024-01-02 17:56:14 +00:00
dexpreopt_check.go Change OnlyPreoptBootImageAndSystemServer to OnlyPreoptArtBootImage. 2023-11-09 16:50:58 +00:00
dexpreopt_config.go Use the correct prof file when multiple prebuilt apexes exist 2023-12-19 22:37:29 +00:00
dexpreopt_config_test.go Refactor dexpreopt for boot jars to make it flexible to config changes. 2023-07-14 12:13:28 +01:00
dexpreopt_config_testing.go gofmt soong 2023-10-18 17:42:59 -07:00
dexpreopt_test.go Move dexpreopt processing from java_*_import to prebuilt_apex 2023-12-18 23:17:26 +00:00
droiddoc.go Convert OtherModuleProvider to generic providers API 2023-12-14 16:12:22 -08:00
droiddoc_test.go
droidstubs.go Remove ConvertWithBp2build implementations 2023-12-08 13:51:05 -08:00
droidstubs_test.go Include "soong" in sandboxed out paths 2023-12-19 12:14:01 -08:00
fuzz.go Convert OtherModuleProvider to generic providers API 2023-12-14 16:12:22 -08:00
fuzz_test.go Strip META-INF/services from implementation jars when using as header jars 2023-07-19 21:48:11 +00:00
gen.go Remove ConvertWithBp2build implementations 2023-12-08 13:51:05 -08:00
generated_java_library.go Remove ConvertWithBp2build implementations 2023-12-08 13:51:05 -08:00
generated_java_library_test.go Remove ConvertWithBp2build implementations 2023-12-08 13:51:05 -08:00
genrule.go Remove ConvertWithBp2build implementations 2023-12-08 13:51:05 -08:00
genrule_test.go
hiddenapi.go Convert OtherModuleProvider to generic providers API 2023-12-14 16:12:22 -08:00
hiddenapi_modular.go Use the correct bootjars for hiddneapi when multiple prebuilts exist 2024-01-02 17:56:14 +00:00
hiddenapi_monolithic.go Convert OtherModuleProvider to generic providers API 2023-12-14 16:12:22 -08:00
hiddenapi_singleton.go Convert OtherModuleProvider to generic providers API 2023-12-14 16:12:22 -08:00
hiddenapi_singleton_test.go Prepare tests for dexpreopt changes. 2023-05-11 18:24:44 +01:00
jacoco.go Use merge_zips instead of ziptime for resetting timestamps in jacoco outputs 2023-11-01 14:41:48 -07:00
jacoco_test.go
java.go Use the correct bootjars when multiple prebuilt apexes exist 2023-12-20 16:43:01 +00:00
java_resources.go
java_test.go Merge changes I8b352305,Iadf9e324 into main 2023-12-20 01:35:40 +00:00
jdeps.go Convert ModuleProvder to generic providers API 2023-12-14 16:12:22 -08:00
jdeps_test.go
kotlin.go Enable restat for kapt stubs rules 2023-09-20 09:53:39 -07:00
kotlin_test.go transitive Java deps for r8 2023-01-20 17:05:14 -05:00
legacy_core_platform_api_usage.go Created empty framework-location non-updatable module 2023-08-28 17:45:30 +00:00
lint.go Convert ModuleProvder to generic providers API 2023-12-14 16:12:22 -08:00
lint_defaults.txt Merge "303434307: Enable flagged API checking" into main 2023-12-11 18:14:56 +00:00
lint_test.go Add TestContext parameter to ContentFromFileRuleForTests 2023-12-03 17:22:56 -08:00
platform_bootclasspath.go Use the correct bootjars for hiddneapi when multiple prebuilts exist 2024-01-02 17:56:14 +00:00
platform_bootclasspath_test.go Add srcjar output for platform_bootclasspath 2023-09-28 13:21:21 +00:00
platform_compat_config.go Remove ConvertWithBp2build implementations 2023-12-08 13:51:05 -08:00
platform_compat_config_test.go
plugin.go Remove ConvertWithBp2build implementations 2023-12-08 13:51:05 -08:00
plugin_test.go
prebuilt_apis.go Remove ConvertWithBp2build implementations 2023-12-08 13:51:05 -08:00
prebuilt_apis_test.go Support for incremetal platform prebuilt APIs 2023-08-25 18:03:44 +00:00
proto.go Remove ConvertWithBp2build implementations 2023-12-08 13:51:05 -08:00
proto_test.go
robolectric.go Convert OtherModuleProvider to generic providers API 2023-12-14 16:12:22 -08:00
rro.go Use an option struct in aapt.buildActions & manifestMerger 2023-10-10 14:31:03 +00:00
rro_test.go Remove sdkPreSingleton and overlaySingleton 2023-11-01 15:29:09 -07:00
sdk.go Convert ModuleProvder to generic providers API 2023-12-14 16:12:22 -08:00
sdk_library.go Use the correct bootjars when multiple prebuilt apexes exist 2023-12-20 16:43:01 +00:00
sdk_library_external.go
sdk_library_test.go Use the correct prof file when multiple prebuilt apexes exist 2023-12-19 22:37:29 +00:00
sdk_test.go
sdk_version_test.go Limit System SDK to 34 for Java modules in the vendor partition 2024-01-04 13:29:04 +09:00
support_libraries.go Handle Android.bp files in subdirectories of androidx 2023-10-23 13:25:13 -04:00
system_modules.go Merge "Change target platform to LINUX-OTHER" into main 2023-12-21 17:30:08 +00:00
system_modules_test.go Convert ModuleProvder to generic providers API 2023-12-14 16:12:22 -08:00
systemserver_classpath_fragment.go Stop collecting path entry for module_bp_java_deps.json from each module type 2023-11-15 11:40:48 -08:00
systemserver_classpath_fragment_test.go
test_spec_test.go Write raw files to disk instead of the ninja file 2023-12-19 16:33:46 -08:00
testing.go Use the correct prof file when multiple prebuilt apexes exist 2023-12-19 22:37:29 +00:00
tradefed.go Change deps of ctx.Install* from Paths to InstallPaths 2023-11-17 19:06:43 -08:00