summaryrefslogtreecommitdiff
path: root/java/com/google/devtools/build
diff options
context:
space:
mode:
authorccalvarin <ccalvarin@google.com>2017-06-29 22:47:37 +0200
committerColin Cross <ccross@android.com>2017-06-30 18:42:02 -0700
commitbb5400d52966c32147ef3061a85026d4437e7523 (patch)
treef0f7984781d2967bdb4820b35acc0250c0738eb3 /java/com/google/devtools/build
parent58d5a17fac30f96230e27ca6aca9591fdb4227f1 (diff)
downloaddesugar-bb5400d52966c32147ef3061a85026d4437e7523.tar.gz
Add categories transition values to android options.
Automated formatting fixes standardize the @Option annotation. PiperOrigin-RevId: 160567787 GitOrigin-RevId: db8c437ea1858bc8b9e9b2ec6838ed3916d0ce4b Change-Id: I3af7fdf0121f9947c7831d4de2b4056497d93e57
Diffstat (limited to 'java/com/google/devtools/build')
-rw-r--r--java/com/google/devtools/build/android/desugar/Desugar.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/java/com/google/devtools/build/android/desugar/Desugar.java b/java/com/google/devtools/build/android/desugar/Desugar.java
index 74dfa17..d7a6504 100644
--- a/java/com/google/devtools/build/android/desugar/Desugar.java
+++ b/java/com/google/devtools/build/android/desugar/Desugar.java
@@ -31,9 +31,11 @@ import com.google.devtools.build.android.Converters.ExistingPathConverter;
import com.google.devtools.build.android.Converters.PathConverter;
import com.google.devtools.build.android.desugar.CoreLibraryRewriter.UnprefixingClassWriter;
import com.google.devtools.common.options.Option;
+import com.google.devtools.common.options.OptionDocumentationCategory;
import com.google.devtools.common.options.OptionsBase;
import com.google.devtools.common.options.OptionsParser;
import com.google.devtools.common.options.OptionsParser.OptionUsageRestrictions;
+import com.google.devtools.common.options.proto.OptionFilters.OptionEffectTag;
import com.google.errorprone.annotations.MustBeClosed;
import java.io.IOError;
import java.io.IOException;
@@ -70,6 +72,8 @@ class Desugar {
allowMultiple = true,
defaultValue = "",
category = "input",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
converter = ExistingPathConverter.class,
abbrev = 'i',
help =
@@ -83,6 +87,8 @@ class Desugar {
allowMultiple = true,
defaultValue = "",
category = "input",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
converter = ExistingPathConverter.class,
help =
"Ordered classpath (Jar or directory) to resolve symbols in the --input Jar, like "
@@ -95,6 +101,8 @@ class Desugar {
allowMultiple = true,
defaultValue = "",
category = "input",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
converter = ExistingPathConverter.class,
help =
"Bootclasspath that was used to compile the --input Jar with, like javac's "
@@ -105,6 +113,8 @@ class Desugar {
@Option(
name = "allow_empty_bootclasspath",
defaultValue = "false",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
optionUsageRestrictions = OptionUsageRestrictions.UNDOCUMENTED
)
public boolean allowEmptyBootclasspath;
@@ -112,6 +122,8 @@ class Desugar {
@Option(
name = "only_desugar_javac9_for_lint",
defaultValue = "false",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"A temporary flag specifically for android lint, subject to removal anytime (DO NOT USE)",
optionUsageRestrictions = OptionUsageRestrictions.UNDOCUMENTED
@@ -121,6 +133,8 @@ class Desugar {
@Option(
name = "rewrite_calls_to_long_compare",
defaultValue = "true",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help = "rewrite calls to Long.compare(long, long) to the JVM instruction lcmp",
category = "misc"
)
@@ -131,6 +145,8 @@ class Desugar {
allowMultiple = true,
defaultValue = "",
category = "output",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
converter = PathConverter.class,
abbrev = 'o',
help =
@@ -143,6 +159,8 @@ class Desugar {
name = "verbose",
defaultValue = "false",
category = "misc",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
abbrev = 'v',
help = "Enables verbose debugging output."
)
@@ -152,6 +170,8 @@ class Desugar {
name = "min_sdk_version",
defaultValue = "1",
category = "misc",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help = "Minimum targeted sdk version. If >= 24, enables default methods in interfaces."
)
public int minSdkVersion;
@@ -160,6 +180,8 @@ class Desugar {
name = "desugar_interface_method_bodies_if_needed",
defaultValue = "true",
category = "misc",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"Rewrites default and static methods in interfaces if --min_sdk_version < 24. This "
+ "only works correctly if subclasses of rewritten interfaces as well as uses of "
@@ -171,6 +193,8 @@ class Desugar {
name = "desugar_try_with_resources_if_needed",
defaultValue = "true",
category = "misc",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help = "Rewrites try-with-resources statements if --min_sdk_version < 19."
)
public boolean desugarTryWithResourcesIfNeeded;
@@ -179,6 +203,8 @@ class Desugar {
name = "desugar_try_with_resources_omit_runtime_classes",
defaultValue = "false",
category = "misc",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help =
"Omits the runtime classes necessary to support try-with-resources from the output. "
+ "This property has effect only if --desugar_try_with_resources_if_needed is used."
@@ -189,6 +215,8 @@ class Desugar {
name = "copy_bridges_from_classpath",
defaultValue = "false",
category = "misc",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
help = "Copy bridges from classpath to desugared classes."
)
public boolean copyBridgesFromClasspath;
@@ -196,6 +224,8 @@ class Desugar {
@Option(
name = "core_library",
defaultValue = "false",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
optionUsageRestrictions = OptionUsageRestrictions.UNDOCUMENTED,
implicitRequirements = "--allow_empty_bootclasspath",
help = "Enables rewriting to desugar java.* classes."