Loading android/package.go +13 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,19 @@ import ( ) func init() { RegisterModuleType("package", PackageFactory) RegisterPackageBuildComponents(InitRegistrationContext) } // Register the package module type and supporting mutators. // // This must be called in the correct order (relative to other methods that also // register mutators) to match the order of mutator registration in mutator.go. // Failing to do so will result in an unrealistic test environment. func RegisterPackageBuildComponents(ctx RegistrationContext) { ctx.RegisterModuleType("package", PackageFactory) // Register mutators that are hard coded in to mutator.go. ctx.HardCodedPreArchMutators(RegisterPackageRenamer) } // The information maintained about each package. Loading android/package_test.go +1 −2 Original line number Diff line number Diff line Loading @@ -87,8 +87,7 @@ func testPackage(fs map[string][]byte) (*TestContext, []error) { config := TestArchConfig(buildDir, nil, "", fs) ctx := NewTestArchContext() ctx.RegisterModuleType("package", PackageFactory) ctx.PreArchMutators(RegisterPackageRenamer) RegisterPackageBuildComponents(ctx) ctx.Register(config) _, errs := ctx.ParseBlueprintsFiles(".") Loading android/visibility_test.go +1 −2 Original line number Diff line number Diff line Loading @@ -871,10 +871,9 @@ func testVisibility(buildDir string, fs map[string][]byte) (*TestContext, []erro config := TestArchConfig(buildDir, nil, "", fs) ctx := NewTestArchContext() ctx.RegisterModuleType("package", PackageFactory) ctx.RegisterModuleType("mock_library", newMockLibraryModule) ctx.RegisterModuleType("mock_defaults", defaultsFactory) ctx.PreArchMutators(RegisterPackageRenamer) RegisterPackageBuildComponents(ctx) ctx.PreArchMutators(RegisterVisibilityRuleChecker) ctx.PreArchMutators(RegisterDefaultsPreArchMutators) ctx.PreArchMutators(RegisterVisibilityRuleGatherer) Loading sdk/testing.go +1 −3 Original line number Diff line number Diff line Loading @@ -62,14 +62,12 @@ func testSdkContext(bp string, fs map[string][]byte) (*android.TestContext, andr ctx := android.NewTestArchContext() // from android package ctx.PreArchMutators(android.RegisterPackageRenamer) android.RegisterPackageBuildComponents(ctx) ctx.PreArchMutators(android.RegisterVisibilityRuleChecker) ctx.PreArchMutators(android.RegisterDefaultsPreArchMutators) ctx.PreArchMutators(android.RegisterVisibilityRuleGatherer) ctx.PostDepsMutators(android.RegisterVisibilityRuleEnforcer) ctx.RegisterModuleType("package", android.PackageFactory) // from java package java.RegisterJavaBuildComponents(ctx) java.RegisterAppBuildComponents(ctx) Loading Loading
android/package.go +13 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,19 @@ import ( ) func init() { RegisterModuleType("package", PackageFactory) RegisterPackageBuildComponents(InitRegistrationContext) } // Register the package module type and supporting mutators. // // This must be called in the correct order (relative to other methods that also // register mutators) to match the order of mutator registration in mutator.go. // Failing to do so will result in an unrealistic test environment. func RegisterPackageBuildComponents(ctx RegistrationContext) { ctx.RegisterModuleType("package", PackageFactory) // Register mutators that are hard coded in to mutator.go. ctx.HardCodedPreArchMutators(RegisterPackageRenamer) } // The information maintained about each package. Loading
android/package_test.go +1 −2 Original line number Diff line number Diff line Loading @@ -87,8 +87,7 @@ func testPackage(fs map[string][]byte) (*TestContext, []error) { config := TestArchConfig(buildDir, nil, "", fs) ctx := NewTestArchContext() ctx.RegisterModuleType("package", PackageFactory) ctx.PreArchMutators(RegisterPackageRenamer) RegisterPackageBuildComponents(ctx) ctx.Register(config) _, errs := ctx.ParseBlueprintsFiles(".") Loading
android/visibility_test.go +1 −2 Original line number Diff line number Diff line Loading @@ -871,10 +871,9 @@ func testVisibility(buildDir string, fs map[string][]byte) (*TestContext, []erro config := TestArchConfig(buildDir, nil, "", fs) ctx := NewTestArchContext() ctx.RegisterModuleType("package", PackageFactory) ctx.RegisterModuleType("mock_library", newMockLibraryModule) ctx.RegisterModuleType("mock_defaults", defaultsFactory) ctx.PreArchMutators(RegisterPackageRenamer) RegisterPackageBuildComponents(ctx) ctx.PreArchMutators(RegisterVisibilityRuleChecker) ctx.PreArchMutators(RegisterDefaultsPreArchMutators) ctx.PreArchMutators(RegisterVisibilityRuleGatherer) Loading
sdk/testing.go +1 −3 Original line number Diff line number Diff line Loading @@ -62,14 +62,12 @@ func testSdkContext(bp string, fs map[string][]byte) (*android.TestContext, andr ctx := android.NewTestArchContext() // from android package ctx.PreArchMutators(android.RegisterPackageRenamer) android.RegisterPackageBuildComponents(ctx) ctx.PreArchMutators(android.RegisterVisibilityRuleChecker) ctx.PreArchMutators(android.RegisterDefaultsPreArchMutators) ctx.PreArchMutators(android.RegisterVisibilityRuleGatherer) ctx.PostDepsMutators(android.RegisterVisibilityRuleEnforcer) ctx.RegisterModuleType("package", android.PackageFactory) // from java package java.RegisterJavaBuildComponents(ctx) java.RegisterAppBuildComponents(ctx) Loading