diff --git a/aconfig/cc_aconfig_library.go b/aconfig/cc_aconfig_library.go index 8aa696bf1..210a58105 100644 --- a/aconfig/cc_aconfig_library.go +++ b/aconfig/cc_aconfig_library.go @@ -38,10 +38,6 @@ type CcAconfigLibraryProperties struct { // name of the aconfig_declarations module to generate a library for Aconfig_declarations string - // whether to generate test mode version of the library - // TODO: remove "Test" property when "Mode" can be used in all the branches - Test *bool - // default mode is "production", the other accepted modes are: // "test": to generate test mode version of the library // "exported": to generate exported mode version of the library @@ -128,17 +124,11 @@ func (this *CcAconfigLibraryCallbacks) GeneratorBuildActions(ctx cc.ModuleContex } declarations := ctx.OtherModuleProvider(declarationsModules[0], declarationsProviderKey).(declarationsProviderData) - if this.properties.Mode != nil && this.properties.Test != nil { - ctx.PropertyErrorf("test", "test prop should not be specified when mode prop is set") - } mode := proptools.StringDefault(this.properties.Mode, "production") if !isModeSupported(mode) { ctx.PropertyErrorf("mode", "%q is not a supported mode", mode) } - // TODO: remove "Test" property - if proptools.Bool(this.properties.Test) { - mode = "test" - } + ctx.Build(pctx, android.BuildParams{ Rule: cppRule, Input: declarations.IntermediatePath, diff --git a/aconfig/cc_aconfig_library_test.go b/aconfig/cc_aconfig_library_test.go index 9a819e59e..ba2725059 100644 --- a/aconfig/cc_aconfig_library_test.go +++ b/aconfig/cc_aconfig_library_test.go @@ -71,8 +71,6 @@ var incorrectCCCodegenModeTestData = []struct { setting, expectedErr string }{ {"mode: `unsupported`,", "mode: \"unsupported\" is not a supported mode"}, - // TODO: remove this test case when test prop is removed - {"mode: `test`, test: true", "test prop should not be specified when mode prop is set"}, } func TestIncorrectCCCodegenMode(t *testing.T) { diff --git a/aconfig/java_aconfig_library.go b/aconfig/java_aconfig_library.go index b6c90fc5f..eedb3c358 100644 --- a/aconfig/java_aconfig_library.go +++ b/aconfig/java_aconfig_library.go @@ -36,10 +36,6 @@ type JavaAconfigDeclarationsLibraryProperties struct { // name of the aconfig_declarations module to generate a library for Aconfig_declarations string - // whether to generate test mode version of the library - // TODO: remove "Test" property when "Mode" can be used in all the branches - Test *bool - // default mode is "production", the other accepted modes are: // "test": to generate test mode version of the library // "exported": to generate exported mode version of the library @@ -82,17 +78,10 @@ func (callbacks *JavaAconfigDeclarationsLibraryCallbacks) GenerateSourceJarBuild // Generate the action to build the srcjar srcJarPath := android.PathForModuleGen(ctx, ctx.ModuleName()+".srcjar") - if callbacks.properties.Mode != nil && callbacks.properties.Test != nil { - ctx.PropertyErrorf("test", "test prop should not be specified when mode prop is set") - } mode := proptools.StringDefault(callbacks.properties.Mode, "production") if !isModeSupported(mode) { ctx.PropertyErrorf("mode", "%q is not a supported mode", mode) } - // TODO: remove "Test" property - if proptools.Bool(callbacks.properties.Test) { - mode = "test" - } ctx.Build(pctx, android.BuildParams{ Rule: javaRule, diff --git a/aconfig/java_aconfig_library_test.go b/aconfig/java_aconfig_library_test.go index 05532e701..a803672db 100644 --- a/aconfig/java_aconfig_library_test.go +++ b/aconfig/java_aconfig_library_test.go @@ -217,9 +217,3 @@ func TestExportedMode(t *testing.T) { func TestUnsupportedMode(t *testing.T) { testCodegenModeWithError(t, "mode: `unsupported`,", "mode: \"unsupported\" is not a supported mode") } - -// TODO: remove this test case when test prop is removed -func TestBothModeAndTestAreSet(t *testing.T) { - testCodegenModeWithError(t, "mode: `test`, test: true", - "test prop should not be specified when mode prop is set") -} diff --git a/aconfig/rust_aconfig_library.go b/aconfig/rust_aconfig_library.go index 43078b651..265685e6f 100644 --- a/aconfig/rust_aconfig_library.go +++ b/aconfig/rust_aconfig_library.go @@ -20,10 +20,6 @@ type RustAconfigLibraryProperties struct { // name of the aconfig_declarations module to generate a library for Aconfig_declarations string - // whether to generate test mode version of the library - // TODO: remove "Test" property when "Mode" can be used in all the branches - Test *bool - // default mode is "production", the other accepted modes are: // "test": to generate test mode version of the library // "exported": to generate exported mode version of the library @@ -70,19 +66,11 @@ func (a *aconfigDecorator) GenerateSource(ctx rust.ModuleContext, deps rust.Path } declarations := ctx.OtherModuleProvider(declarationsModules[0], declarationsProviderKey).(declarationsProviderData) - if a.Properties.Mode != nil && a.Properties.Test != nil { - ctx.PropertyErrorf("test", "test prop should not be specified when mode prop is set") - } mode := proptools.StringDefault(a.Properties.Mode, "production") if !isModeSupported(mode) { ctx.PropertyErrorf("mode", "%q is not a supported mode", mode) } - // TODO: remove "Test" property - if proptools.Bool(a.Properties.Test) { - mode = "test" - } - ctx.Build(pctx, android.BuildParams{ Rule: rustRule, Input: declarations.IntermediatePath, diff --git a/aconfig/rust_aconfig_library_test.go b/aconfig/rust_aconfig_library_test.go index 5e630b517..3aeab7622 100644 --- a/aconfig/rust_aconfig_library_test.go +++ b/aconfig/rust_aconfig_library_test.go @@ -119,8 +119,6 @@ var incorrectRustCodegenModeTestData = []struct { setting, expectedErr string }{ {"mode: `unsupported`,", "mode: \"unsupported\" is not a supported mode"}, - // TODO: remove this test case when test prop is removed - {"mode: `test`, test: true", "test prop should not be specified when mode prop is set"}, } func TestIncorrectRustCodegenMode(t *testing.T) {