summaryrefslogtreecommitdiff
path: root/java/jdeps.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-26Convert tidyPhonySingleton, jdepsGeneratorSingleton and Yu Liu
genNoticeBuildRules to use ModuleProxy. Bug: 377723687 Test: Unit tests and compare the ninja and mk files generated. Change-Id: I7507a580e3533b01f552778a7815bcc43d301e23
2025-02-20Dist module_bp_java_deps.json in soong-only builds Cole Faust
Fixes: 398038416 Test: Presubmits Change-Id: I50b5bc25bbb1a407c28ad3f12993e916b95a7d43
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
2024-08-27Make IdeInfo into a provider Cole Faust
In order to keep the changes minimal, call the old IdeInfo method right after GenerateAndroidBuildActions and then set the result of that into a provider. Test: Diff'd ninja files and saw no difference. Change-Id: Ic706e7dbcb7c6e3d2a381ddae383eb87e105f385
2024-08-12Merge SingletonProviderContext with OtherModuleProviderContext Yu Liu
Bug: 358425833 Test: CI Change-Id: I8e3f40dc3cfc5337008b419801f8e6bf2d48e8b2
2024-05-02Make the enabled property configurable Cole Faust
This allows using select statements with it. Bug: 323382414 Test: m nothing --no-skip-soong-tests Change-Id: I6f3efaaa3d82505e38a91ee4ba0e18e404360191 Merged-In: If355d24506e3f117d27b21442a6c02bca3402dc7
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-15Stop collecting path entry for module_bp_java_deps.json from each module type Colin Cross
The jdepsGeneratorSingleton can get the module path directly, it doesn't need to be collected by each module type that implements IDEInfo. Fixes module types (like android_library) that didn't reach the code that collected the path. Bug: 309835196 Test: out/soong/module_bp_java_deps.json contains path for ExtServices.core Change-Id: If8cb81b4f708e0367f156ade164bee253bf53492
2023-05-19Parallelize singleton execution LaMont Jones
Bug: 281536768 Test: manual, presubmits Change-Id: I57fdc76ba6b277e88e196b506af87127a530fd37
2023-01-11Consider only preferred modules for jdeps Inseob Kim
Bug: 263327259 Test: run atest and see modules to be built Change-Id: I208a07e2453b924f8af25db340d970ec039c5f32
2022-04-18Export Java library dependency information Yike
Write `static_libs` and `libs` of Java library and Android app modules to module_bp_java_deps.json. This enables downstream tools to correctly set up the runtime environment. Note that while static libraries don't need to be on the Java classpath these modules could have non-static library dependencies that do need to be present. Test: m out/soong/module_bp_java_deps.json Bug: 227538646 Change-Id: I7c4aecb2fb03c890f0d2aaae80e619f6176809ef
2021-11-05Dump deps for native and java to json files. Jim Tang
Abandon the use of SOONG_COLLECT_CC_DEPS and SOONG_COLLECT_JAVA_DEPS, soong can generate module_bp_cc_deps.json and module_bp_java_deps.json without passing any variables. BUG: 204397180 Test: rm out/soong/module_bp*json "m nothing" should see both json files were generated. Change-Id: If30ad5dbabb6709f834134cbc9a513a9bdc9d9de
2021-02-09Convert java.Dependency to JavaInfo provider Colin Cross
Export information about java dependencies through a Provider instead of accessing the module directly. Test: java_test.go Test: no changes to build.ninja Change-Id: Ifc5d566bf6f6ebc0ad399e948effaa1ef6a22876
2020-07-06Add soong cc and java deps to general-tests dist Liz Kammer
Test: m SOONG_COLLECT_CC_DEPS=true SOONG_COLLECT_JAVA_DEPS=true dist general-tests and verify module_bp_java_deps.json and module_bp_cc_deps.json is in out/dist Test: m SOONG_COLLECT_CC_DEPS=true SOONG_COLLECT_JAVA_DEPS=true checkbuild dist general-tests Bug: 154845369 Change-Id: I683fe1d7e17f7abaab40206770d09db705493ffb
2020-05-21AIDEGen: Add path attribute to okhttp module. bralee
Bug: 157115477 Test: 1. aidegen Settings -n open merged_module_info.json "okhttp": { ... "path": ["external/okhttp"] }, modules: "mimemap-testing-res.jar", "mimemap-res.jar" "services.core.priorityboosted", "framework-tethering" "bouncycastle_ike_digests", "robolectric-sqlite4java-native" have the 'path' attribute. Change-Id: If3628887866c29dcc948dd427727f175a5199edc
2020-01-11Sandbox soong_build by changing to root directory Colin Cross
This relands I12a0f907753fefd1997ab8b4ea2ac331234093cf along with a fix to blueprint for absolute paths. Store the current working directory and then change to the root directory so that all file accesses must go through helpers in the android package that properly track dependencies. Change-Id: I24ac485677aa102eec1a2521d16820da6ee1ae77 Fixes: 146437378 Test: m checkbuild Test: m OUT_DIR=/tmp/out nothing
2020-01-10Revert "Sandbox soong_build by changing to root directory" Colin Cross
This reverts commit 05c25ccb4adb5329add700b533416c226cdbfa96. Reason for revert: broke absolute OUT_DIR Bug: 146437378 Change-Id: I523ed79d40e1c1ef040212ba794a7a084abea75d
2020-01-09Sandbox soong_build by changing to root directory Colin Cross
Store the current working directory and then change to the root directory so that all file accesses must go through helpers in the android package that properly track dependencies. Fixes: 146437378 Test: m checkbuild Change-Id: I12a0f907753fefd1997ab8b4ea2ac331234093cf
2019-05-27AIDEGen: Collect the srcjar into out/soong/module_bp_java_deps.json patricktu
Build module_bp_java_deps.json without this change: Build time: 3m53.761s File size: 12,955,363 Bytes Build module_bp_java_deps.json with this change: Build time: 3m49.106s File size: 13,361,647 Bytes Bug: 132407603 Test: 1. SOONG_COLLECT_JAVA_DEPS=false make nothing 2. SOONG_COLLECT_JAVA_DEPS=true make nothing 3. Check module_bp_java_deps.json in /out/soong. In SettingsProvider section there should contain "srcjars": [ "out/soong/.intermediates/frameworks/base/packages/SettingsProvider/SettingsProvider/android_common/gen/R.jar" ] Change-Id: I800a4d4f13b280d7ef87005e599cbd0aaf8c93f4
2019-03-23Don't visit disabled modules with SOONG_COLLECT_JAVA_DEPS=true Colin Cross
Calling AndroidMk() on a disabled module may not be safe because the module will not have had GenerateAndroidBuildActions() called on it to initialize the data structures that AndroidMk() expects to exist. Check module.Enabled() before generating IDE info. Fixes: 129089976 Test: SOONG_COLLECT_JAVA_DEPS=true m nothing Change-Id: Icd79088c532c1842801f2bf89d92bc1a67109936
2018-12-21Modify jar dependencies collection from dexpreopt to jar with resource shinwang
Soong build system modify the jar installed path to dexpreopt, however, the jar only contains dex without java information. This patch modify the jar collection from installed path to ImplementationJars. Bug: 121231786 Test: 1. m aidegen 2. $ANDROID_HOST_OUT/bin/aidegen framework 3. check import static android.Manifest.permission.BIND_VOICE_INTERACTION; denpendency should be resolved in frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java Change-Id: I8f24f3a3476e125d3fd808e0047db425e15046ac
2018-09-18Collect modules' info to create IDE project file. Brandon Lee
- Register a singleton and implement GenerateBuildActions func in java/jdeps.go. - Declare a interface and a struct to collect info in android/module.go. - Implement IDEInfo for Library & Import module in java/jdeps.go. - Implement IDEInfo for Genrule module in genrule/genrule.go. - Implement IDEInfo for fileGroup module in android/filegroup.go. - Test codes for jdeps.go in java/jdeps_test.go. Bug: 111044346 Test: export SOONG_COLLECT_JAVA_DEPS=1;mmm packages/apps/Settings out/soong/module_bp_java_deps.json will be generated Change-Id: If61da77b4d7614c2c5da438b6af4c725ceccc5c3