Put all Android native provider SkylarkCallable methods behind the
FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS flag.

RELNOTES: None.
PiperOrigin-RevId: 239482490
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidAssetsInfoApi.java b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidAssetsInfoApi.java
index 439dd99..42b5b62 100644
--- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidAssetsInfoApi.java
+++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidAssetsInfoApi.java
@@ -26,6 +26,7 @@
 import com.google.devtools.build.lib.skylarkinterface.SkylarkModuleCategory;
 import com.google.devtools.build.lib.syntax.EvalException;
 import com.google.devtools.build.lib.syntax.SkylarkNestedSet;
+import com.google.devtools.build.lib.syntax.StarlarkSemantics.FlagIdentifier;
 import javax.annotation.Nullable;
 
 /** Provides information about transitive Android assets. */
@@ -43,7 +44,12 @@
   /** The name of the provider for this info object. */
   String NAME = "AndroidAssetsInfo";
 
-  @SkylarkCallable(name = "label", structField = true, doc = "", documented = false)
+  @SkylarkCallable(
+      name = "label",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   Label getLabel();
 
   @SkylarkCallable(
@@ -57,11 +63,17 @@
               + " in native code, this artifact is added to the top-level output group (so"
               + " validation is only done if the target is requested on the command line). The"
               + " contents of this artifact are subject to change and should not be relied upon.",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   @Nullable
   FileApi getValidationResult();
 
-  @SkylarkCallable(name = "direct_parsed_assets", structField = true, doc = "", documented = false)
+  @SkylarkCallable(
+      name = "direct_parsed_assets",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   NestedSet<AssetsT> getDirectParsedAssets();
 
   /** Returns the local assets for the target. */
@@ -70,7 +82,8 @@
       doc = "Returns the local assets for the target.",
       documented = false,
       allowReturnNones = true,
-      structField = true)
+      structField = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   ImmutableList<FileT> getLocalAssets();
 
   /** Returns the local asset dir for the target. */
@@ -79,23 +92,40 @@
       doc = "Returns the local asset directory for the target.",
       documented = false,
       allowReturnNones = true,
-      structField = true)
+      structField = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   String getLocalAssetDir();
 
   @SkylarkCallable(
       name = "transitive_parsed_assets",
       structField = true,
       doc = "",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   NestedSet<AssetsT> getTransitiveParsedAssets();
 
-  @SkylarkCallable(name = "assets", structField = true, doc = "", documented = false)
+  @SkylarkCallable(
+      name = "assets",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   NestedSet<FileT> getAssets();
 
-  @SkylarkCallable(name = "symbols", structField = true, doc = "", documented = false)
+  @SkylarkCallable(
+      name = "symbols",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   NestedSet<FileT> getSymbols();
 
-  @SkylarkCallable(name = "compiled_symbols", structField = true, doc = "", documented = false)
+  @SkylarkCallable(
+      name = "compiled_symbols",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   NestedSet<FileT> getCompiledSymbols();
 
   /** The provider implementing this can construct the AndroidAssetsInfo provider. */
@@ -112,6 +142,7 @@
         name = NAME,
         doc = "The <code>AndroidAssetsInfo</code> constructor.",
         documented = false,
+        enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS,
         parameters = {
           @Param(
               name = "label",
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidBinaryDataInfoApi.java b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidBinaryDataInfoApi.java
index 98230f4..c37512f 100644
--- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidBinaryDataInfoApi.java
+++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidBinaryDataInfoApi.java
@@ -18,6 +18,7 @@
 import com.google.devtools.build.lib.skylarkinterface.SkylarkCallable;
 import com.google.devtools.build.lib.skylarkinterface.SkylarkModule;
 import com.google.devtools.build.lib.skylarkinterface.SkylarkModuleCategory;
+import com.google.devtools.build.lib.syntax.StarlarkSemantics.FlagIdentifier;
 
 /**
  * Provides information on Android resource, asset, and manifest information specific to binaries.
@@ -40,13 +41,15 @@
       name = "resource_apk",
       structField = true,
       doc = "The resource apk.",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   FileT getApk();
 
   @SkylarkCallable(
       name = "resource_proguard_config",
       structField = true,
       doc = "Proguard config generated for the resources.",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   FileT getResourceProguardConfig();
 }
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidCcLinkParamsProviderApi.java b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidCcLinkParamsProviderApi.java
index cfc9524..6bf17cf 100644
--- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidCcLinkParamsProviderApi.java
+++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidCcLinkParamsProviderApi.java
@@ -23,6 +23,7 @@
 import com.google.devtools.build.lib.skylarkinterface.SkylarkModule;
 import com.google.devtools.build.lib.skylarkinterface.SkylarkModuleCategory;
 import com.google.devtools.build.lib.syntax.EvalException;
+import com.google.devtools.build.lib.syntax.StarlarkSemantics.FlagIdentifier;
 
 /** A target that provides C++ libraries to be linked into Android targets. */
 @SkylarkModule(
@@ -38,7 +39,12 @@
   String NAME = "AndroidCcLinkParamsInfo";
 
   /** Returns the cc link params. */
-  @SkylarkCallable(name = "link_params", structField = true, doc = "", documented = false)
+  @SkylarkCallable(
+      name = "link_params",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   T getLinkParams();
 
   /** The provider implementing this can construct the AndroidCcLinkParamsInfo provider. */
@@ -54,6 +60,7 @@
         name = NAME,
         doc = "The <code>AndroidCcLinkParamsInfo</code> constructor.",
         documented = false,
+        enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS,
         parameters = {
           @Param(
               name = "store",
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidConfigurationApi.java b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidConfigurationApi.java
index 30f8109..42be042f 100644
--- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidConfigurationApi.java
+++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidConfigurationApi.java
@@ -17,6 +17,7 @@
 import com.google.devtools.build.lib.skylarkinterface.SkylarkCallable;
 import com.google.devtools.build.lib.skylarkinterface.SkylarkModule;
 import com.google.devtools.build.lib.skylarkinterface.SkylarkModuleCategory;
+import com.google.devtools.build.lib.syntax.StarlarkSemantics.FlagIdentifier;
 
 /** Configuration fragment for Android rules. */
 @SkylarkModule(
@@ -33,137 +34,185 @@
       name = "android_cpu",
       structField = true,
       doc = "The Android target CPU.",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   String getCpu();
 
   @SkylarkCallable(
       name = "use_incremental_dexing",
       structField = true,
       doc = "",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   boolean useIncrementalDexing();
 
   @SkylarkCallable(
       name = "incremental_dexing_shards_after_proguard",
       structField = true,
       doc = "",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   int incrementalDexingShardsAfterProguard();
 
   @SkylarkCallable(
       name = "incremental_dexing_use_dex_sharder",
       structField = true,
       doc = "",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   boolean incrementalDexingUseDexSharder();
 
   @SkylarkCallable(
       name = "incremental_dexing_after_proguard_by_default",
       structField = true,
       doc = "",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   boolean incrementalDexingAfterProguardByDefault();
 
-  @SkylarkCallable(name = "apk_signing_method_v1", structField = true, doc = "", documented = false)
+  @SkylarkCallable(
+      name = "apk_signing_method_v1",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   boolean apkSigningMethodV1();
 
-  @SkylarkCallable(name = "apk_signing_method_v2", structField = true, doc = "", documented = false)
-  boolean apkSigningMethodV2();;
+  @SkylarkCallable(
+      name = "apk_signing_method_v2",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
+  boolean apkSigningMethodV2();
+  ;
 
   @SkylarkCallable(
       name = "assume_min_sdk_version",
       structField = true,
       doc = "",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   boolean assumeMinSdkVersion();
 
   @SkylarkCallable(
       name = "get_dexopts_supported_in_incremental_dexing",
       structField = true,
       doc = "",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   ImmutableList<String> getDexoptsSupportedInIncrementalDexing();
 
   @SkylarkCallable(
       name = "get_dexopts_supported_in_dex_merger",
       structField = true,
       doc = "",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   ImmutableList<String> getDexoptsSupportedInDexMerger();
 
   @SkylarkCallable(
       name = "get_target_dexopts_that_prevent_incremental_dexing",
       structField = true,
       doc = "",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   ImmutableList<String> getTargetDexoptsThatPreventIncrementalDexing();
 
   @SkylarkCallable(
       name = "use_workers_with_dexbuilder",
       structField = true,
       doc = "",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   boolean useWorkersWithDexbuilder();
 
-  @SkylarkCallable(name = "desugar_java8", structField = true, doc = "", documented = false)
+  @SkylarkCallable(
+      name = "desugar_java8",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   boolean desugarJava8();
 
-  @SkylarkCallable(name = "get_output_driecot", structField = true, doc = "", documented = false)
+  @SkylarkCallable(
+      name = "get_output_driecot",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   boolean desugarJava8Libs();
 
-  @SkylarkCallable(name = "check_desugar_deps", structField = true, doc = "", documented = false)
+  @SkylarkCallable(
+      name = "check_desugar_deps",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   boolean checkDesugarDeps();
 
   @SkylarkCallable(
       name = "use_rex_to_compress_dex_files",
       structField = true,
       doc = "",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   boolean useRexToCompressDexFiles();
 
   @SkylarkCallable(
       name = "use_android_resource_shrinking",
       structField = true,
       doc = "",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   boolean useAndroidResourceShrinking();
 
   @SkylarkCallable(
       name = "use_android_resource_cycle_shrinking",
       structField = true,
       doc = "",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   boolean useAndroidResourceCycleShrinking();
 
   @SkylarkCallable(
       name = "use_single_jar_apk_builder",
       structField = true,
       doc = "",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   boolean useSingleJarApkBuilder();
 
-  @SkylarkCallable(name = "use_parallel_dex2oat", structField = true, doc = "", documented = false)
+  @SkylarkCallable(
+      name = "use_parallel_dex2oat",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   boolean useParallelDex2Oat();
 
   @SkylarkCallable(
       name = "compress_java_resources",
       structField = true,
       doc = "",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   boolean compressJavaResources();
 
   @SkylarkCallable(
       name = "get_exports_manifest_default",
       structField = true,
       doc = "",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   boolean getExportsManifestDefault();
 
   @SkylarkCallable(
       name = "use_aapt2_for_robolectric",
       structField = true,
       doc = "",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   boolean useAapt2ForRobolectric();
 
   /**
@@ -174,54 +223,71 @@
       name = "throw_on_resource_conflict",
       structField = true,
       doc = "",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   boolean throwOnResourceConflict();
 
-  @SkylarkCallable(name = "skip_parsing_action", structField = true, doc = "", documented = false)
+  @SkylarkCallable(
+      name = "skip_parsing_action",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   boolean skipParsingAction();
 
   @SkylarkCallable(
       name = "fixed_resource_neverlinking",
       structField = true,
       doc = "",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   boolean fixedResourceNeverlinking();
 
   @SkylarkCallable(
       name = "check_for_migration_tag",
       structField = true,
       doc = "",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   boolean checkForMigrationTag();
 
   @SkylarkCallable(
       name = "get_one_version_enforcement_use_transitive_jars_for_binary_under_test",
       structField = true,
       doc = "",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   boolean getOneVersionEnforcementUseTransitiveJarsForBinaryUnderTest();
 
-  @SkylarkCallable(name = "use_databinding_v2", structField = true, doc = "", documented = false)
+  @SkylarkCallable(
+      name = "use_databinding_v2",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   boolean useDataBindingV2();
 
   @SkylarkCallable(
       name = "android_databinding_use_v3_4_args",
       structField = true,
       doc = "",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   boolean useDataBindingUpdatedArgs();
 
   @SkylarkCallable(
       name = "persistent_busybox_tools",
       structField = true,
       doc = "",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   boolean persistentBusyboxTools();
 
   @SkylarkCallable(
       name = "get_output_directory_name",
       structField = true,
       doc = "",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   String getOutputDirectoryName();
 }
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidDataProcessingApi.java b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidDataProcessingApi.java
index 87cfbb8..04e6508 100644
--- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidDataProcessingApi.java
+++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidDataProcessingApi.java
@@ -26,6 +26,7 @@
 import com.google.devtools.build.lib.syntax.EvalException;
 import com.google.devtools.build.lib.syntax.SkylarkDict;
 import com.google.devtools.build.lib.syntax.SkylarkList;
+import com.google.devtools.build.lib.syntax.StarlarkSemantics.FlagIdentifier;
 
 /** Skylark-visible methods for working with Android data (manifests, resources, and assets). */
 @SkylarkModule(
@@ -74,7 +75,8 @@
           "Creates an AndroidAssetsInfoApi from this target's asset dependencies, ignoring local"
               + " assets. No processing will be done. This method is deprecated and exposed only"
               + " for backwards-compatibility with existing behavior.",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   AndroidAssetsInfoT assetsFromDeps(
       SkylarkList<AndroidAssetsInfoT> deps, boolean neverlink, Environment env);
 
@@ -125,7 +127,8 @@
               + " and exposed only for backwards-compatibility with existing behavior. An empty"
               + " manifest will be generated and included in the provider - this path should  not"
               + " be used when an explicit manifest is specified.",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   AndroidResourcesInfoT resourcesFromDeps(
       AndroidDataContextT ctx,
       SkylarkList<AndroidResourcesInfoT> deps,
@@ -178,7 +181,8 @@
       useLocation = true,
       useEnvironment = true,
       doc = "Stamps a manifest with package information.",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   AndroidManifestInfoT stampAndroidManifest(
       AndroidDataContextT ctx,
       Object manifest,
@@ -245,7 +249,8 @@
               + " by default, actions for validating the merge are created but may not be called."
               + " You may want to force these actions to be called - see the 'validation_result'"
               + " field in AndroidAssetsInfoApi",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   AndroidAssetsInfoT mergeAssets(
       AndroidDataContextT ctx,
       Object assets,
@@ -321,7 +326,8 @@
               + " refers to are available. Note that this method might do additional processing to"
               + " this manifest, so in the future, you may want to use the manifest contained in"
               + " this method's output instead of this one.",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   SkylarkDict<? extends ProviderApi, ? extends StructApi> mergeResources(
       AndroidDataContextT ctx,
       AndroidManifestInfoT manifest,
@@ -396,7 +402,8 @@
           "Builds an AAR and corresponding provider for this target. The resource and asset"
               + " providers from this same target must both be passed, as must the class JAR output"
               + " of building the Android Java library.",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   AndroidLibraryAarInfoT makeAar(
       AndroidDataContextT ctx,
       AndroidResourcesInfoT resourcesInfo,
@@ -529,7 +536,8 @@
       doc =
           "Performs full processing of data for android_library or similar rules. Returns a dict"
               + " from provider type to providers for the target.",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   SkylarkDict<? extends ProviderApi, ? extends StructApi> processLibraryData(
       AndroidDataContextT cotx,
       FileT libraryClassJar,
@@ -584,7 +592,8 @@
             doc = "Targets to inherit asset and resource dependencies from.")
       },
       doc = "Processes assets, resources, and manifest for aar_import targets",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   SkylarkDict<? extends ProviderApi, ? extends StructApi> processAarImportData(
       AndroidDataContextT ctx,
       SpecialFileT resources,
@@ -696,7 +705,8 @@
       doc =
           "Processes resources, assets, and manifests for android_local_test and returns a dict"
               + " from provider type to the appropriate provider.",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   SkylarkDict<? extends ProviderApi, ? extends StructApi> processLocalTestData(
       AndroidDataContextT ctx,
       Object manifest,
@@ -777,7 +787,8 @@
       doc =
           "Returns a wrapper object containing various settings shared across multiple methods for"
               + " processing binary data.",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   AndroidBinaryDataSettingsApi makeBinarySettings(
       AndroidDataContextT ctx,
       Object shrinkResources,
@@ -910,7 +921,8 @@
       doc =
           "Processes resources, assets, and manifests for android_binary and returns the"
               + " appropriate providers.",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   AndroidBinaryDataInfoT processBinaryData(
       AndroidDataContextT ctx,
       SkylarkList<TransitiveInfoCollectionT> resources,
@@ -1001,7 +1013,8 @@
       doc =
           "Possibly shrinks the data APK by removing resources that were marked as unused during"
               + " proguarding.",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   AndroidBinaryDataInfoT shrinkDataApk(
       AndroidDataContextT ctx,
       AndroidBinaryDataInfoT binaryDataInfo,
@@ -1020,6 +1033,7 @@
       allowReturnNones = true,
       doc = "Returns an Artifact containing a zip of merged resources.",
       documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS,
       parameters = {
         @Param(
             name = "validated_res",
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidDeviceBrokerInfoApi.java b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidDeviceBrokerInfoApi.java
index d292cbc..0cf86c0 100644
--- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidDeviceBrokerInfoApi.java
+++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidDeviceBrokerInfoApi.java
@@ -20,6 +20,7 @@
 import com.google.devtools.build.lib.skylarkinterface.SkylarkConstructor;
 import com.google.devtools.build.lib.skylarkinterface.SkylarkModule;
 import com.google.devtools.build.lib.syntax.EvalException;
+import com.google.devtools.build.lib.syntax.StarlarkSemantics.FlagIdentifier;
 
 /** Supplies the device broker type string, passed to the Android test runtime. */
 @SkylarkModule(
@@ -57,7 +58,8 @@
                   "The type of device broker that is appropriate to use to interact with "
                       + "devices")
         },
-        selfCall = true)
+        selfCall = true,
+        enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
     @SkylarkConstructor(objectType = AndroidDeviceBrokerInfoApi.class)
     public AndroidDeviceBrokerInfoApi createInfo(String type) throws EvalException;
   }
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidFeatureFlagSetProviderApi.java b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidFeatureFlagSetProviderApi.java
index 1ab55d9..6221612 100644
--- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidFeatureFlagSetProviderApi.java
+++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidFeatureFlagSetProviderApi.java
@@ -24,6 +24,7 @@
 import com.google.devtools.build.lib.skylarkinterface.SkylarkModuleCategory;
 import com.google.devtools.build.lib.syntax.EvalException;
 import com.google.devtools.build.lib.syntax.SkylarkDict;
+import com.google.devtools.build.lib.syntax.StarlarkSemantics.FlagIdentifier;
 
 /** */
 @SkylarkModule(
@@ -43,7 +44,8 @@
       name = "flags",
       doc = "Returns the flags contained by the provider.",
       documented = false,
-      structField = true)
+      structField = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   ImmutableMap<Label, String> getFlagMap();
 
   /** The provider implementing this can construct the AndroidIdeInfo provider. */
@@ -59,6 +61,7 @@
         name = NAME,
         doc = "The <code>AndroidFeatureFlagSetProvider</code> constructor.",
         documented = false,
+        enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS,
         parameters = {
           @Param(
               name = "flags",
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidIdeInfoProviderApi.java b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidIdeInfoProviderApi.java
index 205621f..4a43efa 100644
--- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidIdeInfoProviderApi.java
+++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidIdeInfoProviderApi.java
@@ -27,6 +27,7 @@
 import com.google.devtools.build.lib.syntax.SkylarkDict;
 import com.google.devtools.build.lib.syntax.SkylarkList;
 import com.google.devtools.build.lib.syntax.SkylarkNestedSet;
+import com.google.devtools.build.lib.syntax.StarlarkSemantics.FlagIdentifier;
 import javax.annotation.Nullable;
 
 /**
@@ -52,7 +53,8 @@
       structField = true,
       doc = "",
       documented = false,
-      allowReturnNones = true)
+      allowReturnNones = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   @Nullable
   String getJavaPackage();
 
@@ -62,7 +64,8 @@
       structField = true,
       doc = "",
       documented = false,
-      allowReturnNones = true)
+      allowReturnNones = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   @Nullable
   FileT getManifest();
 
@@ -72,7 +75,8 @@
       structField = true,
       doc = "",
       documented = false,
-      allowReturnNones = true)
+      allowReturnNones = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   @Nullable
   FileT getGeneratedManifest();
 
@@ -81,7 +85,8 @@
       structField = true,
       doc = "",
       documented = false,
-      allowReturnNones = true)
+      allowReturnNones = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   @Nullable
   String getIdlImportRoot();
 
@@ -94,7 +99,8 @@
       name = "idl_generated_java_files",
       structField = true,
       doc = "",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   ImmutableCollection<FileT> getIdlGeneratedJavaFiles();
 
   @SkylarkCallable(
@@ -102,7 +108,8 @@
       structField = true,
       doc = "",
       documented = false,
-      allowReturnNones = true)
+      allowReturnNones = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   @Nullable
   FileT getIdlSourceJar();
 
@@ -111,7 +118,8 @@
       structField = true,
       doc = "",
       documented = false,
-      allowReturnNones = true)
+      allowReturnNones = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   @Nullable
   FileT getIdlClassJar();
 
@@ -123,7 +131,8 @@
       name = "defines_android_resources",
       structField = true,
       doc = "",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   boolean definesAndroidResources();
 
   @SkylarkCallable(
@@ -131,7 +140,8 @@
       structField = true,
       doc = "",
       documented = false,
-      allowReturnNones = true)
+      allowReturnNones = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   @Nullable
   OutputJarT getResourceJar();
 
@@ -140,7 +150,8 @@
       structField = true,
       doc = "",
       documented = false,
-      allowReturnNones = true)
+      allowReturnNones = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   @Nullable
   FileT getResourceApk();
 
@@ -150,7 +161,8 @@
       structField = true,
       doc = "",
       documented = false,
-      allowReturnNones = true)
+      allowReturnNones = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   @Nullable
   FileT getSignedApk();
 
@@ -159,16 +171,27 @@
       structField = true,
       doc = "",
       documented = false,
-      allowReturnNones = true)
+      allowReturnNones = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   @Nullable
   FileT getAar();
 
   /** A list of the APKs related to the app under test, if any. */
-  @SkylarkCallable(name = "apks_under_test", structField = true, doc = "", documented = false)
+  @SkylarkCallable(
+      name = "apks_under_test",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   ImmutableCollection<FileT> getApksUnderTest();
 
   /** A map, keyed on architecture, of the native libs for the app, if any. */
-  @SkylarkCallable(name = "native_libs", structField = true, doc = "", documented = false)
+  @SkylarkCallable(
+      name = "native_libs",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   ImmutableMap<String, SkylarkNestedSet> getNativeLibsSkylark();
 
   /** The provider implementing this can construct the AndroidIdeInfo provider. */
@@ -185,6 +208,7 @@
         name = NAME,
         doc = "The <code>AndroidIdeInfo</code> constructor.",
         documented = false,
+        enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS,
         parameters = {
           @Param(
               name = "java_package",
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidIdlProviderApi.java b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidIdlProviderApi.java
index 2d57de2..4920560 100644
--- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidIdlProviderApi.java
+++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidIdlProviderApi.java
@@ -24,6 +24,7 @@
 import com.google.devtools.build.lib.skylarkinterface.SkylarkModuleCategory;
 import com.google.devtools.build.lib.syntax.EvalException;
 import com.google.devtools.build.lib.syntax.SkylarkNestedSet;
+import com.google.devtools.build.lib.syntax.StarlarkSemantics.FlagIdentifier;
 
 /**
  * Configured targets implementing this provider can contribute Android IDL information to the
@@ -47,7 +48,8 @@
       name = "transitive_idl_import_roots",
       structField = true,
       doc = "Returns a depset of strings of all the idl import roots.",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   NestedSet<String> getTransitiveIdlImportRoots();
 
   /** The IDL files in the transitive closure. */
@@ -55,7 +57,8 @@
       name = "transitive_idl_imports",
       structField = true,
       doc = "Returns a depset of artifacts of all the idl imports.",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   NestedSet<FileT> getTransitiveIdlImports();
 
   /** The IDL jars in the transitive closure, both class and source jars. */
@@ -63,7 +66,8 @@
       name = "transitive_idl_jars",
       structField = true,
       doc = "Returns a depset of artifacts of all the idl class and source jars.",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   NestedSet<FileT> getTransitiveIdlJars();
 
   /** The preprocessed IDL files in the transitive closure. */
@@ -71,7 +75,8 @@
       name = "transitive_idl_preprocessed",
       structField = true,
       doc = "Returns a depset of artifacts of all the idl preprocessed files.",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   NestedSet<FileT> getTransitiveIdlPreprocessed();
 
   /** The provider implementing this can construct the AndroidIdlInfo provider. */
@@ -87,6 +92,7 @@
         name = NAME,
         doc = "The <code>AndroidIdlInfo</code> constructor.",
         documented = false,
+        enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS,
         parameters = {
           @Param(
               name = "transitive_idl_import_roots",
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidInstrumentationInfoApi.java b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidInstrumentationInfoApi.java
index ec9dc5b..7601da8 100644
--- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidInstrumentationInfoApi.java
+++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidInstrumentationInfoApi.java
@@ -22,6 +22,7 @@
 import com.google.devtools.build.lib.skylarkinterface.SkylarkModule;
 import com.google.devtools.build.lib.skylarkinterface.SkylarkModuleCategory;
 import com.google.devtools.build.lib.syntax.EvalException;
+import com.google.devtools.build.lib.syntax.StarlarkSemantics.FlagIdentifier;
 
 /**
  * A provider for targets that create Android instrumentations. Consumed by Android testing rules.
@@ -52,7 +53,8 @@
       name = "instrumentation_apk",
       doc = "Returns the instrumentation APK that should be executed.",
       documented = false,
-      structField = true)
+      structField = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   FileT getInstrumentationApk();
 
   /** Provider for {@link AndroidInstrumentationInfoApi}. */
@@ -69,6 +71,7 @@
         name = "AndroidInstrumentationInfo",
         doc = "The <code>AndroidInstrumentationInfo</code> constructor.",
         documented = false,
+        enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS,
         parameters = {
           @Param(
               name = "target_apk",
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidLibraryAarInfoApi.java b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidLibraryAarInfoApi.java
index d2467f9..163ea6f 100644
--- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidLibraryAarInfoApi.java
+++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidLibraryAarInfoApi.java
@@ -19,6 +19,7 @@
 import com.google.devtools.build.lib.skylarkinterface.SkylarkCallable;
 import com.google.devtools.build.lib.skylarkinterface.SkylarkModule;
 import com.google.devtools.build.lib.skylarkinterface.SkylarkModuleCategory;
+import com.google.devtools.build.lib.syntax.StarlarkSemantics.FlagIdentifier;
 
 /** A target that can provide the aar artifact of Android libraries */
 @SkylarkModule(
@@ -39,13 +40,15 @@
       doc = "",
       documented = false,
       structField = true,
-      allowReturnNones = true)
+      allowReturnNones = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   FileT getAarArtifact();
 
   @SkylarkCallable(
       name = "transitive_aar_artifacts",
       doc = "",
       documented = false,
-      structField = true)
+      structField = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   NestedSet<FileT> getTransitiveAarArtifacts();
 }
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidLibraryResourceClassJarProviderApi.java b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidLibraryResourceClassJarProviderApi.java
index 6b6a87f..dae9da6 100644
--- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidLibraryResourceClassJarProviderApi.java
+++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidLibraryResourceClassJarProviderApi.java
@@ -24,6 +24,7 @@
 import com.google.devtools.build.lib.skylarkinterface.SkylarkModuleCategory;
 import com.google.devtools.build.lib.syntax.EvalException;
 import com.google.devtools.build.lib.syntax.SkylarkNestedSet;
+import com.google.devtools.build.lib.syntax.StarlarkSemantics.FlagIdentifier;
 
 /** Provides resource class jars from android_library rules. */
 @SkylarkModule(
@@ -39,7 +40,12 @@
   /** The name of the provider for this info object. */
   String NAME = "AndroidLibraryResourceClassJarProvider";
 
-  @SkylarkCallable(name = "jars", structField = true, doc = "", documented = false)
+  @SkylarkCallable(
+      name = "jars",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   NestedSet<FileT> getResourceClassJars();
 
   /** The provider implementing this can construct the AndroidLibraryResourceClassJarProvider. */
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidManifestInfoApi.java b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidManifestInfoApi.java
index 7af2cf5..58c55dd 100644
--- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidManifestInfoApi.java
+++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidManifestInfoApi.java
@@ -18,6 +18,7 @@
 import com.google.devtools.build.lib.skylarkinterface.SkylarkCallable;
 import com.google.devtools.build.lib.skylarkinterface.SkylarkModule;
 import com.google.devtools.build.lib.skylarkinterface.SkylarkModuleCategory;
+import com.google.devtools.build.lib.syntax.StarlarkSemantics.FlagIdentifier;
 
 /** A provider of information about this target's manifest. */
 @SkylarkModule(
@@ -37,20 +38,23 @@
       name = "manifest",
       doc = "This target's manifest, merged with manifests from dependencies",
       documented = false,
-      structField = true)
+      structField = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   FileT getManifest();
 
   @SkylarkCallable(
       name = "package",
       doc = "This target's package",
       documented = false,
-      structField = true)
+      structField = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   String getPackage();
 
   @SkylarkCallable(
       name = "exports_manifest",
       doc = "If this manifest should be exported to targets that depend on it",
       documented = false,
-      structField = true)
+      structField = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   boolean exportsManifest();
 }
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidNativeLibsInfoApi.java b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidNativeLibsInfoApi.java
index d6781221..825d4ec 100644
--- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidNativeLibsInfoApi.java
+++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidNativeLibsInfoApi.java
@@ -23,6 +23,7 @@
 import com.google.devtools.build.lib.skylarkinterface.SkylarkModule;
 import com.google.devtools.build.lib.syntax.EvalException;
 import com.google.devtools.build.lib.syntax.SkylarkNestedSet;
+import com.google.devtools.build.lib.syntax.StarlarkSemantics.FlagIdentifier;
 
 /**
  * Provider of transitively available ZIPs of native libs that should be directly copied into the
@@ -45,7 +46,8 @@
       name = "native_libs",
       doc = "Returns the native libraries produced by the rule.",
       documented = false,
-      structField = true)
+      structField = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   NestedSet<FileT> getNativeLibs();
 
   /** Provider for {@link AndroidNativeLibsInfoApi}. */
@@ -61,6 +63,7 @@
         name = "AndroidNativeLibsInfo",
         doc = "The <code>AndroidNativeLibsInfo</code> constructor.",
         documented = false,
+        enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS,
         parameters = {
           @Param(
               name = "native_libs",
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidPreDexJarProviderApi.java b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidPreDexJarProviderApi.java
index ca570cb..3456c87 100644
--- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidPreDexJarProviderApi.java
+++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidPreDexJarProviderApi.java
@@ -23,6 +23,7 @@
 import com.google.devtools.build.lib.skylarkinterface.SkylarkModule;
 import com.google.devtools.build.lib.skylarkinterface.SkylarkModuleCategory;
 import com.google.devtools.build.lib.syntax.EvalException;
+import com.google.devtools.build.lib.syntax.StarlarkSemantics.FlagIdentifier;
 
 /** A provider of the final Jar to be dexed for targets that build APKs. */
 @SkylarkModule(
@@ -38,7 +39,12 @@
   String NAME = "AndroidPreDexJarInfo";
 
   /** Returns the jar to be dexed. */
-  @SkylarkCallable(name = "pre_dex_jar", structField = true, doc = "", documented = false)
+  @SkylarkCallable(
+      name = "pre_dex_jar",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   FileT getPreDexJar();
 
   /** The provider implementing this can construct the AndroidPreDexJarInfo provider. */
@@ -54,6 +60,7 @@
         name = NAME,
         doc = "The <code>AndroidPreDexJarInfo</code> constructor.",
         documented = false,
+        enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS,
         parameters = {
           @Param(
               name = "pre_dex_jar",
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidProguardInfoApi.java b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidProguardInfoApi.java
index 8bfa902..22ab89b 100644
--- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidProguardInfoApi.java
+++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidProguardInfoApi.java
@@ -23,6 +23,7 @@
 import com.google.devtools.build.lib.skylarkinterface.SkylarkModule;
 import com.google.devtools.build.lib.syntax.EvalException;
 import com.google.devtools.build.lib.syntax.SkylarkList;
+import com.google.devtools.build.lib.syntax.StarlarkSemantics.FlagIdentifier;
 
 /** A target that can provide local proguard specifications. */
 @SkylarkModule(
@@ -39,7 +40,8 @@
       name = "local_proguard_specs",
       structField = true,
       doc = "Returns the local proguard specs defined by this target.",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   ImmutableList<FileT> getLocalProguardSpecs();
 
   /** The provider implementing this can construct the AndroidProguardInfo provider. */
@@ -55,6 +57,7 @@
         name = NAME,
         doc = "The <code>AndroidProguardInfo</code> constructor.",
         documented = false,
+        enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS,
         parameters = {
           @Param(
               name = "local_proguard_specs",
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidResourcesInfoApi.java b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidResourcesInfoApi.java
index b0e580e..7bbb458 100644
--- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidResourcesInfoApi.java
+++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidResourcesInfoApi.java
@@ -25,6 +25,7 @@
 import com.google.devtools.build.lib.skylarkinterface.SkylarkModuleCategory;
 import com.google.devtools.build.lib.syntax.EvalException;
 import com.google.devtools.build.lib.syntax.SkylarkNestedSet;
+import com.google.devtools.build.lib.syntax.StarlarkSemantics.FlagIdentifier;
 
 /** A provider that supplies resource information from its transitive closure. */
 @SkylarkModule(
@@ -51,10 +52,16 @@
       name = "label",
       doc = "Returns the label that is associated with this piece of information.",
       documented = false,
-      structField = true)
+      structField = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   Label getLabel();
 
-  @SkylarkCallable(name = "manifest", doc = "", documented = false, structField = true)
+  @SkylarkCallable(
+      name = "manifest",
+      doc = "",
+      documented = false,
+      structField = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   AndroidManifestInfoT getManifest();
 
   /** Returns the compiletime r.txt file for the target. */
@@ -65,7 +72,8 @@
               + " stubbed out compiletime file and should not be built into APKs, inherited from"
               + " dependencies, or used at runtime.",
       documented = false,
-      structField = true)
+      structField = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   FileT getRTxt();
 
   /** Returns the transitive ResourceContainers for the label. */
@@ -73,7 +81,8 @@
       name = "transitive_android_resources",
       doc = "Returns the transitive ResourceContainers for the label.",
       documented = false,
-      structField = true)
+      structField = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   NestedSet<ValidatedAndroidDataT> getTransitiveAndroidResources();
 
   /** Returns the immediate ResourceContainers for the label. */
@@ -81,40 +90,64 @@
       name = "direct_android_resources",
       doc = "Returns the immediate ResourceContainers for the label.",
       documented = false,
-      structField = true)
+      structField = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   NestedSet<ValidatedAndroidDataT> getDirectAndroidResources();
 
-  @SkylarkCallable(name = "transitive_resources", doc = "", documented = false, structField = true)
+  @SkylarkCallable(
+      name = "transitive_resources",
+      doc = "",
+      documented = false,
+      structField = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   NestedSet<FileT> getTransitiveResources();
 
-  @SkylarkCallable(name = "transitive_manifests", doc = "", documented = false, structField = true)
+  @SkylarkCallable(
+      name = "transitive_manifests",
+      doc = "",
+      documented = false,
+      structField = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   NestedSet<FileT> getTransitiveManifests();
 
   @SkylarkCallable(
       name = "transitive_aapt2_r_txt",
       doc = "",
       documented = false,
-      structField = true)
+      structField = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   NestedSet<FileT> getTransitiveAapt2RTxt();
 
   @SkylarkCallable(
       name = "transitive_symbols_bin",
       doc = "",
       documented = false,
-      structField = true)
+      structField = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   NestedSet<FileT> getTransitiveSymbolsBin();
 
   @SkylarkCallable(
       name = "transitive_compiled_symbols",
       doc = "",
       documented = false,
-      structField = true)
+      structField = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   NestedSet<FileT> getTransitiveCompiledSymbols();
 
-  @SkylarkCallable(name = "transitive_static_lib", doc = "", documented = false, structField = true)
+  @SkylarkCallable(
+      name = "transitive_static_lib",
+      doc = "",
+      documented = false,
+      structField = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   NestedSet<FileT> getTransitiveStaticLib();
 
-  @SkylarkCallable(name = "transitive_r_txt", doc = "", documented = false, structField = true)
+  @SkylarkCallable(
+      name = "transitive_r_txt",
+      doc = "",
+      documented = false,
+      structField = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   NestedSet<FileT> getTransitiveRTxt();
 
   /** Provider for {@link AndroidResourcesInfoApi}. */
@@ -134,6 +167,7 @@
         name = "AndroidResourcesInfo",
         doc = "The <code>AndroidResourcesInfo</code> constructor.",
         documented = false,
+        enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS,
         parameters = {
           @Param(
               name = "label",
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidSdkProviderApi.java b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidSdkProviderApi.java
index 9f7d1f0..e7f2674 100644
--- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidSdkProviderApi.java
+++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidSdkProviderApi.java
@@ -23,6 +23,7 @@
 import com.google.devtools.build.lib.skylarkinterface.SkylarkConstructor;
 import com.google.devtools.build.lib.skylarkinterface.SkylarkModule;
 import com.google.devtools.build.lib.syntax.EvalException;
+import com.google.devtools.build.lib.syntax.StarlarkSemantics.FlagIdentifier;
 import javax.annotation.Nullable;
 
 /**
@@ -45,7 +46,12 @@
   String NAME = "AndroidSdkInfo";
 
   /** The value of build_tools_version. May be null or empty. */
-  @SkylarkCallable(name = "build_tools_version", structField = true, doc = "", documented = false)
+  @SkylarkCallable(
+      name = "build_tools_version",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   String getBuildToolsVersion();
 
   @SkylarkCallable(
@@ -53,7 +59,8 @@
       structField = true,
       doc = "",
       documented = false,
-      allowReturnNones = true)
+      allowReturnNones = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   FileT getFrameworkAidl();
 
   @SkylarkCallable(
@@ -61,11 +68,17 @@
       structField = true,
       doc = "",
       documented = false,
-      allowReturnNones = true)
+      allowReturnNones = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   @Nullable
   TransT getAidlLib();
 
-  @SkylarkCallable(name = "android_jar", structField = true, doc = "", documented = false)
+  @SkylarkCallable(
+      name = "android_jar",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   FileT getAndroidJar();
 
   @SkylarkCallable(
@@ -73,29 +86,65 @@
       structField = true,
       doc = "",
       documented = false,
-      allowReturnNones = true)
+      allowReturnNones = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   @Nullable
   FileT getSourceProperties();
 
-  @SkylarkCallable(name = "shrinked_android_jar", structField = true, doc = "", documented = false)
+  @SkylarkCallable(
+      name = "shrinked_android_jar",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   FileT getShrinkedAndroidJar();
 
-  @SkylarkCallable(name = "main_dex_classes", structField = true, doc = "", documented = false)
+  @SkylarkCallable(
+      name = "main_dex_classes",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   FileT getMainDexClasses();
 
-  @SkylarkCallable(name = "adb", structField = true, doc = "", documented = false)
+  @SkylarkCallable(
+      name = "adb",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   FilesToRunProviderT getAdb();
 
-  @SkylarkCallable(name = "dx", structField = true, doc = "", documented = false)
+  @SkylarkCallable(
+      name = "dx",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   FilesToRunProviderT getDx();
 
-  @SkylarkCallable(name = "main_dex_list_creator", structField = true, doc = "", documented = false)
+  @SkylarkCallable(
+      name = "main_dex_list_creator",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   FilesToRunProviderT getMainDexListCreator();
 
-  @SkylarkCallable(name = "aidl", structField = true, doc = "", documented = false)
+  @SkylarkCallable(
+      name = "aidl",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   FilesToRunProviderT getAidl();
 
-  @SkylarkCallable(name = "aapt", structField = true, doc = "", documented = false)
+  @SkylarkCallable(
+      name = "aapt",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   FilesToRunProviderT getAapt();
 
   @SkylarkCallable(
@@ -103,7 +152,8 @@
       structField = true,
       doc = "",
       documented = false,
-      allowReturnNones = true)
+      allowReturnNones = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   @Nullable
   FilesToRunProviderT getAapt2();
 
@@ -112,17 +162,33 @@
       structField = true,
       doc = "",
       documented = false,
-      allowReturnNones = true)
+      allowReturnNones = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   @Nullable
   FilesToRunProviderT getApkBuilder();
 
-  @SkylarkCallable(name = "apk_signer", structField = true, doc = "", documented = false)
+  @SkylarkCallable(
+      name = "apk_signer",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   FilesToRunProviderT getApkSigner();
 
-  @SkylarkCallable(name = "proguard", structField = true, doc = "", documented = false)
+  @SkylarkCallable(
+      name = "proguard",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   FilesToRunProviderT getProguard();
 
-  @SkylarkCallable(name = "zip_align", structField = true, doc = "", documented = false)
+  @SkylarkCallable(
+      name = "zip_align",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   FilesToRunProviderT getZipalign();
 
   /** The provider implementing this can construct the AndroidSdkInfo provider. */
@@ -142,6 +208,7 @@
         name = NAME,
         doc = "The <code>AndroidSdkInfo</code> constructor.",
         documented = false,
+        enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS,
         parameters = {
           @Param(
               name = "build_tools_version",
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidSkylarkApiProviderApi.java b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidSkylarkApiProviderApi.java
index be95a45..963ace1 100644
--- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidSkylarkApiProviderApi.java
+++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidSkylarkApiProviderApi.java
@@ -21,6 +21,7 @@
 import com.google.devtools.build.lib.skylarkinterface.SkylarkCallable;
 import com.google.devtools.build.lib.skylarkinterface.SkylarkModule;
 import com.google.devtools.build.lib.skylarkinterface.SkylarkModuleCategory;
+import com.google.devtools.build.lib.syntax.StarlarkSemantics.FlagIdentifier;
 import javax.annotation.Nullable;
 
 /**
@@ -45,7 +46,8 @@
       structField = true,
       allowReturnNones = true,
       doc = "Returns an APK produced by this target.",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   @Nullable
   FileT getApk();
 
@@ -54,7 +56,8 @@
       structField = true,
       allowReturnNones = true,
       doc = "Returns a java package for this target.",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   @Nullable
   String getJavaPackage();
 
@@ -63,7 +66,8 @@
       structField = true,
       allowReturnNones = true,
       doc = "Returns a manifest file for this target.",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   @Nullable
   FileT getManifest();
 
@@ -72,7 +76,8 @@
       structField = true,
       allowReturnNones = true,
       doc = "Returns a manifest file for this target after all processing, e.g.: merging, etc.",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   @Nullable
   FileT getMergedManifest();
 
@@ -83,7 +88,8 @@
           "Returns the native libraries as a dictionary of the libraries' architecture as a string "
               + "to a set of the native library files, or the empty dictionary if there are no "
               + "native libraries.",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   ImmutableMap<String, NestedSet<FileT>> getNativeLibs();
 
   @SkylarkCallable(
@@ -91,6 +97,7 @@
       structField = true,
       doc = "Returns the resources container for the target.",
       documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS,
       allowReturnNones = true)
   @Nullable
   FileT getResourceApk();
@@ -100,7 +107,8 @@
       structField = true,
       allowReturnNones = true,
       doc = "Returns a collection of APKs that this target tests.",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   @Nullable
   ImmutableCollection<FileT> getApksUnderTest();
 
@@ -108,21 +116,24 @@
       name = "defines_resources",
       structField = true,
       doc = "Returns <code>True</code> if the target defines any Android resources directly.",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   boolean definesAndroidResources();
 
   @SkylarkCallable(
       name = "idl",
       structField = true,
       doc = "Returns information about IDL files associated with this target.",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   IdlInfoApi<FileT> getIdlInfo();
 
   @SkylarkCallable(
       name = "resources",
       structField = true,
       doc = "Returns resources defined by this target.",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   NestedSet<FileT> getResources();
 
   @SkylarkCallable(
@@ -130,7 +141,8 @@
       structField = true,
       allowReturnNones = true,
       doc = "Returns a jar file for classes generated from resources.",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   @Nullable
   OutputJarApi<FileT> getResourceJar();
 
@@ -139,7 +151,8 @@
       structField = true,
       allowReturnNones = true,
       doc = "Returns the aar output of this target.",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   @Nullable
   FileT getAar();
 
@@ -158,7 +171,8 @@
         structField = true,
         allowReturnNones = true,
         doc = "Returns the root of IDL packages if not the java root.",
-        documented = false)
+        documented = false,
+        enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
     @Nullable
     String getImportRoot();
 
@@ -166,14 +180,16 @@
         name = "sources",
         structField = true,
         doc = "Returns a list of IDL files.",
-        documented = false)
+        documented = false,
+        enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
     ImmutableCollection<FileT> getSources();
 
     @SkylarkCallable(
         name = "generated_java_files",
         structField = true,
         doc = "Returns a list Java files generated from IDL sources.",
-        documented = false)
+        documented = false,
+        enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
     ImmutableCollection<FileT> getIdlGeneratedJavaFiles();
 
     @SkylarkCallable(
@@ -181,7 +197,8 @@
         structField = true,
         allowReturnNones = true,
         doc = "Returns a jar file for classes generated from IDL sources.",
-        documented = false)
+        documented = false,
+        enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
     @Nullable
     OutputJarApi<FileT> getIdlOutput();
   }
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidSkylarkCommonApi.java b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidSkylarkCommonApi.java
index 164f92b..ebe2549 100644
--- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidSkylarkCommonApi.java
+++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidSkylarkCommonApi.java
@@ -34,6 +34,7 @@
   @SkylarkCallable(
       name = "create_device_broker_info",
       documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS,
       parameters = {@Param(name = "type", type = String.class)})
   AndroidDeviceBrokerInfoApi createDeviceBrokerInfo(String deviceBrokerType);
 
@@ -46,6 +47,7 @@
               + "a directory that designates resource kind (cf. "
               + "http://developer.android.com/guide/topics/resources/providing-resources.html).",
       documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS,
       parameters = {
         @Param(
             name = "resource",
@@ -62,6 +64,7 @@
           "A configuration for rule attributes that compiles native code according to "
               + "the --fat_apk_cpu and --android_crosstool_top flags.",
       documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS,
       structField = true)
   AndroidSplitTransititionApi getAndroidSplitTransition();
 
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/ApkInfoApi.java b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/ApkInfoApi.java
index 91305f5..13f5a25 100644
--- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/ApkInfoApi.java
+++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/ApkInfoApi.java
@@ -23,6 +23,7 @@
 import com.google.devtools.build.lib.skylarkinterface.SkylarkModuleCategory;
 import com.google.devtools.build.lib.syntax.EvalException;
 import com.google.devtools.build.lib.syntax.SkylarkDict;
+import com.google.devtools.build.lib.syntax.StarlarkSemantics.FlagIdentifier;
 
 /** A provider for targets that produce an apk file. */
 @SkylarkModule(
@@ -53,7 +54,8 @@
       name = "unsigned_apk",
       doc = "Returns a unsigned APK built from the target.",
       documented = false,
-      structField = true)
+      structField = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   FileT getUnsignedApk();
 
   /** Returns keystore that was used to sign the APK */
@@ -61,7 +63,8 @@
       name = "keystore",
       doc = "Returns a keystore that was used to sign the APK.",
       documented = false,
-      structField = true)
+      structField = true,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   FileT getKeystore();
 
   /** Provider for {@link ApkInfoApi}. */
@@ -77,6 +80,7 @@
         name = "ApkInfo",
         // This is left undocumented as it throws a "not-implemented in Skylark" error when invoked.
         documented = false,
+        enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS,
         extraKeywords = @Param(name = "kwargs"),
         useLocation = true,
         selfCall = true)
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/DataBindingV2ProviderApi.java b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/DataBindingV2ProviderApi.java
index 0c3f2c0..8696119 100644
--- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/DataBindingV2ProviderApi.java
+++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/DataBindingV2ProviderApi.java
@@ -25,6 +25,7 @@
 import com.google.devtools.build.lib.skylarkinterface.SkylarkModule;
 import com.google.devtools.build.lib.syntax.EvalException;
 import com.google.devtools.build.lib.syntax.SkylarkList;
+import com.google.devtools.build.lib.syntax.StarlarkSemantics.FlagIdentifier;
 import javax.annotation.Nullable;
 
 /**
@@ -64,7 +65,12 @@
    * android_libraries in the exports attribute, where the providers from exports are merged into a
    * single provider. In a rule without exports, this will be at most 1 file.
    */
-  @SkylarkCallable(name = "setter_stores", structField = true, doc = "", documented = false)
+  @SkylarkCallable(
+      name = "setter_stores",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   ImmutableList<T> getSetterStores();
 
   /**
@@ -72,32 +78,42 @@
    * android_libraries in the exports attribute, where the providers from exports are merged into a
    * single provider. In a rule without exports, this will be at most 1 file.
    */
-  @SkylarkCallable(name = "class_infos", structField = true, doc = "", documented = false)
+  @SkylarkCallable(
+      name = "class_infos",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   ImmutableList<T> getClassInfos();
 
   /** Returns the BR files from this rule and its dependencies. */
-  @SkylarkCallable(name = "transitive_br_files", structField = true, doc = "", documented = false)
+  @SkylarkCallable(
+      name = "transitive_br_files",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   NestedSet<T> getTransitiveBRFiles();
 
   /**
    * Returns a NestedSet containing the label and java package for this rule and its transitive
    * dependencies.
-   * */
+   */
   @SkylarkCallable(
       name = "transitive_label_and_java_packages",
       structField = true,
       doc = "",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   NestedSet<LabelJavaPackagePair> getTransitiveLabelAndJavaPackages();
 
-  /**
-   * Returns the label and java package for this rule and any rules that this rule exports.
-   */
+  /** Returns the label and java package for this rule and any rules that this rule exports. */
   @SkylarkCallable(
       name = "label_and_java_packages",
       structField = true,
       doc = "",
-      documented = false)
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   @Nullable
   ImmutableList<LabelJavaPackagePair> getLabelAndJavaPackages();
 
@@ -114,6 +130,7 @@
         name = NAME,
         doc = "The <code>DataBindingV2Info</code> constructor.",
         documented = false,
+        enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS,
         parameters = {
           @Param(
               name = "setter_store_file",
@@ -172,4 +189,4 @@
         SkylarkList<DataBindingV2ProviderApi<F>> databindingV2ProvidersInExports)
         throws EvalException;
   }
-}
\ No newline at end of file
+}
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/UsesDataBindingProviderApi.java b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/UsesDataBindingProviderApi.java
index 8327e6e..e5ac63db 100644
--- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/UsesDataBindingProviderApi.java
+++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/UsesDataBindingProviderApi.java
@@ -23,6 +23,7 @@
 import com.google.devtools.build.lib.skylarkinterface.SkylarkModule;
 import com.google.devtools.build.lib.syntax.EvalException;
 import com.google.devtools.build.lib.syntax.SkylarkList;
+import com.google.devtools.build.lib.syntax.StarlarkSemantics.FlagIdentifier;
 
 /**
  * An interface for a provider that exposes the use of <a
@@ -43,7 +44,12 @@
    * Returns the metadata outputs from this rule's annotation processing that describe how it
    * applies data binding. See {@link DataBinding#getMetadataOutputs} for details.
    */
-  @SkylarkCallable(name = "metadata_outputs", structField = true, doc = "", documented = false)
+  @SkylarkCallable(
+      name = "metadata_outputs",
+      structField = true,
+      doc = "",
+      documented = false,
+      enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS)
   ImmutableList<T> getMetadataOutputs();
 
   /** The provider implementing this can construct the UsesDataBindingInfo provider. */
@@ -59,6 +65,7 @@
         name = NAME,
         doc = "The <code>UsesDataBindingInfo</code> constructor.",
         documented = false,
+        enableOnlyWithFlag = FlagIdentifier.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS,
         parameters = {
           @Param(
               name = "metadata_outputs",
diff --git a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java b/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java
index d2eb7e0..2a15313 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java
@@ -97,6 +97,7 @@
 
   @Test
   public void testAndroidSplitTransitionWithInvalidCpu() throws Exception {
+    setSkylarkSemanticsOptions("--experimental_enable_android_migration_apis");
     scratch.file(
         "test/skylark/my_rule.bzl",
         "def impl(ctx): ",
@@ -3314,6 +3315,7 @@
     useConfiguration(
         "--experimental_dynamic_configs=notrim",
         "--enforce_transitive_configs_for_config_feature_flag");
+    setSkylarkSemanticsOptions("--experimental_enable_android_migration_apis");
     scratch.file(
         "java/com/foo/reader.bzl",
         "def _impl(ctx):",
@@ -4139,6 +4141,7 @@
 
   @Test
   public void testApkInfoAccessibleFromSkylark() throws Exception {
+    setSkylarkSemanticsOptions("--experimental_enable_android_migration_apis");
     scratch.file(
         "java/com/google/android/BUILD",
         "load(':postprocess.bzl', 'postprocess')",
@@ -4161,6 +4164,7 @@
 
   @Test
   public void testInstrumentationInfoAccessibleFromSkylark() throws Exception {
+    setSkylarkSemanticsOptions("--experimental_enable_android_migration_apis");
     scratch.file(
         "java/com/google/android/instr/BUILD",
         "load(':instr.bzl', 'instr')",
@@ -4189,6 +4193,7 @@
 
   @Test
   public void testInstrumentationInfoCreatableFromSkylark() throws Exception {
+    setSkylarkSemanticsOptions("--experimental_enable_android_migration_apis");
     scratch.file(
         "java/com/google/android/instr/BUILD",
         "load(':instr.bzl', 'instr')",
@@ -4460,6 +4465,7 @@
 
   @Test
   public void skylarkJavaInfoToAndroidBinaryAttributes() throws Exception {
+    setSkylarkSemanticsOptions("--experimental_enable_android_migration_apis");
     scratch.file(
         "java/r/android/extension.bzl",
         "def _impl(ctx):",
diff --git a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidInstrumentationTestTest.java b/src/test/java/com/google/devtools/build/lib/rules/android/AndroidInstrumentationTestTest.java
index 93b6241..d633203 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidInstrumentationTestTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/android/AndroidInstrumentationTestTest.java
@@ -231,6 +231,7 @@
   @Test
   public void testAndroidInstrumentationTestWithSkylarkDevice()
       throws Exception {
+    setSkylarkSemanticsOptions("--experimental_enable_android_migration_apis");
     scratch.file(
         "javatests/com/app/skylarkdevice/local_adb_device.bzl",
         "def _impl(ctx):",
diff --git a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidSkylarkTest.java b/src/test/java/com/google/devtools/build/lib/rules/android/AndroidSkylarkTest.java
index e208591..f05d274 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidSkylarkTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/android/AndroidSkylarkTest.java
@@ -33,6 +33,7 @@
 public class AndroidSkylarkTest extends BuildViewTestCase {
 
   private void writeAndroidSplitTransitionTestFiles() throws Exception  {
+    setSkylarkSemanticsOptions("--experimental_enable_android_migration_apis");
     scratch.file(
         "test/skylark/my_rule.bzl",
         "def impl(ctx): ",
@@ -168,6 +169,7 @@
 
   @Test
   public void testAndroidSdkConfigurationField() throws Exception {
+    setSkylarkSemanticsOptions("--experimental_enable_android_migration_apis");
     scratch.file(
         "foo_library.bzl",
         "def _impl(ctx):",
diff --git a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleImplementationFunctionsTest.java b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleImplementationFunctionsTest.java
index 8668dc8..54bd0bc 100644
--- a/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleImplementationFunctionsTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skylark/SkylarkRuleImplementationFunctionsTest.java
@@ -2713,6 +2713,7 @@
 
   @Test
   public void testConfigurationField_NativeSplitTransitionProhibited() throws Exception {
+    setSkylarkSemanticsOptions("--experimental_enable_android_migration_apis");
     scratch.file(
         "test/rule.bzl",
         "def _foo_impl(ctx):",
diff --git a/src/test/java/com/google/devtools/build/skydoc/testdata/android_basic_test/input.bzl b/src/test/java/com/google/devtools/build/skydoc/testdata/android_basic_test/input.bzl
index b06291a..a479fb6 100644
--- a/src/test/java/com/google/devtools/build/skydoc/testdata/android_basic_test/input.bzl
+++ b/src/test/java/com/google/devtools/build/skydoc/testdata/android_basic_test/input.bzl
@@ -1,15 +1,3 @@
-def exercise_the_api():
-    _var1 = android_common.create_device_broker_info("")
-    _var2 = ApkInfo
-    _var3 = AndroidInstrumentationInfo
-    _var4 = AndroidDeviceBrokerInfo
-    _var5 = AndroidResourcesInfo
-    _var6 = AndroidNativeLibsInfo
-    _var7 = AndroidSdkInfo
-    _var8 = android_data
-
-exercise_the_api()
-
 def my_rule_impl(ctx):
     return struct()