Merge changes I07db8afc,Ia89e0239
* changes: Stop module types being SdkAware Replace usages of SdkAware in sdk module with Module
This commit is contained in:
@@ -58,7 +58,6 @@ var _ Bazelable = &licenseModule{}
|
|||||||
type licenseModule struct {
|
type licenseModule struct {
|
||||||
ModuleBase
|
ModuleBase
|
||||||
DefaultableModuleBase
|
DefaultableModuleBase
|
||||||
SdkBase
|
|
||||||
BazelModuleBase
|
BazelModuleBase
|
||||||
|
|
||||||
properties licenseProperties
|
properties licenseProperties
|
||||||
@@ -137,7 +136,6 @@ func LicenseFactory() Module {
|
|||||||
// The visibility property needs to be checked and parsed by the visibility module.
|
// The visibility property needs to be checked and parsed by the visibility module.
|
||||||
setPrimaryVisibilityProperty(module, "visibility", &module.properties.Visibility)
|
setPrimaryVisibilityProperty(module, "visibility", &module.properties.Visibility)
|
||||||
|
|
||||||
InitSdkAwareModule(module)
|
|
||||||
initAndroidModuleBase(module)
|
initAndroidModuleBase(module)
|
||||||
InitDefaultableModule(module)
|
InitDefaultableModule(module)
|
||||||
InitBazelModule(module)
|
InitBazelModule(module)
|
||||||
|
@@ -541,7 +541,7 @@ type SdkMember interface {
|
|||||||
Name() string
|
Name() string
|
||||||
|
|
||||||
// Variants returns all the variants of this module depended upon by the SDK.
|
// Variants returns all the variants of this module depended upon by the SDK.
|
||||||
Variants() []SdkAware
|
Variants() []Module
|
||||||
}
|
}
|
||||||
|
|
||||||
// SdkMemberDependencyTag is the interface that a tag must implement in order to allow the
|
// SdkMemberDependencyTag is the interface that a tag must implement in order to allow the
|
||||||
@@ -673,7 +673,7 @@ type SdkMemberType interface {
|
|||||||
// The sdk module code generates the snapshot as follows:
|
// The sdk module code generates the snapshot as follows:
|
||||||
//
|
//
|
||||||
// * A properties struct of type SdkMemberProperties is created for each variant and
|
// * A properties struct of type SdkMemberProperties is created for each variant and
|
||||||
// populated with information from the variant by calling PopulateFromVariant(SdkAware)
|
// populated with information from the variant by calling PopulateFromVariant(Module)
|
||||||
// on the struct.
|
// on the struct.
|
||||||
//
|
//
|
||||||
// * An additional properties struct is created into which the common properties will be
|
// * An additional properties struct is created into which the common properties will be
|
||||||
|
@@ -396,7 +396,6 @@ type apexBundle struct {
|
|||||||
android.ModuleBase
|
android.ModuleBase
|
||||||
android.DefaultableModuleBase
|
android.DefaultableModuleBase
|
||||||
android.OverridableModuleBase
|
android.OverridableModuleBase
|
||||||
android.SdkBase
|
|
||||||
android.BazelModuleBase
|
android.BazelModuleBase
|
||||||
multitree.ExportableModuleBase
|
multitree.ExportableModuleBase
|
||||||
|
|
||||||
@@ -2640,7 +2639,6 @@ func newApexBundle() *apexBundle {
|
|||||||
|
|
||||||
android.InitAndroidMultiTargetsArchModule(module, android.HostAndDeviceSupported, android.MultilibCommon)
|
android.InitAndroidMultiTargetsArchModule(module, android.HostAndDeviceSupported, android.MultilibCommon)
|
||||||
android.InitDefaultableModule(module)
|
android.InitDefaultableModule(module)
|
||||||
android.InitSdkAwareModule(module)
|
|
||||||
android.InitOverridableModule(module, &module.overridableProperties.Overrides)
|
android.InitOverridableModule(module, &module.overridableProperties.Overrides)
|
||||||
android.InitBazelModule(module)
|
android.InitBazelModule(module)
|
||||||
multitree.InitExportableModule(module)
|
multitree.InitExportableModule(module)
|
||||||
|
2
cc/cc.go
2
cc/cc.go
@@ -818,7 +818,6 @@ type BazelHandler interface {
|
|||||||
type Module struct {
|
type Module struct {
|
||||||
fuzz.FuzzModule
|
fuzz.FuzzModule
|
||||||
|
|
||||||
android.SdkBase
|
|
||||||
android.BazelModuleBase
|
android.BazelModuleBase
|
||||||
|
|
||||||
VendorProperties VendorProperties
|
VendorProperties VendorProperties
|
||||||
@@ -1199,7 +1198,6 @@ func (c *Module) Init() android.Module {
|
|||||||
android.InitBazelModule(c)
|
android.InitBazelModule(c)
|
||||||
}
|
}
|
||||||
android.InitApexModule(c)
|
android.InitApexModule(c)
|
||||||
android.InitSdkAwareModule(c)
|
|
||||||
android.InitDefaultableModule(c)
|
android.InitDefaultableModule(c)
|
||||||
|
|
||||||
return c
|
return c
|
||||||
|
@@ -293,8 +293,6 @@ func NewPrebuiltLibrary(hod android.HostOrDeviceSupported, srcsProperty string)
|
|||||||
android.InitPrebuiltModuleWithSrcSupplier(module, srcsSupplier, srcsProperty)
|
android.InitPrebuiltModuleWithSrcSupplier(module, srcsSupplier, srcsProperty)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prebuilt libraries can be used in SDKs.
|
|
||||||
android.InitSdkAwareModule(module)
|
|
||||||
return module, library
|
return module, library
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -582,7 +580,6 @@ func NewPrebuiltObject(hod android.HostOrDeviceSupported) *Module {
|
|||||||
module.linker = prebuilt
|
module.linker = prebuilt
|
||||||
module.AddProperties(&prebuilt.properties)
|
module.AddProperties(&prebuilt.properties)
|
||||||
android.InitPrebuiltModule(module, &prebuilt.properties.Srcs)
|
android.InitPrebuiltModule(module, &prebuilt.properties.Srcs)
|
||||||
android.InitSdkAwareModule(module)
|
|
||||||
return module
|
return module
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -395,7 +395,6 @@ type Module struct {
|
|||||||
android.ModuleBase
|
android.ModuleBase
|
||||||
android.DefaultableModuleBase
|
android.DefaultableModuleBase
|
||||||
android.ApexModuleBase
|
android.ApexModuleBase
|
||||||
android.SdkBase
|
|
||||||
android.BazelModuleBase
|
android.BazelModuleBase
|
||||||
|
|
||||||
// Functionality common to Module and Import.
|
// Functionality common to Module and Import.
|
||||||
|
@@ -229,7 +229,6 @@ type SourceOnlyBootclasspathProperties struct {
|
|||||||
type BootclasspathFragmentModule struct {
|
type BootclasspathFragmentModule struct {
|
||||||
android.ModuleBase
|
android.ModuleBase
|
||||||
android.ApexModuleBase
|
android.ApexModuleBase
|
||||||
android.SdkBase
|
|
||||||
ClasspathFragmentBase
|
ClasspathFragmentBase
|
||||||
|
|
||||||
// True if this fragment is for testing purposes.
|
// True if this fragment is for testing purposes.
|
||||||
@@ -279,7 +278,6 @@ func bootclasspathFragmentFactory() android.Module {
|
|||||||
m := &BootclasspathFragmentModule{}
|
m := &BootclasspathFragmentModule{}
|
||||||
m.AddProperties(&m.properties, &m.sourceOnlyProperties)
|
m.AddProperties(&m.properties, &m.sourceOnlyProperties)
|
||||||
android.InitApexModule(m)
|
android.InitApexModule(m)
|
||||||
android.InitSdkAwareModule(m)
|
|
||||||
initClasspathFragment(m, BOOTCLASSPATH)
|
initClasspathFragment(m, BOOTCLASSPATH)
|
||||||
android.InitAndroidArchModule(m, android.DeviceSupported, android.MultilibCommon)
|
android.InitAndroidArchModule(m, android.DeviceSupported, android.MultilibCommon)
|
||||||
|
|
||||||
@@ -1353,7 +1351,6 @@ func prebuiltBootclasspathFragmentFactory() android.Module {
|
|||||||
// array.
|
// array.
|
||||||
android.InitPrebuiltModule(m, &[]string{"placeholder"})
|
android.InitPrebuiltModule(m, &[]string{"placeholder"})
|
||||||
android.InitApexModule(m)
|
android.InitApexModule(m)
|
||||||
android.InitSdkAwareModule(m)
|
|
||||||
android.InitAndroidArchModule(m, android.HostAndDeviceSupported, android.MultilibCommon)
|
android.InitAndroidArchModule(m, android.HostAndDeviceSupported, android.MultilibCommon)
|
||||||
|
|
||||||
// Initialize the contents property from the image_name.
|
// Initialize the contents property from the image_name.
|
||||||
|
@@ -48,7 +48,6 @@ func RegisterStubsBuildComponents(ctx android.RegistrationContext) {
|
|||||||
// Droidstubs
|
// Droidstubs
|
||||||
type Droidstubs struct {
|
type Droidstubs struct {
|
||||||
Javadoc
|
Javadoc
|
||||||
android.SdkBase
|
|
||||||
|
|
||||||
properties DroidstubsProperties
|
properties DroidstubsProperties
|
||||||
apiFile android.Path
|
apiFile android.Path
|
||||||
@@ -179,7 +178,6 @@ func DroidstubsFactory() android.Module {
|
|||||||
&module.Javadoc.properties)
|
&module.Javadoc.properties)
|
||||||
|
|
||||||
InitDroiddocModule(module, android.HostAndDeviceSupported)
|
InitDroiddocModule(module, android.HostAndDeviceSupported)
|
||||||
android.InitSdkAwareModule(module)
|
|
||||||
return module
|
return module
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -927,7 +925,6 @@ type PrebuiltStubsSources struct {
|
|||||||
android.ModuleBase
|
android.ModuleBase
|
||||||
android.DefaultableModuleBase
|
android.DefaultableModuleBase
|
||||||
prebuilt android.Prebuilt
|
prebuilt android.Prebuilt
|
||||||
android.SdkBase
|
|
||||||
|
|
||||||
properties PrebuiltStubsSourcesProperties
|
properties PrebuiltStubsSourcesProperties
|
||||||
|
|
||||||
@@ -1007,7 +1004,6 @@ func PrebuiltStubsSourcesFactory() android.Module {
|
|||||||
module.AddProperties(&module.properties)
|
module.AddProperties(&module.properties)
|
||||||
|
|
||||||
android.InitPrebuiltModule(module, &module.properties.Srcs)
|
android.InitPrebuiltModule(module, &module.properties.Srcs)
|
||||||
android.InitSdkAwareModule(module)
|
|
||||||
InitDroiddocModule(module, android.HostAndDeviceSupported)
|
InitDroiddocModule(module, android.HostAndDeviceSupported)
|
||||||
return module
|
return module
|
||||||
}
|
}
|
||||||
|
@@ -876,7 +876,6 @@ func LibraryFactory() android.Module {
|
|||||||
module.initModuleAndImport(module)
|
module.initModuleAndImport(module)
|
||||||
|
|
||||||
android.InitApexModule(module)
|
android.InitApexModule(module)
|
||||||
android.InitSdkAwareModule(module)
|
|
||||||
android.InitBazelModule(module)
|
android.InitBazelModule(module)
|
||||||
InitJavaModule(module, android.HostAndDeviceSupported)
|
InitJavaModule(module, android.HostAndDeviceSupported)
|
||||||
return module
|
return module
|
||||||
@@ -899,7 +898,6 @@ func LibraryHostFactory() android.Module {
|
|||||||
module.Module.properties.Installable = proptools.BoolPtr(true)
|
module.Module.properties.Installable = proptools.BoolPtr(true)
|
||||||
|
|
||||||
android.InitApexModule(module)
|
android.InitApexModule(module)
|
||||||
android.InitSdkAwareModule(module)
|
|
||||||
android.InitBazelModule(module)
|
android.InitBazelModule(module)
|
||||||
InitJavaModule(module, android.HostSupported)
|
InitJavaModule(module, android.HostSupported)
|
||||||
return module
|
return module
|
||||||
@@ -1340,7 +1338,6 @@ func TestFactory() android.Module {
|
|||||||
module.Module.dexpreopter.isTest = true
|
module.Module.dexpreopter.isTest = true
|
||||||
module.Module.linter.properties.Lint.Test = proptools.BoolPtr(true)
|
module.Module.linter.properties.Lint.Test = proptools.BoolPtr(true)
|
||||||
|
|
||||||
android.InitSdkAwareModule(module)
|
|
||||||
InitJavaModule(module, android.HostAndDeviceSupported)
|
InitJavaModule(module, android.HostAndDeviceSupported)
|
||||||
return module
|
return module
|
||||||
}
|
}
|
||||||
@@ -1379,7 +1376,6 @@ func JavaTestImportFactory() android.Module {
|
|||||||
|
|
||||||
android.InitPrebuiltModule(module, &module.properties.Jars)
|
android.InitPrebuiltModule(module, &module.properties.Jars)
|
||||||
android.InitApexModule(module)
|
android.InitApexModule(module)
|
||||||
android.InitSdkAwareModule(module)
|
|
||||||
InitJavaModule(module, android.HostAndDeviceSupported)
|
InitJavaModule(module, android.HostAndDeviceSupported)
|
||||||
return module
|
return module
|
||||||
}
|
}
|
||||||
@@ -1802,7 +1798,6 @@ type Import struct {
|
|||||||
android.ApexModuleBase
|
android.ApexModuleBase
|
||||||
android.BazelModuleBase
|
android.BazelModuleBase
|
||||||
prebuilt android.Prebuilt
|
prebuilt android.Prebuilt
|
||||||
android.SdkBase
|
|
||||||
|
|
||||||
// Functionality common to Module and Import.
|
// Functionality common to Module and Import.
|
||||||
embeddableInModuleAndImport
|
embeddableInModuleAndImport
|
||||||
@@ -2176,7 +2171,6 @@ func ImportFactory() android.Module {
|
|||||||
|
|
||||||
android.InitPrebuiltModule(module, &module.properties.Jars)
|
android.InitPrebuiltModule(module, &module.properties.Jars)
|
||||||
android.InitApexModule(module)
|
android.InitApexModule(module)
|
||||||
android.InitSdkAwareModule(module)
|
|
||||||
android.InitBazelModule(module)
|
android.InitBazelModule(module)
|
||||||
InitJavaModule(module, android.HostAndDeviceSupported)
|
InitJavaModule(module, android.HostAndDeviceSupported)
|
||||||
return module
|
return module
|
||||||
|
@@ -15,12 +15,11 @@
|
|||||||
package java
|
package java
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"android/soong/android"
|
"android/soong/android"
|
||||||
"github.com/google/blueprint"
|
"github.com/google/blueprint"
|
||||||
|
|
||||||
"fmt"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -55,7 +54,6 @@ type platformCompatConfigProperties struct {
|
|||||||
|
|
||||||
type platformCompatConfig struct {
|
type platformCompatConfig struct {
|
||||||
android.ModuleBase
|
android.ModuleBase
|
||||||
android.SdkBase
|
|
||||||
|
|
||||||
properties platformCompatConfigProperties
|
properties platformCompatConfigProperties
|
||||||
installDirPath android.InstallPath
|
installDirPath android.InstallPath
|
||||||
@@ -127,7 +125,6 @@ func (p *platformCompatConfig) AndroidMkEntries() []android.AndroidMkEntries {
|
|||||||
func PlatformCompatConfigFactory() android.Module {
|
func PlatformCompatConfigFactory() android.Module {
|
||||||
module := &platformCompatConfig{}
|
module := &platformCompatConfig{}
|
||||||
module.AddProperties(&module.properties)
|
module.AddProperties(&module.properties)
|
||||||
android.InitSdkAwareModule(module)
|
|
||||||
android.InitAndroidArchModule(module, android.DeviceSupported, android.MultilibCommon)
|
android.InitAndroidArchModule(module, android.DeviceSupported, android.MultilibCommon)
|
||||||
return module
|
return module
|
||||||
}
|
}
|
||||||
@@ -178,7 +175,6 @@ var _ android.SdkMemberType = (*compatConfigMemberType)(nil)
|
|||||||
// A prebuilt version of the platform compat config module.
|
// A prebuilt version of the platform compat config module.
|
||||||
type prebuiltCompatConfigModule struct {
|
type prebuiltCompatConfigModule struct {
|
||||||
android.ModuleBase
|
android.ModuleBase
|
||||||
android.SdkBase
|
|
||||||
prebuilt android.Prebuilt
|
prebuilt android.Prebuilt
|
||||||
|
|
||||||
properties prebuiltCompatConfigProperties
|
properties prebuiltCompatConfigProperties
|
||||||
@@ -213,7 +209,6 @@ func prebuiltCompatConfigFactory() android.Module {
|
|||||||
m := &prebuiltCompatConfigModule{}
|
m := &prebuiltCompatConfigModule{}
|
||||||
m.AddProperties(&m.properties)
|
m.AddProperties(&m.properties)
|
||||||
android.InitSingleSourcePrebuiltModule(m, &m.properties, "Metadata")
|
android.InitSingleSourcePrebuiltModule(m, &m.properties, "Metadata")
|
||||||
android.InitSdkAwareModule(m)
|
|
||||||
android.InitAndroidArchModule(m, android.DeviceSupported, android.MultilibCommon)
|
android.InitAndroidArchModule(m, android.DeviceSupported, android.MultilibCommon)
|
||||||
return m
|
return m
|
||||||
}
|
}
|
||||||
|
@@ -752,7 +752,7 @@ type commonToSdkLibraryAndImportProperties struct {
|
|||||||
// commonSdkLibraryAndImportModule defines the interface that must be provided by a module that
|
// commonSdkLibraryAndImportModule defines the interface that must be provided by a module that
|
||||||
// embeds the commonToSdkLibraryAndImport struct.
|
// embeds the commonToSdkLibraryAndImport struct.
|
||||||
type commonSdkLibraryAndImportModule interface {
|
type commonSdkLibraryAndImportModule interface {
|
||||||
android.SdkAware
|
android.Module
|
||||||
|
|
||||||
BaseModuleName() string
|
BaseModuleName() string
|
||||||
}
|
}
|
||||||
@@ -2048,7 +2048,6 @@ func SdkLibraryFactory() android.Module {
|
|||||||
|
|
||||||
module.InitSdkLibraryProperties()
|
module.InitSdkLibraryProperties()
|
||||||
android.InitApexModule(module)
|
android.InitApexModule(module)
|
||||||
android.InitSdkAwareModule(module)
|
|
||||||
InitJavaModule(module, android.HostAndDeviceSupported)
|
InitJavaModule(module, android.HostAndDeviceSupported)
|
||||||
|
|
||||||
// Initialize the map from scope to scope specific properties.
|
// Initialize the map from scope to scope specific properties.
|
||||||
@@ -2126,7 +2125,6 @@ type SdkLibraryImport struct {
|
|||||||
android.DefaultableModuleBase
|
android.DefaultableModuleBase
|
||||||
prebuilt android.Prebuilt
|
prebuilt android.Prebuilt
|
||||||
android.ApexModuleBase
|
android.ApexModuleBase
|
||||||
android.SdkBase
|
|
||||||
|
|
||||||
hiddenAPI
|
hiddenAPI
|
||||||
dexpreopter
|
dexpreopter
|
||||||
@@ -2208,7 +2206,6 @@ func sdkLibraryImportFactory() android.Module {
|
|||||||
|
|
||||||
android.InitPrebuiltModule(module, &[]string{""})
|
android.InitPrebuiltModule(module, &[]string{""})
|
||||||
android.InitApexModule(module)
|
android.InitApexModule(module)
|
||||||
android.InitSdkAwareModule(module)
|
|
||||||
InitJavaModule(module, android.HostAndDeviceSupported)
|
InitJavaModule(module, android.HostAndDeviceSupported)
|
||||||
|
|
||||||
module.SetDefaultableHook(func(mctx android.DefaultableHookContext) {
|
module.SetDefaultableHook(func(mctx android.DefaultableHookContext) {
|
||||||
|
@@ -114,7 +114,6 @@ func SystemModulesFactory() android.Module {
|
|||||||
module.AddProperties(&module.properties)
|
module.AddProperties(&module.properties)
|
||||||
android.InitAndroidArchModule(module, android.HostAndDeviceSupported, android.MultilibCommon)
|
android.InitAndroidArchModule(module, android.HostAndDeviceSupported, android.MultilibCommon)
|
||||||
android.InitDefaultableModule(module)
|
android.InitDefaultableModule(module)
|
||||||
android.InitSdkAwareModule(module)
|
|
||||||
return module
|
return module
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -130,7 +129,6 @@ var _ SystemModulesProvider = (*systemModulesImport)(nil)
|
|||||||
type SystemModules struct {
|
type SystemModules struct {
|
||||||
android.ModuleBase
|
android.ModuleBase
|
||||||
android.DefaultableModuleBase
|
android.DefaultableModuleBase
|
||||||
android.SdkBase
|
|
||||||
|
|
||||||
properties SystemModulesProperties
|
properties SystemModulesProperties
|
||||||
|
|
||||||
@@ -215,7 +213,6 @@ func systemModulesImportFactory() android.Module {
|
|||||||
android.InitPrebuiltModule(module, &module.properties.Libs)
|
android.InitPrebuiltModule(module, &module.properties.Libs)
|
||||||
android.InitAndroidArchModule(module, android.HostAndDeviceSupported, android.MultilibCommon)
|
android.InitAndroidArchModule(module, android.HostAndDeviceSupported, android.MultilibCommon)
|
||||||
android.InitDefaultableModule(module)
|
android.InitDefaultableModule(module)
|
||||||
android.InitSdkAwareModule(module)
|
|
||||||
return module
|
return module
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -83,7 +83,6 @@ func (p *platformSystemServerClasspathModule) standaloneConfiguredJars(ctx andro
|
|||||||
type SystemServerClasspathModule struct {
|
type SystemServerClasspathModule struct {
|
||||||
android.ModuleBase
|
android.ModuleBase
|
||||||
android.ApexModuleBase
|
android.ApexModuleBase
|
||||||
android.SdkBase
|
|
||||||
|
|
||||||
ClasspathFragmentBase
|
ClasspathFragmentBase
|
||||||
|
|
||||||
@@ -113,7 +112,6 @@ func systemServerClasspathFactory() android.Module {
|
|||||||
m := &SystemServerClasspathModule{}
|
m := &SystemServerClasspathModule{}
|
||||||
m.AddProperties(&m.properties)
|
m.AddProperties(&m.properties)
|
||||||
android.InitApexModule(m)
|
android.InitApexModule(m)
|
||||||
android.InitSdkAwareModule(m)
|
|
||||||
initClasspathFragment(m, SYSTEMSERVERCLASSPATH)
|
initClasspathFragment(m, SYSTEMSERVERCLASSPATH)
|
||||||
android.InitAndroidArchModule(m, android.DeviceSupported, android.MultilibCommon)
|
android.InitAndroidArchModule(m, android.DeviceSupported, android.MultilibCommon)
|
||||||
return m
|
return m
|
||||||
@@ -331,7 +329,6 @@ func prebuiltSystemServerClasspathModuleFactory() android.Module {
|
|||||||
// array.
|
// array.
|
||||||
android.InitPrebuiltModule(m, &[]string{"placeholder"})
|
android.InitPrebuiltModule(m, &[]string{"placeholder"})
|
||||||
android.InitApexModule(m)
|
android.InitApexModule(m)
|
||||||
android.InitSdkAwareModule(m)
|
|
||||||
android.InitAndroidArchModule(m, android.DeviceSupported, android.MultilibCommon)
|
android.InitAndroidArchModule(m, android.DeviceSupported, android.MultilibCommon)
|
||||||
return m
|
return m
|
||||||
}
|
}
|
||||||
|
@@ -171,9 +171,9 @@ func (s *sdk) collectMembers(ctx android.ModuleContext) {
|
|||||||
exportedComponentsInfo = ctx.OtherModuleProvider(child, android.ExportedComponentsInfoProvider).(android.ExportedComponentsInfo)
|
exportedComponentsInfo = ctx.OtherModuleProvider(child, android.ExportedComponentsInfoProvider).(android.ExportedComponentsInfo)
|
||||||
}
|
}
|
||||||
|
|
||||||
var container android.SdkAware
|
var container android.Module
|
||||||
if parent != ctx.Module() {
|
if parent != ctx.Module() {
|
||||||
container = parent.(android.SdkAware)
|
container = parent.(android.Module)
|
||||||
}
|
}
|
||||||
|
|
||||||
minApiLevel := android.MinApiLevelForSdkSnapshot(ctx, child)
|
minApiLevel := android.MinApiLevelForSdkSnapshot(ctx, child)
|
||||||
@@ -182,7 +182,7 @@ func (s *sdk) collectMembers(ctx android.ModuleContext) {
|
|||||||
s.memberVariantDeps = append(s.memberVariantDeps, sdkMemberVariantDep{
|
s.memberVariantDeps = append(s.memberVariantDeps, sdkMemberVariantDep{
|
||||||
sdkVariant: s,
|
sdkVariant: s,
|
||||||
memberType: memberType,
|
memberType: memberType,
|
||||||
variant: child.(android.SdkAware),
|
variant: child.(android.Module),
|
||||||
minApiLevel: minApiLevel,
|
minApiLevel: minApiLevel,
|
||||||
container: container,
|
container: container,
|
||||||
export: export,
|
export: export,
|
||||||
@@ -269,7 +269,7 @@ func isMemberTypeSupportedByTargetBuildRelease(memberType android.SdkMemberType,
|
|||||||
return supportedByTargetBuildRelease
|
return supportedByTargetBuildRelease
|
||||||
}
|
}
|
||||||
|
|
||||||
func appendUniqueVariants(variants []android.SdkAware, newVariant android.SdkAware) []android.SdkAware {
|
func appendUniqueVariants(variants []android.Module, newVariant android.Module) []android.Module {
|
||||||
for _, v := range variants {
|
for _, v := range variants {
|
||||||
if v == newVariant {
|
if v == newVariant {
|
||||||
return variants
|
return variants
|
||||||
@@ -1246,12 +1246,12 @@ type sdkMemberVariantDep struct {
|
|||||||
memberType android.SdkMemberType
|
memberType android.SdkMemberType
|
||||||
|
|
||||||
// The variant that is added to the sdk.
|
// The variant that is added to the sdk.
|
||||||
variant android.SdkAware
|
variant android.Module
|
||||||
|
|
||||||
// The optional container of this member, i.e. the module that is depended upon by the sdk
|
// The optional container of this member, i.e. the module that is depended upon by the sdk
|
||||||
// (possibly transitively) and whose dependency on this module is why it was added to the sdk.
|
// (possibly transitively) and whose dependency on this module is why it was added to the sdk.
|
||||||
// Is nil if this a direct dependency of the sdk.
|
// Is nil if this a direct dependency of the sdk.
|
||||||
container android.SdkAware
|
container android.Module
|
||||||
|
|
||||||
// True if the member should be exported, i.e. accessible, from outside the sdk.
|
// True if the member should be exported, i.e. accessible, from outside the sdk.
|
||||||
export bool
|
export bool
|
||||||
@@ -1270,14 +1270,14 @@ var _ android.SdkMember = (*sdkMember)(nil)
|
|||||||
type sdkMember struct {
|
type sdkMember struct {
|
||||||
memberType android.SdkMemberType
|
memberType android.SdkMemberType
|
||||||
name string
|
name string
|
||||||
variants []android.SdkAware
|
variants []android.Module
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *sdkMember) Name() string {
|
func (m *sdkMember) Name() string {
|
||||||
return m.name
|
return m.name
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *sdkMember) Variants() []android.SdkAware {
|
func (m *sdkMember) Variants() []android.Module {
|
||||||
return m.variants
|
return m.variants
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1362,24 +1362,24 @@ func getVariantCoordinate(ctx *memberContext, variant android.Module) variantCoo
|
|||||||
// by apex variant, where one is the default/platform variant and one is the APEX variant. In that
|
// by apex variant, where one is the default/platform variant and one is the APEX variant. In that
|
||||||
// case it picks the APEX variant. It picks the APEX variant because that is the behavior that would
|
// case it picks the APEX variant. It picks the APEX variant because that is the behavior that would
|
||||||
// be expected
|
// be expected
|
||||||
func selectApexVariantsWhereAvailable(ctx *memberContext, variants []android.SdkAware) []android.SdkAware {
|
func selectApexVariantsWhereAvailable(ctx *memberContext, variants []android.Module) []android.Module {
|
||||||
moduleCtx := ctx.sdkMemberContext
|
moduleCtx := ctx.sdkMemberContext
|
||||||
|
|
||||||
// Group the variants by coordinates.
|
// Group the variants by coordinates.
|
||||||
variantsByCoord := make(map[variantCoordinate][]android.SdkAware)
|
variantsByCoord := make(map[variantCoordinate][]android.Module)
|
||||||
for _, variant := range variants {
|
for _, variant := range variants {
|
||||||
coord := getVariantCoordinate(ctx, variant)
|
coord := getVariantCoordinate(ctx, variant)
|
||||||
variantsByCoord[coord] = append(variantsByCoord[coord], variant)
|
variantsByCoord[coord] = append(variantsByCoord[coord], variant)
|
||||||
}
|
}
|
||||||
|
|
||||||
toDiscard := make(map[android.SdkAware]struct{})
|
toDiscard := make(map[android.Module]struct{})
|
||||||
for coord, list := range variantsByCoord {
|
for coord, list := range variantsByCoord {
|
||||||
count := len(list)
|
count := len(list)
|
||||||
if count == 1 {
|
if count == 1 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
variantsByApex := make(map[string]android.SdkAware)
|
variantsByApex := make(map[string]android.Module)
|
||||||
conflictDetected := false
|
conflictDetected := false
|
||||||
for _, variant := range list {
|
for _, variant := range list {
|
||||||
apexInfo := moduleCtx.OtherModuleProvider(variant, android.ApexInfoProvider).(android.ApexInfo)
|
apexInfo := moduleCtx.OtherModuleProvider(variant, android.ApexInfoProvider).(android.ApexInfo)
|
||||||
@@ -1421,7 +1421,7 @@ func selectApexVariantsWhereAvailable(ctx *memberContext, variants []android.Sdk
|
|||||||
// If there are any variants to discard then remove them from the list of variants, while
|
// If there are any variants to discard then remove them from the list of variants, while
|
||||||
// preserving the order.
|
// preserving the order.
|
||||||
if len(toDiscard) > 0 {
|
if len(toDiscard) > 0 {
|
||||||
filtered := []android.SdkAware{}
|
filtered := []android.Module{}
|
||||||
for _, variant := range variants {
|
for _, variant := range variants {
|
||||||
if _, ok := toDiscard[variant]; !ok {
|
if _, ok := toDiscard[variant]; !ok {
|
||||||
filtered = append(filtered, variant)
|
filtered = append(filtered, variant)
|
||||||
|
Reference in New Issue
Block a user