Skip to content

Commit

Permalink
Remove autoloads for rules_android internals.
Browse files Browse the repository at this point in the history
We generally only expect people to be loading our top-level rules. At this stage all other providers, helpers etc are considered internal implementation details and we don't want to suggest otherwise. In the future this may change but for now just remove the autoloads.

PiperOrigin-RevId: 679677200
Change-Id: I50fd2dbddb0a59c12d4e5444cf1832b995bf370e
  • Loading branch information
timpeut authored and copybara-github committed Sep 27, 2024
1 parent f27cfb8 commit 38239d9
Showing 1 changed file with 12 additions and 74 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -498,10 +498,6 @@ private static SymbolRedirect renamedSymbolRedirect(
label, false, newName, ImmutableSet.copyOf(rdeps));
}

private static final String[] androidRules = {
"aar_import", "android_binary", "android_library", "android_local_test", "android_sdk"
};

private static final ImmutableSet<String> PREDECLARED_REPOS_DISALLOWING_AUTOLOADS =
ImmutableSet.of(
"protobuf",
Expand Down Expand Up @@ -607,76 +603,6 @@ private static SymbolRedirect renamedSymbolRedirect(
"java_import",
"android_binary",
"android_library"))
.put("android_common", symbolRedirect("@rules_android//rules:common.bzl"))
.put(
"AndroidIdeInfo", symbolRedirect("@rules_android//rules:providers.bzl", androidRules))
.put("ApkInfo", symbolRedirect("@rules_android//rules:providers.bzl", androidRules))
.put(
"AndroidInstrumentationInfo",
symbolRedirect("@rules_android//rules:providers.bzl", androidRules))
.put(
"AndroidResourcesInfo",
symbolRedirect("@rules_android//rules:providers.bzl", androidRules))
.put(
"AndroidNativeLibsInfo",
symbolRedirect("@rules_android//rules:providers.bzl", androidRules))
.put(
"AndroidApplicationResourceInfo",
symbolRedirect("@rules_android//rules:providers.bzl", androidRules))
.put(
"AndroidBinaryNativeLibsInfo",
symbolRedirect("@rules_android//rules:providers.bzl", androidRules))
.put(
"AndroidSdkInfo", symbolRedirect("@rules_android//rules:providers.bzl", androidRules))
.put(
"AndroidManifestInfo",
symbolRedirect("@rules_android//rules:providers.bzl", androidRules))
.put(
"AndroidAssetsInfo",
symbolRedirect("@rules_android//rules:providers.bzl", androidRules))
.put(
"AndroidLibraryAarInfo",
symbolRedirect("@rules_android//rules:providers.bzl", androidRules))
.put(
"AndroidProguardInfo",
symbolRedirect("@rules_android//rules:providers.bzl", androidRules))
.put(
"AndroidIdlInfo", symbolRedirect("@rules_android//rules:providers.bzl", androidRules))
.put(
"AndroidPreDexJarInfo",
symbolRedirect("@rules_android//rules:providers.bzl", androidRules))
.put(
"AndroidCcLinkParamsInfo",
symbolRedirect("@rules_android//rules:providers.bzl", androidRules))
.put(
"DataBindingV2Info",
symbolRedirect("@rules_android//rules:providers.bzl", androidRules))
.put(
"AndroidLibraryResourceClassJarProvider",
symbolRedirect("@rules_android//rules:providers.bzl", androidRules))
.put(
"AndroidFeatureFlagSet",
symbolRedirect("@rules_android//rules:providers.bzl", androidRules))
.put(
"ProguardMappingInfo",
symbolRedirect("@rules_android//rules:providers.bzl", androidRules))
.put(
"AndroidBinaryData",
symbolRedirect("@rules_android//rules:providers.bzl", androidRules))
.put(
"BaselineProfileProvider",
symbolRedirect("@rules_android//rules:providers.bzl", androidRules))
.put(
"AndroidNeverLinkLibrariesProvider",
symbolRedirect("@rules_android//rules:providers.bzl", androidRules))
.put(
"AndroidOptimizedJarInfo",
symbolRedirect("@rules_android//rules:providers.bzl", androidRules))
.put(
"AndroidDexInfo", symbolRedirect("@rules_android//rules:providers.bzl", androidRules))
.put(
"AndroidOptimizationInfo",
symbolRedirect("@rules_android//rules:providers.bzl", androidRules))
.put(
"PyInfo",
symbolRedirect(
Expand All @@ -696,6 +622,18 @@ private static SymbolRedirect renamedSymbolRedirect(
"py_binary",
"py_test",
"py_library"))
// Note: AndroidIdeInfo is intended to be autoloaded for ASwBazel/IntelliJ migration
// purposes. It is not intended to be used by other teams and projects, and is effectively
// an internal implementation detail.
.put(
"AndroidIdeInfo",
symbolRedirect(
"@rules_android//providers:providers.bzl",
"aar_import",
"android_binary",
"android_library",
"android_local_test",
"android_sdk"))
.put("aar_import", ruleRedirect("@rules_android//rules:rules.bzl"))
.put("android_binary", ruleRedirect("@rules_android//rules:rules.bzl"))
.put("android_library", ruleRedirect("@rules_android//rules:rules.bzl"))
Expand Down

0 comments on commit 38239d9

Please sign in to comment.