Added module_exports/_snapshot as alias for sdk/_snapshot
Bug: 146341462 Test: m nothing Change-Id: I27e1ef494a2b0874074aa43614612189b17e7860
This commit is contained in:
19
sdk/sdk.go
19
sdk/sdk.go
@@ -33,7 +33,7 @@ func init() {
|
||||
pctx.Import("android/soong/android")
|
||||
pctx.Import("android/soong/java/config")
|
||||
|
||||
android.RegisterModuleType("sdk", ModuleFactory)
|
||||
android.RegisterModuleType("sdk", SdkModuleFactory)
|
||||
android.RegisterModuleType("sdk_snapshot", SnapshotModuleFactory)
|
||||
android.PreDepsMutators(RegisterPreDepsMutators)
|
||||
android.PostDepsMutators(RegisterPostDepsMutators)
|
||||
@@ -60,6 +60,9 @@ type sdk struct {
|
||||
|
||||
type sdkProperties struct {
|
||||
Snapshot bool `blueprint:"mutated"`
|
||||
|
||||
// True if this is a module_exports (or module_exports_snapshot) module type.
|
||||
Module_exports bool `blueprint:"mutated"`
|
||||
}
|
||||
|
||||
type sdkMemberDependencyTag struct {
|
||||
@@ -182,18 +185,18 @@ func createDynamicSdkMemberTypes(sdkMemberTypes []android.SdkMemberType) *dynami
|
||||
|
||||
// sdk defines an SDK which is a logical group of modules (e.g. native libs, headers, java libs, etc.)
|
||||
// which Mainline modules like APEX can choose to build with.
|
||||
func ModuleFactory() android.Module {
|
||||
s := &sdk{}
|
||||
func SdkModuleFactory() android.Module {
|
||||
return newSdkModule()
|
||||
}
|
||||
|
||||
func newSdkModule() *sdk {
|
||||
s := &sdk{}
|
||||
// Get the dynamic sdk member type data for the currently registered sdk member types.
|
||||
s.dynamicSdkMemberTypes = getDynamicSdkMemberTypes(android.SdkMemberTypes)
|
||||
|
||||
// Create an instance of the dynamically created struct that contains all the
|
||||
// properties for the member type specific list properties.
|
||||
s.dynamicMemberTypeListProperties = s.dynamicSdkMemberTypes.createMemberListProperties()
|
||||
|
||||
s.AddProperties(&s.properties, s.dynamicMemberTypeListProperties)
|
||||
|
||||
android.InitAndroidMultiTargetsArchModule(s, android.HostAndDeviceSupported, android.MultilibCommon)
|
||||
android.InitDefaultableModule(s)
|
||||
android.AddLoadHook(s, func(ctx android.LoadHookContext) {
|
||||
@@ -208,8 +211,8 @@ func ModuleFactory() android.Module {
|
||||
|
||||
// sdk_snapshot is a versioned snapshot of an SDK. This is an auto-generated module.
|
||||
func SnapshotModuleFactory() android.Module {
|
||||
s := ModuleFactory()
|
||||
s.(*sdk).properties.Snapshot = true
|
||||
s := newSdkModule()
|
||||
s.properties.Snapshot = true
|
||||
return s
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user