summaryrefslogtreecommitdiff
path: root/java/sdk.go
AgeCommit message (Collapse)Author
2025-03-04Build dexpreopt_tools.zip in soong Cole Faust
For soong-only builds. Bug: 398028319 Test: diff'd zip file before/after, they're the same Change-Id: I6b480f4185546f3b61d81ad80f0fe1db6bafb133
2025-02-25Convert the following singletons to use ModuleProxy: Yu Liu
buildTargetSingleton exportedJavaDeclarationsLibrarySingleton javaFuzzPackager kytheExtractAllSingleton kytheExtractJavaSingleton kytheExtractRustSingleton lintSingleton logtagsSingleton makeVarsSingleton ndkAbiDiffSingleton ndkAbiDumpSingleton phonySingleton platformCompatConfigSingleton sdkSingleton Bug: 377723687 Test: Unit tests and compare the ninja and mk files generated. Change-Id: I625ac8a209ca93755b2ba232202cfb44ecefde0a
2025-02-19Convert stubLibraries, soongMetricsSingleton, sdkSingleton, Yu Liu
complianceMetadataSingleton, freezeApiSingleton and testSuiteFiles to use ModuleProxy. Bug: 377723687 Test: Unit tests and compare the ninja and mk files generated. Change-Id: I91789633ff0d4e0ab170717caf0a6b4f63c38593
2025-02-14Dist api fingerprint file in singleton build actions Cole Faust
To remove our reliance on MakeVars(). Bug: 395184523 Test: Presubmits Change-Id: If3b23375884e6e9df3cb1ae0f3d22f9c4d568de5
2025-02-07Migrate the dist rule of api_fingerprint.txt to Soong Jihoon Kang
...and remove the existing dist rule in Make to support dist'ing api_fingerprint.txt in Make Test: m droid dist --soong-only && ls -l out/dist/api_fingerprint.txt Bug: 394365683 Change-Id: Ib4a8e3efe5404e6ddbf656f40e8ca9785cd6d5e7
2024-11-08Target Java 21 wherever Java 17 was being targeted Sorin Basca
Bug: 342332820 Change-Id: I640f1175a81bc3d8ef9707968e274d9eb33a9356 Test: TH
2024-11-05Target Java 21 by default Sorin Basca
Bug: 342332820 Test: TH Change-Id: I3d440c79231cc470013610c8b3ec95a0b4a0cb6a
2024-08-26Merge "Guarantee frameworks.aidl stability." into main Treehugger Robot
2024-08-21Guarantee frameworks.aidl stability. Steven Moreland
Apps share these classes from the BCP, so even if they are changed, they stay in sync. Bug: 258850063 Test: build Change-Id: I50b6a928c29f5d9eca9496b91363a8fc5d397b00
2024-08-12Merge SingletonProviderContext with OtherModuleProviderContext Yu Liu
Bug: 358425833 Test: CI Change-Id: I8e3f40dc3cfc5337008b419801f8e6bf2d48e8b2
2024-05-23Allow experimental Java target 21 by default Sorin Basca
Bug: 342332820 Test: EXPERIMENTAL_TARGET_JAVA_VERSION_21=true m Change-Id: I6cc21bf191385df91c2446b7cd6291a0e3532bea
2024-03-27Reland "Migrate buildinfo.sh script into Soong" Inseob Kim
To build system.img in Soong, we need all artifacts including build.prop. This fully migrates buildinfo.prop file into Soong as a first step to build build.prop on Soong. This fixes an error caused by an incorrect path to build thumbprint file. Bug: 322090587 Test: compare build.prop before and after Test: build multiple times and see build.prop isn't rebuilt Change-Id: Id4fa830009538856c30825ff47268b11fa6cb5d6
2024-03-26Revert "Migrate buildinfo.sh script into Soong" Gina Ko
Revert submission 3004875-buildinfo_prop_soong Reason for revert: DroidMonitor-triggered revert due to breakage b/331462869 Reverted changes: /q/submissionid:3004875-buildinfo_prop_soong Bug: 331462869 Change-Id: Ib8bbbad29a4ad7b800e6bd1a67a401c2225b78cb
2024-03-26Migrate buildinfo.sh script into Soong Inseob Kim
To build system.img in Soong, we need all artifacts including build.prop. This fully migrates buildinfo.prop file into Soong as a first step to build build.prop on Soong. Bug: 322090587 Test: compare build.prop before and after Test: build multiple times and see build.prop isn't rebuilt Change-Id: Icaa7e1fdab2a8c169ac00949d3aaf6c8212a1872
2024-02-12Add environment variable UNBUNDLED_BUILD_TARGET_SDK_WITH_DESSERT_SHA Jihoon Kang
UNBUNDLED_BUILD_TARGET_SDK_WITH_DESSERT_SHA enables user to specify ${codename}.${sha} as min_sdk_version and target_sdk_version in order to support mainline train building into android build. Test: TH Bug: 295905124 Change-Id: I032d464aaa7314520f98b8eafa53d962940075ce
2024-01-15Implicitly bump up Java target to 1.8 Sorin Basca
Bug: 320294595 Test: m Change-Id: I693e564c67d17254d68f3a9c16664c1da93b9488
2023-12-14Convert ModuleProvder to generic providers API Colin Cross
Convert all of the callers of ModuleProvider/ModuleHasProvider to use the type-safe android.SingletonModuleProvider API. Bug: 316410648 Test: builds Change-Id: I6f11638546b64749e451cebbf33140248dc1d193
2023-11-01Remove sdkPreSingleton and overlaySingleton Cole Faust
These were the only 2 pre-singletons in soong. sdkPreSingleton is totally unused. overlaySingleton can be done during GenerateAndroidBuildActions instead. Test: m nothing --no-skip-soong-tests Change-Id: Ieb5ab92f18cb56be4049c0842f61df8aa02dc52c
2023-10-23SdkTestCore for non-updatable modules Mark White
Provides SdkTestCore/test_core_current sdk_version for non-updatable modules that have their test scope dependent on test apis from framework-minus-apex. Ignore-AOSP-First: Change in topic with internal-first projects Bug: 289776578 Test: m checkapi | go test ./java Merged-In: Iba3213e8c34ea75ac9dd8532a95ef62fb5455e6c Change-Id: Iba3213e8c34ea75ac9dd8532a95ef62fb5455e6c
2023-06-15Cleanup remaining android.JavaApiLibraryName() references Jihoon Kang
Since the name of the java_library generated from sdk_library per api scope does not depend on the build configuration anymore, all dependency switching "magic" via android.JavaApiLibraryName() can be removed. This change also removes from-text-build-specific test cases, as those test cases depend on build configurations. Test: m nothing && m nothing --build-from-text-stub Bug: 287340610 Change-Id: I3bac35259e0cbaa16432a46cb2b128951c9bc075
2023-06-05Cleanup android.JavaApiLibraryName references Jihoon Kang
This change cleans up references to android.JavaApiLibraryName() so that rdeps link against "android_*_stubs_current" instead of "android_*_stubs_current.from-text". Bug: 284995489 Test: m Change-Id: Ibdf33b15981317c43e468dbc1657229d54bbd226
2023-05-19Parallelize singleton execution LaMont Jones
Bug: 281536768 Test: manual, presubmits Change-Id: I57fdc76ba6b277e88e196b506af87127a530fd37
2023-04-03Create core-lambda-stubs from .txt files Spandan Das
APIs to compile lambda are part of art's toolchain api surface. Generating stubs from .txt files allows us to prune the remaining sdk dependencies on libcore/ that are not api files Test: m core-lambda-stubs.from-text (On top of change containing core.current.stubs.from-text and turning enabled: true) Change-Id: I0ab8459b9317cb055a434eb635ba06d38da5b92e
2023-03-30Rename core stubs to .txt stubs if applicable Spandan Das
In scope: - core.current.stubs - system modules generated for core's public stubs - system modules generated for core's module_lib stubs The system modules generated for core_platform api surface will be handled in aosp/2514755 Test: go build ./java Change-Id: I34134f79c8ae6e5b218d0b85553de5a748a8cc3f
2023-03-20Cleanup hardcoded references to android_*stubs_current Spandan Das
These hardcoded refs will need to be updated when we start using .txt stub equivalent (single-tree/multi-tree). Instead of strewing this logic all over the codebase, create a helper function that contains the replacement logic. All other places should call this helper function instead of calculating the name of .txt equivalent soong module by itself. (Will do a similar cleanup in build/make) Test: no change in ninja file Change-Id: I6bf999eb4aeaba6ac2a44b9016bae4ec8c79ce19
2023-03-08Merge "Correct SDK version for Java 17" Sorin Basca
2023-03-07Incorporate Bazel-built fingerprint file into mixed builds Zi Wang
Test: m and TH Bug: 268337233 Merged-In: Ib2f7fa35b2d94972869e8e85be47b288ff875408 Change-Id: Ia2670ebc0b1b4b720e79281fe81235555d498789
2023-03-03Correct SDK version for Java 17 Sorin Basca
Bug: 233029164 Test: TH Change-Id: Ie93ab4dc7517c0fb4e24c12177b079ef41c1fce7
2023-02-15Reland^2 "Target Java 17" Sorin Basca
This reverts commit 91ba6c7e01e03bde6e2f24b6d093603391149ae7. Reason for revert: Relanding Java 17 Change-Id: I6d0e64bb86b9f4a0f41baa33c3226c6316718456
2023-02-14Revert "Reland "Target Java 17"" Julien Desprez
This reverts commit 1fbf7f21a452d372c629e6736ee17a216c23a926. Reason for revert: broke docker image, pinning is incomplete it seems Change-Id: I7102cb233a4fe5ce0f5a1ead98cfc661c3d82ce5
2023-02-03Reland "Target Java 17" Sorin Basca
This reverts commit 384250c7c45c01f474b0e941890382e6d097cca2. Reason for revert: Relanding the feature. Bug: 233029164 Change-Id: Ib66deabbf6e9604798c70edaf581f46db848e6ca
2023-02-02Revert "Target Java 17" Sorin Basca
This reverts commit d6be9e51ca5d935087d6735dd5d8dc2c40801ae7. Reason for revert: b/267608166. Change-Id: Ie07caa5ace3bcb290829e6fa476c5e1d47b975ba Fixed: 267608166
2023-01-11Target Java 17 Sorin Basca
Bug: 233029164 Test: TH Change-Id: I750b866565c264eb4f4ac14ebc88be6fc9b1b458
2022-05-24Add experimental option to target Java 17 Sorin Basca
Bug: 233029164 Test: EXPERIMENTAL_TARGET_JAVA_VERSION_17=true \ EXPERIMENTAL_USE_OPENJDK17_TOOLCHAIN=true m Change-Id: I80a9ba9eb356a460c1036e711e793c2ca6620f53
2022-01-24Revert^2: "Setting Java 11 as the default version" Sorin Basca
Reverted Change: I2f9866deff41406aede24758f6eda5e5808c7f29 Reason for revert: Post-submission failure have been fixed. Test: presubmit Bug: 195387473 Change-Id: If5db1614ef455e2f1eae1d36cf514e13e7aab993
2022-01-20Revert "Setting Java 11 as the default version" Sorin Basca
Revert submission 1944928-default-java11 Reason for revert: Post-submit failures Reverted Changes: Ia9a0aa2a4:Setting Java 11 as the default version Ibf5d10521:Setting Java 11 as the default version Fixes: 215504708 Fixes: 215502091 Fixes: 215502091 Change-Id: I2f9866deff41406aede24758f6eda5e5808c7f29
2022-01-18Setting Java 11 as the default version Sorin Basca
Test: m Change-Id: Ia9a0aa2a4aa02d7b67ad8e1cb6083d33c3d75e70
2021-12-20Adding option to include sources only for Java 11 builds Sorin Basca
Bug: 207852002 Test: m Test: EXPERIMENTAL_TARGET_JAVA_VERSION_11=true m Change-Id: I554a79798ea7f1dd4a96b09f761090f83a009cb4
2021-12-07Adding experimental option to target Java 11 Sorin Basca
Bug: 195387073 Test: m Test: EXPERIMENTAL_TARGET_JAVA_VERSION_11=true m Change-Id: Ifd7ce6218a2761a8eaf79af7d91210da2fa581aa
2021-11-03Dedup logic for selecting system modules Paul Duffin
Previously, the selection of system modules was duplicated, once for source and once for prebuilts. This change dedups that by switching the source code to use the same mechanism as the prebuilts which will ensure consistent behavior in future. Bug: 204189791 Test: m nothing Change-Id: Ia1729017ae332181c95f7b205dab87fb47d43fb8
2021-11-03Rename core-current-stubs-system-modules to be more consistent Paul Duffin
Renames to core-public-stubs-system-modules so that it is of the format core-<sdk-kind>-stubs-system-modules. Bug: 204189791 Test: m nothing Change-Id: Iac565c940c2ef92be9cc64c0c6b8102a26afe0dd
2021-11-01Use module-lib system modules when building from prebuilts Paul Duffin
When building from source the build uses the java system modules for the public or module APIs as needed. However, previously when building from prebuilts it would always use the public API. That difference lead to build failures when building from prebuilts. This change makes the selection of java system modules when building from prebuilts consistent with the selection when building from sources. As API levels 30 and 31 (which are the only previous releases to provide system modules) did not provide separate java system modules for the module-lib API those levels always use the public APIs. Bug: 204189791 Test: - before applying these change m TARGET_BUILD_APPS=framework-connectivity - build fails with compilation error due to missing module APIs m sdk dist cp out/dist/system-modules/module-lib/core-for-system-modules.jar prebuilts/sdk/current/module-lib/core-for-system-modules.jar - apply these changes m TARGET_BUILD_APPS=framework-connectivity - build passes as expected Change-Id: Id113ff014e7892b1009fbcaad89b1ae23a7c3b79
2021-11-01Make prebuilt_api test environment realistic Paul Duffin
Previously, the fixture preparer for prebuilt_apis would add a core-for-system-modules.jar file in every API directory even though currently they only exist in the public API directories. This change makes the test environment more realistic by only creating them for the public API. Rather than hard code that into the test code (which would duplicate the hard coding in the decodeSdkDep func) this extracts a function that is used by both. That ensures that any changes to that func will be reflected in both the test and runtime behavior. Bug: 204189791 Test: m nothing Change-Id: I346ac9c0dcf407c61de16b6027663a05821bcf62
2021-10-29Use toModule for all "standard" API surfaces Paul Duffin
For the purposes of this change a standard API surface is one of the following: * public * system * test * module-lib * system-server Test: m droid Bug: 204189791 Change-Id: I88ee9709430ca455dd6c7d1523ae22f8c22b0b7e
2021-10-08Update reference to merged services txt Anton Hansson
The module is changing name. Update the reference. Bug: 169103987 Test: m Change-Id: I1e3f05b6d9c0262adcde6881ea79df9338bb363a
2021-06-29"module_current" and "system_server_current" should contain ART's ↵ Victor Chang
@SystemApi(MODULE_LIBRARIES) Before this fix, compiling a java_library against sdk_version: "module_current" can't use the @SystemApi(MODULE_LIBRARIES) provided by the ART module because the system module "core-current-stubs-system-modules" contains only the public APIs. Use the new system module with module lib APIs. Bug: 183097033 Test: m droid Change-Id: I274e2710d1ff34e896aa620bfafb4481180c53b5
2021-04-28Merge "Replace source based system server stubs" Andrei-Valentin Onea
2021-04-21Add tempPathForRestat to improve consistency Paul Duffin
Previously, there were two approaches used to construct the temporary path needed by the commitChangeForRestat method and neither was suitable for general use. One was: android.PathForOutput(ctx, outputPath.Rel()+".tmp") The other was: combinedAidl.ReplaceExtension(ctx, "aidl.tmp") The first approach would not work if the supplied path had been created by PathForModuleOut() or similar as it would drop the module directory. That could lead to the same path being used for multiple rules. The second approach would not work for files with a different extension. The tempPathForRestat combines the two approaches so it can be used generally with any WritablePath. Bug: 179354495 Test: verified that the ninja rules that used these files were not changed by these changes. Change-Id: I4439dea0a823512c281eeb1366522fb49dceb4e3
2021-04-08SdkSpec is fully using ApiLevel Jiyong Park
Previously, SdkSpec was constructed only from the user string. It didn't make use of the Config struct where information about the latest stable SDK version, etc. is recorded. As a result, the build system couldn't check if the sdk version "current" is referring to the in-development (i.e. not-yet-frozen) SDK version or the latest stable version. "current" was always assumed to be in-development (IsPreview() returns true) even when Platform_sdk_final == true. As the first step for fixing that, this change requires android.EarlyModuleContext to be passed when constructing SdkSpec from the user string. In the following changes, "current" will be mapped to either FutureApiLevel (10000) or one of the FinalApiLevels() depending on whether the platform SDK was finalized or not. Bug: 175678607 Test: m Change-Id: Ifea12ebf147ecccf12e7266dd382819806571543
2021-04-05SdkSpec = Scope + ApiLevel Jiyong Park
SdkSpec.Version was an int type. Now it becomes ApiLevel type which is a better abstraction of the version (or api level). Bug: 1655587 Test: m Change-Id: I4d67b9b9eae45f653b6af4f5b73da9e091b3dfab