Skip to content

Commit

Permalink
Remove flag guarding for the AndroidIdeInfo provider
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 599224866
Change-Id: I4f6c40f072ac371ca4540db756835f251892237f
  • Loading branch information
timpeut authored and copybara-github committed Jan 17, 2024
1 parent 56d21d6 commit 916c3f5
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public class AndroidBootstrap implements Bootstrap {
PackageIdentifier.createUnchecked("", "tools/build_defs/android"));

private final AndroidStarlarkCommonApi<?, ?, ?, ?, ?> androidCommon;
private final AndroidIdeInfoProviderApi.Provider<?, ?> androidIdeInfoProvider;
private final ImmutableMap<String, Object> providers;

public AndroidBootstrap(
Expand Down Expand Up @@ -71,6 +72,7 @@ public AndroidBootstrap(
AndroidOptimizationInfoApi.Provider<?> androidOptimizationInfoProvider) {

this.androidCommon = androidCommon;
this.androidIdeInfoProvider = androidIdeInfoProvider;
ImmutableMap.Builder<String, Object> builder = ImmutableMap.builder();
builder.put(ApkInfoApi.NAME, apkInfoProvider);
builder.put(AndroidInstrumentationInfoApi.NAME, androidInstrumentationInfoProvider);
Expand All @@ -86,7 +88,6 @@ public AndroidBootstrap(
builder.put(AndroidLibraryAarInfoApi.NAME, androidLibraryAarInfoProvider);
builder.put(AndroidProguardInfoApi.NAME, androidProguardInfoProvider);
builder.put(AndroidIdlProviderApi.NAME, androidIdlProvider);
builder.put(AndroidIdeInfoProviderApi.NAME, androidIdeInfoProvider);
builder.put(AndroidPreDexJarProviderApi.NAME, androidPreDexJarProviderApiProvider);
builder.put(AndroidCcLinkParamsProviderApi.NAME, androidCcLinkParamsProviderApiProvider);
builder.put(DataBindingV2ProviderApi.NAME, dataBindingV2ProviderApiProvider);
Expand Down Expand Up @@ -118,6 +119,11 @@ public void addBindingsToBuilder(ImmutableMap.Builder<String, Object> builder) {
androidCommon,
allowedRepositories));

// Expose AndroidIdeInfo without any flag guarding. This provider is referenced by the intellij
// aspect (for all languages, not just Android) and we do not want to ask all users to put
// `--experimental_google_legacy_api` in their bazelrc.
builder.put(AndroidIdeInfoProviderApi.NAME, androidIdeInfoProvider);

for (Map.Entry<String, Object> provider : providers.entrySet()) {
builder.put(
provider.getKey(),
Expand Down

0 comments on commit 916c3f5

Please sign in to comment.