Sorted iteration ensures that `mergeAconfigFiles` generates the ninja
rules in a deterministic fashion.
Test: mv out/soong/build.ninja; regenerate; compare; bit-identical
after this change
Change-Id: Ic9bee14374fa1eb7adee670eaed42ad6ffdd9010
Only when aconfig_declarations explicitly set this property true,
its flags will be repackaged.
If a java_aconfig_library has mode "exported", its corresponding
aconfig_declarations must have exportable prop set to true.
Test: Added unit tests and CI
Bug: 310504781
Ignore-AOSP-First: this change will be cherry picked to aosp
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:e4527f3010b3fd6f33948a15a9b4fdc944da34f0)
Merged-In: Ie9526e3755a6e7d142b377d5dd85a1bc60ffabc5
Change-Id: Ie9526e3755a6e7d142b377d5dd85a1bc60ffabc5
The aconfig files are collected by visiting the direct deps of the
module. VisitDirectDeps does not guarantee ordered traversal. To prevent
non-determinism in the generated ninja file, sort the inputs.
Test: go build ./android
Change-Id: Ic67fc0859bf18de62b6297ed502d1d495cc3a780
Aconfig file dependencies are module-independent, and properly part of
ModuleBase.
Bug: b/308625757
Test: manual
Change-Id: I38c5907d1671cc69bb198345201316ae781fdc9f
This method allows dependencies on non-Android modules, which it ignores
in strict mode, rather than flagging the dependency as an error.
Bug: none
Test: manual
Change-Id: I9575e46638fa8ffc69c8935b1b65aab37ceab3c3
To prevent errors, when we collect dependencies for a module, walk the
blueprint modules, and ignore blueprint and disabled modules.
This avoids errors in validateAndroidModule when a android.Module (such
as a genrule) depends on a blueprint.Module, and strict checking is
enabled.
Bug: 308625757
Test: manual
Change-Id: I11f0a0b504aa18d6d786cc91319b9d1d9497c04f