Add whitelist flag for --incompatible_disallow_legacy_javainfo.
Progress on #5821
RELNOTES: There is a new flag available `--experimental_java_common_create_provider_enabled_packages` that acts as a whitelist for usages of `java_common.create_provider`. The constructor will be deprecated in Bazel 0.23.
PiperOrigin-RevId: 228164706
diff --git a/src/test/java/com/google/devtools/build/lib/packages/SkylarkSemanticsConsistencyTest.java b/src/test/java/com/google/devtools/build/lib/packages/SkylarkSemanticsConsistencyTest.java
index c5ace03..d74369b 100644
--- a/src/test/java/com/google/devtools/build/lib/packages/SkylarkSemanticsConsistencyTest.java
+++ b/src/test/java/com/google/devtools/build/lib/packages/SkylarkSemanticsConsistencyTest.java
@@ -125,6 +125,10 @@
+ rand.nextDouble(),
"--experimental_enable_android_migration_apis=" + rand.nextBoolean(),
"--experimental_enable_repo_mapping=" + rand.nextBoolean(),
+ "--experimental_java_common_create_provider_enabled_packages="
+ + rand.nextDouble()
+ + ","
+ + rand.nextDouble(),
"--experimental_platforms_api=" + rand.nextBoolean(),
"--experimental_remap_main_repo=" + rand.nextBoolean(),
"--experimental_starlark_config_transitions=" + rand.nextBoolean(),
@@ -171,6 +175,8 @@
ImmutableList.of(String.valueOf(rand.nextDouble()), String.valueOf(rand.nextDouble())))
.experimentalEnableAndroidMigrationApis(rand.nextBoolean())
.experimentalEnableRepoMapping(rand.nextBoolean())
+ .experimentalJavaCommonCreateProviderEnabledPackages(
+ ImmutableList.of(String.valueOf(rand.nextDouble()), String.valueOf(rand.nextDouble())))
.experimentalPlatformsApi(rand.nextBoolean())
.experimentalRemapMainRepo(rand.nextBoolean())
.experimentalStarlarkConfigTransitions(rand.nextBoolean())