summaryrefslogtreecommitdiff
path: root/android/module.go
AgeCommit message (Collapse)Author
2024-08-27Remove packagingSpecsDepSet from ModuleBase. Yu Liu
The external code that depends on this field has been changed to use the new interface, this field can be removed now. Bug: 358425833 Test: Manually verified all the generated ninja and mk files and CI. Change-Id: I12cb6e22c091bc90d3a3cbbf554e81b8dc27e264
2024-08-27Remove moduleInfoJSON from ModuleBase. Yu Liu
Bug: 358425833 Test: Manually verified all the generated ninja and mk files and CI. Change-Id: I145272636b87b20e49c05e847336737cccc20f79
2024-08-27Add ctx argument to IDEInfo() Cole Faust
The IDEInfo() methods read properties. To make those properties configurable, we need a context to evaluate them with. Bug: 362579941 Test: m nothing --no-skip-soong-tests Change-Id: I26d4b7084439b3006e50b02277298f74a929e1aa
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-27Remove 6 install related fields from ModuleBase. Yu Liu
Bug: 358425833 Test: Manually verified all the generated ninja and mk files and CI. Change-Id: If2c3417781953a1eef2b07a241424157fd73abff
2024-08-27Implement detecting container violations. Jihoon Kang
This change introduces a method to detect violating inter-container dependencies between modules. The method is run in `ModuleBase.GenerateBuildActions`, after the container info provider is set. Given that the provider of the direct dependencies would have been set at this time, the method utilizes this information to determine the violations, which are introduced in https://r.android.com/3141104. Note that this enforcement does not turn all inter-container dependencies as errors. Instead, it will only turn dependencies that matches the pre-defined violations into errors. Even if the dependency matches the violation, an error will not be thrown if the dependency satisfies any of the exception functions (e.g. the dependent module is stubs, or the two modules belong to the same apexes). Test: m nothing --no-skip-soong-tests Bug: 338660802 Change-Id: I36e9cd956c5a076a53635be0c6ff27f77725516e
2024-08-27Remove licenseMetadataFile and installFiles from ModuleBase. Yu Liu
Bug: 358425833 Test: Manually verified all the generated ninja and mk files and CI. Change-Id: I447ec74b7f9c3b8c686ed41511e2051f40ac88f8
2024-08-26Remove installFilesDepSet, packagingSpecsDepSet and licenseInstallMap Yu Liu
from ModuleBase. The old packagingSpecsDepSet field is kept temporarily to bypass an auto-merge issue, and will be removed in next change. Bug: 358425833 Test: CI Change-Id: I28b4933459c33224f756cc306cabc8088f9be862
2024-08-21Remove outputFiles from ModuleBase. Yu Liu
Bug: 358425833 Test: CI Change-Id: I6c398fbdbc38b99fa62f8670baa44ffd51b5e6d3
2024-08-20Remove build target related fields from ModuleBase. Yu Liu
Bug: 358425833 Test: CI Change-Id: I2af6d0d2fd3be70594860a0e6d86179d5850eb07
2024-08-20Use namespace path instead of id in phonies. Yu Liu
Otherwise the phones' names depend on the sorting order of all the namespaces, which add unnecessary dependencies. Bug: 358425833 Test: CI Change-Id: Ic88a329ff320e508ece8e3b20c7497a28a619276
2024-08-19Add phonies as provider instead of updaing a global map. Yu Liu
Bug: 358425833 Test: Manually compare the generated mk and ninja files. Change-Id: Ie74b620fc680ca2fc0d7836e88361ab3bdb87c49
2024-08-17Merge changes Ia0e1b307,I63c7c33e into main Treehugger Robot
* changes: Define unstable container Define additional exception functions for container enforcement
2024-08-16Define additional exception functions for container enforcement Jihoon Kang
These exception functions allow restriction to be loosened for some inter-container dependencies. Note that these functions are still no-op. Restriction enforcement will be done in the child change. Test: m nothing Bug: 338660802 Change-Id: I63c7c33e33f271d4c2a84cc6070eb4896e030ab4
2024-08-16Merge "Remove more internal fields from ModuleBase." into main Yu Liu
2024-08-16Merge "Introduce vintf_fragment module type" into main Kiyoung Kim
2024-08-16Remove more internal fields from ModuleBase. Yu Liu
Bug: 358425833 Test: Manual compare the generated ninja and mk files and CI. Change-Id: I4edd0dc646ac035594f47cd9044cc4eb5f710e64
2024-08-14Remove installFiles from ModuleBase. Yu Liu
This is to limit the direct accesses to the internal fields of a module in order to better support incremental caching. To access the install files data from singleton context or other modules' context use providers thru the provided wrapper; to access it from the same module inside GenerateBuildActions use ctx which is short-lived only inside this method. Bug: 358425833 Test: CI Change-Id: I337b07a2ef95fb2a898ac2f9277160a3f76a603c
2024-08-14Introduce vintf_fragment module type Kiyoung Kim
Introduce a new vintf_fragment module type which handles vintf_fragment files within Soong. This will help process to move vintf_fragment handling logic from KATI to Soong. This change also introduces vintf_fragment_modules property to mark dependency with vintf_fragment modules. Bug: 322089980 Test: m nothing --no-skip-soong-tests passed Change-Id: I49607f42aeee3ded0ba7b078b903dc35f5d61637
2024-08-13Merge "Skip writing ninja file for module with a cache hit during ↵ Yu Liu
incremental build." into main
2024-08-12Merge SingletonProviderContext with OtherModuleProviderContext Yu Liu
Bug: 358425833 Test: CI Change-Id: I8e3f40dc3cfc5337008b419801f8e6bf2d48e8b2
2024-08-02Skip writing ninja file for module with a cache hit during incremental build. Yu Liu
This is just the first change, many more will come to make this feature really work. The main changes included here are: 1. Skip the writing of ninja file if a module has a cache hit. 2. Handle the case where a skipped module doesn't have the build defs info for the OrderOnlyStrings dedup logic to work by caching the missing info. Bug: 335718784 Test: local manual tests Change-Id: I32542bd1e7fd268113e072e7f68b51b293d83d03
2024-07-31Rename ModuleId to ModuleCacheKey and call the same named method on moduleInfo Yu Liu
Bug: 335718784 Test: local manual tests Change-Id: I364cd20281e52a1682f14a43c41bfe9993f04477
2024-07-29Cleanup configurable getter usages Cole Faust
You don't have to call module.ConfigurableEvaluator(ctx) if ctx is already a ModuleContext, you only need to do that for more restricted contexts like SingletonContext. Bug: 323382414 Test: m nothing --no-skip-soong-tests Change-Id: I7612290d43dae7decfae283a341882d9016c98a3
2024-07-23Make the vintf_fragments property configurable Inseob Kim
This allows using select statements with it. Bug: 354824866 Test: m Change-Id: I9080c14b8342868d842670c65386582552b32d46
2024-07-19Merge "Add 'use_debug_art' to product_variable" into main Treehugger Robot
2024-07-18Merge "android: Add host_cross_supported prop" into main Ivan Lozano
2024-07-18android: Add host_cross_supported prop Ivan Lozano
Some modules are only intended to be build for the build host, e.g. rust_library modules only used in rust_proc_macro or code generators. These should not be expected to be built for or supported on non-build host platforms. Thus, add a host_cross_supported property to disable the HostCross target. Test: m blueprint_tests Test: Modules with host_cross_supported: false don't build for HostCross Change-Id: Ia15f55776e04d86aee19bb0dd0d27e1b985b2b75
2024-07-18Add 'use_debug_art' to product_variable Kiyoung Kim
Add 'use_debug_art' property to product_variable so it can be checked from Android.bp whether ART debug APEX or ART APEX should be used. Bug: 351698657 Test: AOSP CF eng build succeeded Test: AOSP CF userdebug build succeeded Change-Id: I01cd80f0d899c55828ecb05fdafdc9bb05fd8200
2024-07-17Return error for unsupported context in outputFilesForModuleFromProvider mrziwang
Test: CI Change-Id: I42d2341ea2613a28d403615f3ebccd0067d5501f
2024-07-16Merge "Remove OutputFileProducer" into main Zi Wang
2024-07-16Merge changes I861a60e1,I01bf99fa,I9d16dfec into main Treehugger Robot
* changes: Add util method HasIntersection(...) Implement InstallableModule for Java modules Collect container informations
2024-07-15Collect container informations Jihoon Kang
This change introduces a method to collect the information of what containers (i.e. api domain, partition, or any custom defined boundaries of interest) the module belongs to. The method is called in `ModuleBase.GenerateBuildActions`. Each container objects defines the following: - name of the container - list of "restrictions", which are the containers that a module that belongs to this container is not allowed to depend on. Each "restrictions" also defines custom rules which allow bypassing the restricted dependency. Each rules are an enum that are mapped to a function, given that functions are not hashable and thus cannot be set as a value in a provider. Note that this change is a no-op, as the container information is only collected for modules that implement the "InstallableModule" interface, which is not implemented by any other module types in this change. This will be utilized in the follow-up changes. Test: m nothing --no-skip-soong-tests Bug: 338660802 Change-Id: I9d16dfec0dcf06da464aa49ee7b23f46f1da236a
2024-07-15Remove OutputFileProducer mrziwang
All the module types that were using OutputFileProducer are using OutputFilesProvider now. This CL removes the remaining OutputFileProducer code. Test: CI Bug: 339477385 Change-Id: I3c29785a59b907117b16ca2d0e56ef846adfb228
2024-07-12Merge "Use OutputFilesProvider in module_test" into main Zi Wang
2024-07-12Use OutputFilesProvider in module_test mrziwang
In the context of incremental soong, the output files inter-module-communication will be through OutputFilesProvider. The OutputFileProducer interface will be deprecated. Test: CI Bug: 339477385 Change-Id: Iaf0b039b17d34e1a696f2c87df2f0db39307fc6d
2024-07-11Add IsAddingDependency to IncomingTransitionContext Colin Cross
Add an IsAddingDependency method to IncomingTransitionContext that returns true if IncomingTransition is called after the transition has already won while adding a new dependency. This will be used as part of the transition mutators to support an apex use case where incoming dependencies during the initial apex mutator need to be rewritten onto the platform variant for modules that don't support the apex, but a later call to OtherModuleDependencyVariantExists must not rewrite the requested apex variation onto the platform variant. This should be used sparingly, all uses will have to be removed in order to support creating variants on demand. Bug: 319288033 Test: TestIsAddingDependency Flag: EXEMPT refactor Change-Id: Ib8e419d35ff8f7cbff9667c1cd40d05ccfacab8b
2024-07-11Fix typo in outputFilesForModule error message mrziwang
Test: CI Change-Id: I41f28a0412613458a0dad132006adfbc9fbbce2c
2024-07-10Use OutputFilesProvider on java modules mrziwang
In the context of incremental soong, the output files inter-module-communication will be through OutputFilesProvider. The OutputFileProducer interface will be deprecated. Test: CI Bug: 339477385 Change-Id: I3c9f0b766325dd490bc903dc65259c3953d34606
2024-06-27Merge "Revert "Use hashed subdir for soong_config modules"" into main Inseob Kim
2024-06-25Update outputFilesForModuleFromProvider mrziwang
This CL includes following changes: 1. Added the ability to differentiate the cases that module never sets OutputFilesProvider and that module sets the provider with a nil value. 2. Updated GenerateTaggedDistFiles to use outputFilesForModuleFromProvider. 3. Updated on cc module to use OutputFilesProvider. Test: CI Bug: 339477385 Change-Id: Ib5663a947315f6a90a81b7f073cf8dd22fbb1e05
2024-06-25Merge "Cleanup more bazel code" into main Treehugger Robot
2024-06-25Cleanup more bazel code Cole Faust
Bug: 315353489 Test: m nothing --no-skip-soong-tests Change-Id: I6c6b4fcd559f4a45b1a96c70cbb5d6d1a615ccff
2024-06-25Revert "Use hashed subdir for soong_config modules" Inseob Kim
This reverts commit 81b00a8db73491a4cac326853853be743000a2ac. Reason for revert: * select() will supersede Soong config modules. * A tiny change can make hundreds of gigabytes rebuilt. * Hashed out/ directories are not cleaned. * Even without this trace, AB build time is fast enough, thanks to product-specific ninja files and so on. Bug: 348548855 Test: m --no-skip-soong-tests Change-Id: If9a97df1e161a9ef0fb1b801f9e129b71b11d1ac
2024-06-24Export Soong modules and build a database from metadata from Make and Soong. Wei Li
Bug: 324465531 Test: CIs Test: m compliance-metadata.db Change-Id: Ia1c9ab0ae874dd47969555ddbfb93405b57a651f
2024-06-24Merge "Add OutputFilesProvider support for singleton" into main Zi Wang
2024-06-24Add OutputFilesProvider support for singleton mrziwang
This CL also changes to use OutputFilesProvider on rust module, which has singleton involved. Test: CI Bug: 339477385 Bug: 348494466 Change-Id: Idc5c0fb9f8425f09184d5b73531ee3052e5a076c
2024-06-21Merge "Allow soong config variables to be boolean-typed" into main Cole Faust
2024-06-20Allow soong config variables to be boolean-typed Cole Faust
So that you can use `true` instead of `"true"` in select expressions. Bug: 323382414 Test: m nothing --no-skip-soong-tests Change-Id: I950bd8e04f8fab5187ea5075514d476227943f33
2024-06-20Allow module gets its own output files using non-empty-string tag mrziwang
Test: CI Bug: 339477385 Change-Id: I332c377ad59d9355cb44ee18b85a56e37580e7b6