Start removing flag for rclass generator (make nop)
Flip option default to true to mirror flag flip
and make the option a nop. After that we can remove
the flag reference, and then we can remove
the actual option.
RELNOTES: --{no}experimental_use_rclass_generator
is now a nop. It's been on by default for a while,
and there are no references, so seems safe to remove.
--
MOS_MIGRATED_REVID=140602921
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidCommon.java b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidCommon.java
index 2105496..31ac2be 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidCommon.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidCommon.java
@@ -563,9 +563,7 @@
// Use a fast-path R class generator for android_binary with local resources, where there is
// a bottleneck. For legacy resources, the srcjar and R class compiler don't match up
// (the legacy srcjar requires the createJarJar step below).
- boolean useRClassGenerator =
- getAndroidConfig(ruleContext).useRClassGenerator()
- && isBinary && !resourceApk.isLegacy();
+ boolean useRClassGenerator = isBinary && !resourceApk.isLegacy();
compileResources(javaSemantics, resourceApk, resourcesJar, artifactsBuilder, attributes,
filesBuilder, jarsProducedForRuntime, useRClassGenerator);
if (resourceApk.isLegacy()) {
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidConfiguration.java b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidConfiguration.java
index cab35ff..561b1cf 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidConfiguration.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidConfiguration.java
@@ -373,8 +373,9 @@
// Do not use on the command line.
// The idea is that once this option works, we'll flip the default value in a config file, then
// once it is proven that it works, remove it from Bazel and said config file.
+ // This is now on by default and the flag is a noop and will be removed in a future release.
@Option(name = "experimental_use_rclass_generator",
- defaultValue = "false",
+ defaultValue = "true",
category = "undocumented",
help = "Use the specialized R class generator to build the final app and lib R classes.")
public boolean useRClassGenerator;
@@ -480,7 +481,6 @@
private final boolean useRexToCompressDexFiles;
private final boolean allowAndroidLibraryDepsWithoutSrcs;
private final boolean useAndroidResourceShrinking;
- private final boolean useRClassGenerator;
private final boolean useParallelResourceProcessing;
private final AndroidManifestMerger manifestMerger;
private final ApkSigningMethod apkSigningMethod;
@@ -506,7 +506,6 @@
this.desugarJava8 = options.desugarJava8;
this.allowAndroidLibraryDepsWithoutSrcs = options.allowAndroidLibraryDepsWithoutSrcs;
this.useAndroidResourceShrinking = options.useAndroidResourceShrinking;
- this.useRClassGenerator = options.useRClassGenerator;
this.useParallelResourceProcessing = options.useParallelResourceProcessing;
this.manifestMerger = options.manifestMerger;
this.apkSigningMethod = options.apkSigningMethod;
@@ -581,10 +580,6 @@
return useAndroidResourceShrinking;
}
- public boolean useRClassGenerator() {
- return useRClassGenerator;
- }
-
public boolean useParallelResourceProcessing() {
return useParallelResourceProcessing;
}