This CL is the java_system_modules_import equivalent of aosp/2928483.
With trunk stable, we will have multiple versions of art prebuilt apex
in the tree. Each art apex will contribute its own module sdk, i.e. its
own prebuilt system_modules to the build. This CL introduces a mechanism
to selelect a specific version of prebuilt system modules using
apex_contributions.
Implementation details: Create a new source_module_name property to
identify the root module. rdeps referring to the root module will get
redirected if necessary.
Bug: 322175508
Test: Added a unit test
Change-Id: I9f885ffa5afea96d2e6ce077264d3b207ed7e80d
Convert all of the callers of ModuleProvider/ModuleHasProvider to use the
type-safe android.SingletonModuleProvider API.
Bug: 316410648
Test: builds
Change-Id: I6f11638546b64749e451cebbf33140248dc1d193
Replaces uses of javaFixtureFactory with prepareForJavaTest and removes
the unused javaFixtureFactory.
Bug: 182885307
Test: m nothing
Change-Id: I809772d14af2af211b9e15ad676fbdc06b07cd46
Make sure that java_system_modules_import always depends on the
prebuilt by adding dependencies in the ComponentDepsMutator() method
which is called before prebuilts without a corresponding source are
renamed from prebuilt_<x> to <x>. That requires the prebuilt_ prefix
to be provided but it ensures that the dependencies are safe.
Similar logic also makes sure java_system_modules always depends on
the source module and not on a renamed prebuilt module.
Bug: 182402568
Test: m nothing
Change-Id: I30db95978f5d9b205951011edf40585ee36c0c4c
The previous approach of looking for substrings in the command that
matched the base name of the jar could not differentiate between
whether the jar was a prebuilt or a source as they both have the same
base name.
The tests also did not cover the case when there was both prebuilts
and source modules.
This change:
1. Checks that the inputs to the command come from the appropriate
module.
2. Adds a mixed test.
3. Deduped the source and prebuilt module definitions.
The new test reveals the buggy behavior which will be fixed in a follow
up change.
Bug: 182402568
Test: m nothing
Change-Id: I384ecca097cbe3560e7589c23fb99c176a42fd9b