summaryrefslogtreecommitdiff
path: root/apex/apex_singleton.go
AgeCommit message (Collapse)Author
2025-03-13Change CommonModuleInfoProvider to a pointer. Yu Liu
Bug: 358427516 Test: Manually verified genereated ninja and mk files, unit tests. Change-Id: I53a6dd718232735decbeb93febfd269dd9449e86
2025-03-07Rename CommonModuleInfoKey to be consistent with others. Yu Liu
Bug: 377723687 Test: Unit tests and compare the ninja and mk files generated. Change-Id: I1ce8bc782666586633ded9cfaf1b9590e3c0efde
2025-02-25Convert ndkSingleton, apexDepsInfoSingleton, allTeamsSingleton, Yu Liu
apexPrebuiltInfo to use ModuleProxy. Bug: 377723687 Test: Unit tests and compare the ninja and mk files generated. Change-Id: I77b05e8b54843bfa8b91376a6796c2b5c69be3c1
2025-02-12Move dists to GenerateAndroidBuildActions Cole Faust
So that we're not as make-focused by disting in MakeVarsProviders. Bug: 395184523 Test: Verified ninja files were unchanged (on both m nothing and m nothing dist) Change-Id: I5fd94754d644162b355722fbb1e1fd6f085345b9
2025-01-14Resend aosp/3445142 Chan Wang
Not revert^2 to avoid potential automerge issue, because the previous change failed to auto-merge into internal branch (b/389693264 logged for it) Bug: 380222284 Test: m nothing --no-skip-soong-tests Change-Id: Ie55e98597cb931a4e3e84ae595317f3cc21192c9
2025-01-14Resend aosp/3446212 Chan Wang
Not revert^2 to bypass potential auto-merge issue, because the previous change failed to auto-merge into internal branch (b/389693264 logged for it) Bug: 380222284 Bug: 383062486 Test: m nothing --no-skip-soong-tests Change-Id: I0a002cfc83163efaf6f282586f80f15a9e7fdac2
2025-01-13Revert "Revert "Added EXTRA_ALLOWED_DEPS_TXT to allow arbitrary ..." Pechetty Sravani (xWF)
Revert submission 3444766-non-aosp-allowed-deps Reason for revert: <Droidmonitor created revert due to b/389580262.Will be verified through ABTD for standard investigation.> Reverted changes: /q/submissionid:3444766-non-aosp-allowed-deps Change-Id: I0f62307e4b3ca8fbc53303576f42929b5eebeadf
2025-01-13Revert "Collect dependencies of updatable apexes only for AOSP APEX" Pechetty Sravani (xWF)
Revert submission 3444766-non-aosp-allowed-deps Reason for revert: <Droidmonitor created revert due to b/389580262.Will be verified through ABTD for standard investigation.> Reverted changes: /q/submissionid:3444766-non-aosp-allowed-deps Change-Id: I13e0e5cc12c63601995b010db34ebc71efab27f0
2025-01-10Collect dependencies of updatable apexes only for AOSP APEX Chan Wang
Bug: 380222284 Test: m nothing --no-skip-soong-tests Change-Id: Ic629fce1d3cde728e6bd4b67f76ae72244669f54
2025-01-10Revert "Added EXTRA_ALLOWED_DEPS_TXT to allow arbitrary allowedlist text ↵ Chan Wang
files that enforces min_sdk_version for apex dependencies to avoid regression" This reverts commit 8609a5569c7d93efc983e7c5f091fbdd4f955567. Reason for revert: Design change - not collecting dependencies of non-AOSP updatable APEX Bug: 380222284 Bug: 383062486 Test: m nothing --no-skip-soong-tests Change-Id: I4150848502fc1f172f88dc4f0d1e663ac5a8cfea
2024-11-13Don't use echo -e Colin Cross
A rule that uses echo -e may execute in a dash shell instead of bash when running on the build servers. The dash echo builtin is posix compliant, and does not treat -e as an option[1]. Replace all uses of echo -e with echo if it does not need escape sequences, or printf if it does. [1] https://wiki.ubuntu.com/DashAsBinSh#echo Bug: 378931009 Test: manual Change-Id: I2974f59ea10a613bc3bd36e3591fd81f38a1769a
2024-10-07Added EXTRA_ALLOWED_DEPS_TXT to allow arbitrary allowedlist text files that ↵ Nouby Mohamed
enforces min_sdk_version for apex dependencies to avoid regression Test: Ran APEX soong tests and manual test Bug: 333868045 Merged-In: I7b0c7f32687d922dde41150f947c1b993998338f Change-Id: I7b0c7f32687d922dde41150f947c1b993998338f
2024-08-12Merge SingletonProviderContext with OtherModuleProviderContext Yu Liu
Bug: 358425833 Test: CI Change-Id: I8e3f40dc3cfc5337008b419801f8e6bf2d48e8b2
2024-07-08Don't write allowlisted androidx.* libraries to allowed_deps.txt Alan Viverette
Bug: 333398044 Flag: EXEMPT refactor Test: croot && packages/modules/common/build/update-apex-allowed-deps.sh Merged-In: I350ee64bafcd51f69110d880e0de12ae22558fc9 Change-Id: I350ee64bafcd51f69110d880e0de12ae22558fc9
2024-03-14Generate info about the selected app variant in platform builds Spandan Das
This is a followup to aosp/2999198 and adds information about apps. Each app will have an entry in this file with the following properties - Name, mandatory - Is_prebuilt, mandatory - Prebuilt_info_file_path, optional Implementation details - Move prebuiltInfoProvider out of build/soong/apex to build/soong/android. This allows build/soong/java to use it. - Introduce a new `prebuilt_info` prop to `android_app_set` and `android_app_import` - All app module types will set a prebuiltInfoProvider in GenerateAndroidBuildActions, including the source app module types Test: m nothing --no-skip-soong-tests Test: m out/soong/prebuilt_info.json Test: ls -l out/soong/prebuilt_info.json --human-readable -rw------- 1 spandandas primarygroup 317K Mar 11 23:46 out/soong/prebuilt_info.json Test: #modified trunk_staging.locally to select prebuilts of some mainline apps. Spot-checked that `is_prebuilt` and `prebuilt_info_file_path` get populated appropriately Bug: 327480225 Change-Id: I5078e0ec26c9568194550909962b90111a5223f7
2024-03-12Generate info about the selected apex variant in platform builds Spandan Das
out/soong/prebuilt_info.json will contain information about whether source or prebuilt of an apex was used. If prebuilt is used, it will print the path to its prebuilt_info file. This file will be used to pick a matching set of MTS test prebuilts. Each apex will have an entry in this file with the following properties - Name, mandatory - Is_prebuilt, mandatory - Prebuilt_info_file_path, optional Implementation details - Introduce a new `prebuilt_info` prop to `apex_set` and `prebuilt_apex` - All apex module types will set a prebuiltInfoProvider in GenerateAndroidBuildActions, including the source apex module types - Create a `apex_prebuiltinfo_singleton` that visits all apex modules. It uses `IsHideFromMake` to filter out the unselected variants of a specific apex. This new singleton will create prebuilt_info.json - Dist prebuilt_info.json for droidcore Test: m nothing --no-skip-soong-tests Test: m out/soong/prebuilt_info.json Test: ls -l out/soong/prebuilt_info.json --human-readable -rw------- 1 spandandas primarygroup 25K Mar 11 23:46 out/soong/prebuilt_info.json Test: #modified trunk_staging.locally to select prebuilts of some mainline modules. Spot-checked that `is_prebuilt` and `prebuilt_info_file_path` get populated appropriately Bug: 327480225 Change-Id: I65c73010142b034ad1d2b3d05ef493be034e8d74
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-05-19Parallelize singleton execution LaMont Jones
Bug: 281536768 Test: manual, presubmits Change-Id: I57fdc76ba6b277e88e196b506af87127a530fd37
2023-04-27Add allowed-deps tests Jooyung Han
These tests capture - track updatable apexes - do not track apex-only modules - track transitive deps - track external deps (with mark) Bug: 274041915 Test: m nothing Change-Id: I629015f5aa4a1a7627d0ba6d92fd42bb99c96287
2023-02-07Improve documentation around go/allowed-deps-error Pedro Loureiro
Bug: 264349293 Change-Id: I64e95938e53fb26c104e0daece4939f97744a344
2021-08-04Merge "Update error message for new policy." am: bf49705608 am: 775f9e37c7 Mathew Inwood
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1784430 Change-Id: Ib4c443c1eae2dc7f840566455b573f255575f875
2021-08-03Update error message for new policy. Mathew Inwood
A new presubmit hook enforces that required information is present in any CL that adds new dependencies to allowed_deps.txt. Test: m Bug: 195303213 Change-Id: I1fb932a52f64f9cbf0d12ead75ffd3d9c2a5e942
2021-03-22Merge changes from topic "move_allowed_deps_txt" am: 2b077baa5e am: ↵ satayev
0ee372ad6f am: 3c5d96925f Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1645088 Change-Id: I568df8371fb3eab090d417469c9d78a27be9d527
2021-03-18Treat allowed_deps.txt source file as optional. Artur Satayev
Not all branches have packages/common/module, which breaks the build for them. Bug: 179234385 Test: removed allowed_deps.txt && m apex-allowed-deps-check Change-Id: I38f47c7200e1afbd899e29843d0214bef826fcf9
2021-03-17Move allowed_deps.txt to packages/modules/common. Artur Satayev
Bug: 179234385 Test: run update-apex-allowed-deps.sh locally Change-Id: I8e8864468b87342c688d001bc5f6e6f8416863ed Merged-In: I8e8864468b87342c688d001bc5f6e6f8416863ed
2021-03-16Move allowed_deps.txt to packages/modules/common. Artur Satayev
Bug: 179234385 Test: run update-apex-allowed-deps.sh locally Change-Id: I8e8864468b87342c688d001bc5f6e6f8416863ed Merged-In: I8e8864468b87342c688d001bc5f6e6f8416863ed (cherry picked from commit 732d6264210513b971205b5c9f1b2f49b9cafdf3)
2020-11-04Add PHONY for apex-allowed-deps check. Artur Satayev
Bug: 149622332 Test: m apex-allowed-deps-check Change-Id: I5848779b4ad04dd4c95e2667f7f62dd2949ac95e Merged-In: I5848779b4ad04dd4c95e2667f7f62dd2949ac95e (cherry picked from commit 01aa11e833807ef55ab5b2322b6538cb3da2e0a4)
2020-10-07Merge "Remove global state from apex modules" am: 43159bd1b7 am: 21bb1d491c ↵ Colin Cross
am: 2c76247f51 am: 393b394b85 Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1428815 Change-Id: I264afeceec4bdbc344ba812b1c5fd88fed043214
2020-10-06Remove global state from apex modules Colin Cross
A global variant was used to store the global mapping between modules and APEXes. Replace it with storing pointers to APEX contents inside each module so that they can query the contents of any APEXes they belong to. Bug: 146393795 Test: all Soong tests Test: single line change to build.ninja host install dependency ordering Test: no Android-${TARGET_PRODUCT}.mk, make_vars-${TARGET_PRODUCT}.mk or late-${TARGET_PRODUCT}.mk Change-Id: Id2d7b73ea27f8c3b41d30820bdd86b65c539bfa4
2020-09-30Track allowed transitive deps in any updatable module. Artur Satayev
Instead of tracking per module and per module variant, track allowed list of dependecies for all modules combined. This avoids issues with different products and different downstream branches having different build graphs. To compare allowed_deps.txt vs head, run: :; m -j out/soong/apex/depsinfo/new-allowed-deps.txt.check To update source allowed_deps.txt, run: :; build/soong/scripts/update-apex-allowed-deps.sh Bug: 149622332 Test: m Change-Id: Ic518fbd9ebfe1b46aaf9a58df731780a7e5a676b Merged-In: Ic518fbd9ebfe1b46aaf9a58df731780a7e5a676b (cherry picked from commit 453555083b86ff35d874df08f68bf6252fc12fd1) (cherry picked from commit e5207cd9a62f0cf521e95257720529392134a603)
2020-08-03Add PHONY for apex-allowed-deps check. Artur Satayev
Bug: 149622332 Test: m apex-allowed-deps-check Change-Id: I5848779b4ad04dd4c95e2667f7f62dd2949ac95e
2020-07-23Revert "Track allowed transitive deps in any updatable module." satayev
Revert submission 1312796-apex-allowed-deps Reason for revert: b/161974327 Reverted Changes: I52a4be72e:Add a check for apex/allowed_deps.txt to droidcore... I56771ba3f:Track allowed transitive deps in any updatable mod... Change-Id: I3be0a1b0dd824dafeadb485daca8e58b81a3ec5c
2020-07-20Track allowed transitive deps in any updatable module. Artur Satayev
Instead of tracking per module and per module variant, track allowed list of dependecies for all modules combined. This avoids issues with different products and different downstream branches having different build graphs. To compare allowed_deps.txt vs head, run: :; m -j out/soong/apex/depsinfo/new-allowed-deps.txt.check To update source allowed_deps.txt, run: :; build/soong/scripts/update-apex-allowed-deps.sh Bug: 149622332 Test: m Change-Id: I56771ba3fea748de8e9c58c80758670572f7af53 Merged-In: Ic518fbd9ebfe1b46aaf9a58df731780a7e5a676b
2020-07-03Revert^2 Track allowed transitive deps in any updatable modules. Artur Satayev
Instead of tracking per module and per module variant, track allowed list of dependecies for all modules combined. This avoids issues with different products and different downstream branches having different build graphs. Revert submission 11972727-revert-11883270-apex-allowed-deps-FUBLDERIYT Reason for revert: revert^2 with a fix. Reverted Changes: Iefd8a8b21:Revert "Track allowed transitive deps in any updat... If416513fb:Revert "Add a check for apex/allowed_deps.txt to d... Bug: 149622332 Test: m (with different products) Change-Id: Ic518fbd9ebfe1b46aaf9a58df731780a7e5a676b
2020-06-24Revert "Track allowed transitive deps in any updatable module." Artur Satayev
Revert submission 11883270-apex-allowed-deps Reason for revert: b/159762187 broken build Reverted Changes: I56771ba3f:Track allowed transitive deps in any updatable mod... I52a4be72e:Add a check for apex/allowed_deps.txt to droidcore... Change-Id: Iefd8a8b21c4eba6ef8dfcb3aeb5a86b9d8357255
2020-06-23Track allowed transitive deps in any updatable module. Artur Satayev
To compare allowed_deps.txt vs head, run: :; m -j out/soong/apex/depsinfo/filtered-updatable-flatlists.txt.check To update source allowed_deps.txt, run: :; build/soong/scripts/update-apex-allowed-deps.sh Bug: 149622332 Test: m Change-Id: I56771ba3fea748de8e9c58c80758670572f7af53 (cherry picked from commit 8d6085d38934dc43f17b47c2961727766e87bfa2)
2020-05-15Generate combined deps-info for all updatable modules. Artur Satayev
Introduce a singleton apex rule to merge contents of individual deps-info results into a single output file. Bug: 149622332 Test: m Change-Id: I4ab7e1a3527fead97a81a5a2cb0e1e93a429117c