Prohibit dependencies outside of uses_sdks
When an APEX is built with uses_sdks, any depedndency from the APEX to the outside of the APEX should be from the SDKs that the APEX is built against. Bug: 138182343 Test: m Change-Id: I1c2ffe8d28ccf648d928ea59652c2d0070bf10eb
This commit is contained in:
@@ -44,6 +44,17 @@ func (s SdkRef) Unversioned() bool {
|
||||
return s.Version == ""
|
||||
}
|
||||
|
||||
// String returns string representation of this SdkRef for debugging purpose
|
||||
func (s SdkRef) String() string {
|
||||
if s.Name == "" {
|
||||
return "(No Sdk)"
|
||||
}
|
||||
if s.Unversioned() {
|
||||
return s.Name
|
||||
}
|
||||
return s.Name + string(SdkVersionSeparator) + s.Version
|
||||
}
|
||||
|
||||
// SdkVersionSeparator is a character used to separate an sdk name and its version
|
||||
const SdkVersionSeparator = '@'
|
||||
|
||||
|
Reference in New Issue
Block a user