Automated rollback of commit
*** Reason for rollback ***
Discovered bug b/109675979 with feature, and flag flip may need to be reverted
*** Original change description ***
Remove support for --experimental_one_version_enforcement_use_transitive_jars_for_binary_under_test
@@ -836,8 +836,7 @@ public class AndroidConfiguration extends BuildConfiguration.Fragment
)
public boolean checkForMigrationTag;
- // TODO(eaftan): this is enabled by default, delete it after the next blaze release and removing
- // from the global blazerc
+ // TODO(eaftan): enable this by default and delete it
@Option(
name = "experimental_one_version_enforcement_use_transitive_jars_for_binary_under_test",
defaultValue = "false",
@@ -846,7 +845,10 @@ public class AndroidConfiguration extends BuildConfiguration.Fragment
OptionEffectTag.BAZEL_INTERNAL_CONFIGURATION,
OptionEffectTag.ACTION_COMMAND_LINES
},
- help = "No-op. Kept here for backwards compatibility.")
+ help =
+ "If enabled, one version enforcement for android_test uses the binary_under_test's "
+ + "transitive classpath, otherwise it uses the deploy jar"
+ )
public boolean oneVersionEnforcementUseTransitiveJarsForBinaryUnderTest;
@Override
@@ -871,6 +873,8 @@ public class AndroidConfiguration extends BuildConfiguration.Fragment
host.manifestMerger = manifestMerger;
host.androidAaptVersion = androidAaptVersion;
host.allowAndroidLibraryDepsWithoutSrcs = allowAndroidLibraryDepsWithoutSrcs;
+ host.oneVersionEnforcementUseTransitiveJarsForBinaryUnderTest =
+ oneVersionEnforcementUseTransitiveJarsForBinaryUnderTest;
return host;
}
}
@@ -929,6 +933,7 @@ public class AndroidConfiguration extends BuildConfiguration.Fragment
private final AndroidRobolectricTestDeprecationLevel robolectricTestDeprecationLevel;
private final boolean decoupleDataProcessing;
private final boolean checkForMigrationTag;
+ private final boolean oneVersionEnforcementUseTransitiveJarsForBinaryUnderTest;
AndroidConfiguration(Options options) throws InvalidConfigurationException {
this.enableAndroidCpuMakeVariable = options.enableAndroidCpuMakeVariable;
@@ -969,6 +974,8 @@ public class AndroidConfiguration extends BuildConfiguration.Fragment
this.robolectricTestDeprecationLevel = options.robolectricTestDeprecationLevel;
this.decoupleDataProcessing = options.decoupleDataProcessing;
this.checkForMigrationTag = options.checkForMigrationTag;
+ this.oneVersionEnforcementUseTransitiveJarsForBinaryUnderTest =
+ options.oneVersionEnforcementUseTransitiveJarsForBinaryUnderTest;
if (incrementalDexingShardsAfterProguard < 0) {
throw new InvalidConfigurationException(
@@ -1021,7 +1028,8 @@ public class AndroidConfiguration extends BuildConfiguration.Fragment
boolean fixedResourceNeverlinking,
AndroidRobolectricTestDeprecationLevel robolectricTestDeprecationLevel,
boolean decoupleDataProcessing,
- boolean checkForMigrationTag) {
+ boolean checkForMigrationTag,
+ boolean oneVersionEnforcementUseTransitiveJarsForBinaryUnderTest) {
this.enableAndroidCpuMakeVariable = enableAndroidCpuMakeVariable;
this.sdk = sdk;
this.cpu = cpu;
@@ -1057,6 +1065,8 @@ public class AndroidConfiguration extends BuildConfiguration.Fragment
this.robolectricTestDeprecationLevel = robolectricTestDeprecationLevel;
this.decoupleDataProcessing = decoupleDataProcessing;
this.checkForMigrationTag = checkForMigrationTag;
+ this.oneVersionEnforcementUseTransitiveJarsForBinaryUnderTest =
+ oneVersionEnforcementUseTransitiveJarsForBinaryUnderTest;
}
public String getCpu() {
@@ -1211,6 +1221,10 @@ public class AndroidConfiguration extends BuildConfiguration.Fragment
return checkForMigrationTag;
}
+ public boolean getOneVersionEnforcementUseTransitiveJarsForBinaryUnderTest() {
+ return oneVersionEnforcementUseTransitiveJarsForBinaryUnderTest;
+ }
+
@Override
public void addGlobalMakeVariables(ImmutableMap.Builder<String, String> globalMakeEnvBuilder) {
if (!enableAndroidCpuMakeVariable) {
