Create prebuilt api modules in load hook not mutator
An attempt to reference one of the prebuilt modules directly from an Android.bp file highlighted a bug. The prebuilt_apis module used a mutator to create filegroup and java_import modules for a set of api versions. That mutator ran after the "prebuilts" mutator which handled the renaming of prebuilt modules when the matching source module was not present. That meant that the only way to reference the module was by explicitly adding the prefix "prebuilt_". This change fixed that bug by creating the modules in a load hook rather that a mutator. This ensures that the prebuilt modules are present well before the "prebuilts" mutator is run. Removing the mutator also removes an unnecessary traversal of the whole dependency tree. It also updated the documentation to explain that it creates java_import modules as well as the filegroup modules. (cherry picked from 47f6315f) Bug: 153649372 Test: m droid Change-Id: Id44dce8ca9968ae903345df6ef1c4f1be9cb76c5 Merged-In: Id44dce8ca9968ae903345df6ef1c4f1be9cb76c5
Loading
Please register or sign in to comment