Merge "Make licenseModule SdkAware"
This commit is contained in:
@@ -51,6 +51,7 @@ type licenseProperties struct {
|
||||
type licenseModule struct {
|
||||
ModuleBase
|
||||
DefaultableModuleBase
|
||||
SdkBase
|
||||
|
||||
properties licenseProperties
|
||||
}
|
||||
@@ -75,6 +76,7 @@ func LicenseFactory() Module {
|
||||
// The visibility property needs to be checked and parsed by the visibility module.
|
||||
setPrimaryVisibilityProperty(module, "visibility", &module.properties.Visibility)
|
||||
|
||||
InitSdkAwareModule(module)
|
||||
initAndroidModuleBase(module)
|
||||
InitDefaultableModule(module)
|
||||
|
||||
|
@@ -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 {
|
||||
|
Reference in New Issue
Block a user