Ignore test apexes from bp2build generated tags
The core problem I am trying to solve is making sure that stub libraries in Bazel have a single apex available. In Soong, this will be enforced using some graph walk which is not easy to port to Bazel. However, we might need to revisit this when we build the enforcement mechanism in Bazel. We likely need a `test_for` on the top level apex_test Bazel rule so that the test apex is _allowed_ to link against impl of the library it is trying to test. (This CL retricts this to cc_library, I can expand this to other modules if this is the right approach.) Bug: 277651159 Change-Id: Iaeec22c5626df79a33785c766ed29102b1da403e
This commit is contained in:
@@ -462,6 +462,14 @@ const (
|
||||
AvailableToGkiApex = "com.android.gki.*"
|
||||
)
|
||||
|
||||
var (
|
||||
AvailableToRecognziedWildcards = []string{
|
||||
AvailableToPlatform,
|
||||
AvailableToAnyApex,
|
||||
AvailableToGkiApex,
|
||||
}
|
||||
)
|
||||
|
||||
// CheckAvailableForApex provides the default algorithm for checking the apex availability. When the
|
||||
// availability is empty, it defaults to ["//apex_available:platform"] which means "available to the
|
||||
// platform but not available to any APEX". When the list is not empty, `what` is matched against
|
||||
@@ -926,3 +934,9 @@ func CheckMinSdkVersion(ctx ModuleContext, minSdkVersion ApiLevel, walk WalkPayl
|
||||
return true
|
||||
})
|
||||
}
|
||||
|
||||
// Implemented by apexBundle.
|
||||
type ApexTestInterface interface {
|
||||
// Return true if the apex bundle is an apex_test
|
||||
IsTestApex() bool
|
||||
}
|
||||
|
Reference in New Issue
Block a user