Merge "Remove HideFlaggedApi() related logic and the related product variables" into main am: c0412f5d31
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2911028 Change-Id: I6f2c9c1e0ca001bd36a6ef184f42022209247b84 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
bd44b17537
5 changed files with 0 additions and 62 deletions
|
@ -1965,18 +1965,6 @@ func (c *deviceConfig) CheckVendorSeappViolations() bool {
|
|||
return Bool(c.config.productVariables.CheckVendorSeappViolations)
|
||||
}
|
||||
|
||||
func (c *deviceConfig) NextReleaseHideFlaggedApi() bool {
|
||||
return Bool(c.config.productVariables.NextReleaseHideFlaggedApi)
|
||||
}
|
||||
|
||||
func (c *deviceConfig) ReleaseExposeFlaggedApi() bool {
|
||||
return Bool(c.config.productVariables.Release_expose_flagged_api)
|
||||
}
|
||||
|
||||
func (c *deviceConfig) HideFlaggedApis() bool {
|
||||
return c.NextReleaseHideFlaggedApi() && !c.ReleaseExposeFlaggedApi()
|
||||
}
|
||||
|
||||
func (c *config) GetBuildFlag(name string) (string, bool) {
|
||||
val, ok := c.productVariables.BuildFlags[name]
|
||||
return val, ok
|
||||
|
|
|
@ -491,10 +491,6 @@ type ProductVariables struct {
|
|||
// partition images. They should not be read from soong modules.
|
||||
PartitionVarsForBazelMigrationOnlyDoNotUse PartitionVariables `json:",omitempty"`
|
||||
|
||||
NextReleaseHideFlaggedApi *bool `json:",omitempty"`
|
||||
|
||||
Release_expose_flagged_api *bool `json:",omitempty"`
|
||||
|
||||
BuildFlags map[string]string `json:",omitempty"`
|
||||
|
||||
BuildFromSourceStub *bool `json:",omitempty"`
|
||||
|
|
|
@ -55,13 +55,6 @@ var (
|
|||
}
|
||||
|
||||
MetalavaAnnotationsWarningsFlags = strings.Join(metalavaAnnotationsWarningsFlags, " ")
|
||||
|
||||
metalavaHideFlaggedApis = []string{
|
||||
"--revert-annotation",
|
||||
"android.annotation.FlaggedApi",
|
||||
}
|
||||
|
||||
MetalavaHideFlaggedApis = strings.Join(metalavaHideFlaggedApis, " ")
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -73,8 +66,6 @@ func init() {
|
|||
|
||||
exportedVars.ExportString("MetalavaAddOpens", MetalavaAddOpens)
|
||||
|
||||
exportedVars.ExportStringList("MetalavaHideFlaggedApis", metalavaHideFlaggedApis)
|
||||
|
||||
exportedVars.ExportStringListStaticVariable("MetalavaAnnotationsFlags", metalavaAnnotationsFlags)
|
||||
|
||||
exportedVars.ExportStringListStaticVariable("MetalavaAnnotationWarningsFlags", metalavaAnnotationsWarningsFlags)
|
||||
|
|
|
@ -725,9 +725,6 @@ func metalavaCmd(ctx android.ModuleContext, rule *android.RuleBuilder, javaVersi
|
|||
}
|
||||
|
||||
cmd.Flag(config.MetalavaFlags)
|
||||
if ctx.DeviceConfig().HideFlaggedApis() {
|
||||
cmd.Flag(config.MetalavaHideFlaggedApis)
|
||||
}
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
|
|
@ -22,8 +22,6 @@ import (
|
|||
"testing"
|
||||
|
||||
"android/soong/android"
|
||||
|
||||
"github.com/google/blueprint/proptools"
|
||||
)
|
||||
|
||||
func TestDroidstubs(t *testing.T) {
|
||||
|
@ -364,38 +362,6 @@ func TestGeneratedApiContributionVisibilityTest(t *testing.T) {
|
|||
ctx.ModuleForTests("bar", "android_common")
|
||||
}
|
||||
|
||||
func TestDroidstubsHideFlaggedApi(t *testing.T) {
|
||||
result := android.GroupFixturePreparers(
|
||||
prepareForJavaTest,
|
||||
android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) {
|
||||
variables.NextReleaseHideFlaggedApi = proptools.BoolPtr(true)
|
||||
variables.Release_expose_flagged_api = proptools.BoolPtr(false)
|
||||
}),
|
||||
android.FixtureMergeMockFs(map[string][]byte{
|
||||
"a/A.java": nil,
|
||||
"a/current.txt": nil,
|
||||
"a/removed.txt": nil,
|
||||
}),
|
||||
).RunTestWithBp(t, `
|
||||
droidstubs {
|
||||
name: "foo",
|
||||
srcs: ["a/A.java"],
|
||||
api_surface: "public",
|
||||
check_api: {
|
||||
current: {
|
||||
api_file: "a/current.txt",
|
||||
removed_api_file: "a/removed.txt",
|
||||
}
|
||||
},
|
||||
}
|
||||
`)
|
||||
|
||||
m := result.ModuleForTests("foo", "android_common")
|
||||
manifest := m.Output("metalava.sbox.textproto")
|
||||
cmdline := String(android.RuleBuilderSboxProtoForTests(t, result.TestContext, manifest).Commands[0].Command)
|
||||
android.AssertStringDoesContain(t, "flagged api hide command not included", cmdline, "--revert-annotation android.annotation.FlaggedApi")
|
||||
}
|
||||
|
||||
func TestAconfigDeclarations(t *testing.T) {
|
||||
result := android.GroupFixturePreparers(
|
||||
prepareForJavaTest,
|
||||
|
|
Loading…
Reference in a new issue