summaryrefslogtreecommitdiff
path: root/android/sdk.go
diff options
context:
space:
mode:
Diffstat (limited to 'android/sdk.go')
-rw-r--r--android/sdk.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/android/sdk.go b/android/sdk.go
index 8992bab35..95924561a 100644
--- a/android/sdk.go
+++ b/android/sdk.go
@@ -41,6 +41,11 @@ type sdkAwareWithoutModule interface {
sdkBase() *SdkBase
MakeMemberOf(sdk SdkRef)
IsInAnySdk() bool
+
+ // IsVersioned determines whether the module is versioned, i.e. has a name of the form
+ // <name>@<version>
+ IsVersioned() bool
+
ContainingSdk() SdkRef
MemberName() string
BuildWithSdks(sdks SdkRefs)
@@ -140,6 +145,11 @@ func (s *SdkBase) IsInAnySdk() bool {
return s.properties.ContainingSdk != nil
}
+// IsVersioned returns true if this module is versioned.
+func (s *SdkBase) IsVersioned() bool {
+ return strings.Contains(s.module.Name(), "@")
+}
+
// ContainingSdk returns the SDK that this module is a member of
func (s *SdkBase) ContainingSdk() SdkRef {
if s.properties.ContainingSdk != nil {