bootclasspath_fragment must only depend on source contents
This change ensures that bootclasspath_fragment only depends on source
modules and prebuilt_bootclasspath_fragment only depends on prebuilt
modules.
It does that in two ways:
1. It adds the dependencies in ComponentDepsMutator method which is
called before any renaming of prebuilts is done which makes it very
easy to add a dependency directly onto either the source or prebuilt
as required.
2. It uses a tag which prevents dependencies on a source module from
being replaced with a dependency on a prebuilt module which ensures
that a dependency on the source modules is not replaced with a
dependency on a prebuilt module.
Bug: 177892522
Test: m nothing
Change-Id: Ibcfae39083afbc07fcf729ead3ed5f5d020845bf
diff --git a/apex/apex.go b/apex/apex.go
index 6f02c47..efeb0e2 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -1924,7 +1924,7 @@
// Rlib is statically linked, but it might have shared lib
// dependencies. Track them.
return true
- } else if java.IsbootImageContentDepTag(depTag) {
+ } else if java.IsBootclasspathFragmentContentDepTag(depTag) {
// Add the contents of the bootclasspath fragment to the apex.
switch child.(type) {
case *java.Library, *java.SdkLibrary: