aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools/android/java/com/google/devtools/build/android/ManifestMergerAction.java
diff options
context:
space:
mode:
authorGravatar ccalvarin <ccalvarin@google.com>2017-06-29 22:47:37 +0200
committerGravatar Marcel Hlopko <hlopko@google.com>2017-06-30 13:00:48 +0200
commitdb8c437ea1858bc8b9e9b2ec6838ed3916d0ce4b (patch)
treed4df25c5e674e272811ff513b28a44fa27bfc4a2 /src/tools/android/java/com/google/devtools/build/android/ManifestMergerAction.java
parent50d347168a56dda30d904b644162dbfaaf270f51 (diff)
Add categories transition values to android options.
Automated formatting fixes standardize the @Option annotation. PiperOrigin-RevId: 160567787
Diffstat (limited to 'src/tools/android/java/com/google/devtools/build/android/ManifestMergerAction.java')
-rw-r--r--src/tools/android/java/com/google/devtools/build/android/ManifestMergerAction.java113
1 files changed, 72 insertions, 41 deletions
diff --git a/src/tools/android/java/com/google/devtools/build/android/ManifestMergerAction.java b/src/tools/android/java/com/google/devtools/build/android/ManifestMergerAction.java
index 3e366e1625..1257ba6b0c 100644
--- a/src/tools/android/java/com/google/devtools/build/android/ManifestMergerAction.java
+++ b/src/tools/android/java/com/google/devtools/build/android/ManifestMergerAction.java
@@ -24,8 +24,10 @@ import com.google.devtools.build.android.Converters.MergeTypeConverter;
import com.google.devtools.build.android.Converters.PathConverter;
import com.google.devtools.build.android.Converters.StringDictionaryConverter;
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.proto.OptionFilters.OptionEffectTag;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
@@ -65,59 +67,88 @@ import org.xml.sax.SAXException;
public class ManifestMergerAction {
/** Flag specifications for this action. */
public static final class Options extends OptionsBase {
- @Option(name = "manifest",
- defaultValue = "null",
- converter = ExistingPathConverter.class,
- category = "input",
- help = "Path of primary manifest.")
+ @Option(
+ name = "manifest",
+ defaultValue = "null",
+ converter = ExistingPathConverter.class,
+ category = "input",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help = "Path of primary manifest."
+ )
public Path manifest;
- @Option(name = "mergeeManifests",
- defaultValue = "",
- converter = ExistingPathStringDictionaryConverter.class,
- category = "input",
- help = "A dictionary of manifests, and originating target, to be merged into manifest.")
+ @Option(
+ name = "mergeeManifests",
+ defaultValue = "",
+ converter = ExistingPathStringDictionaryConverter.class,
+ category = "input",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help = "A dictionary of manifests, and originating target, to be merged into manifest."
+ )
public Map<Path, String> mergeeManifests;
- @Option(name = "mergeType",
- defaultValue = "APPLICATION",
- converter = MergeTypeConverter.class,
- category = "config",
- help = "The type of merging to perform.")
+ @Option(
+ name = "mergeType",
+ defaultValue = "APPLICATION",
+ converter = MergeTypeConverter.class,
+ category = "config",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help = "The type of merging to perform."
+ )
public MergeType mergeType;
- @Option(name = "manifestValues",
- defaultValue = "",
- converter = StringDictionaryConverter.class,
- category = "config",
- help = "A dictionary string of values to be overridden in the manifest. Any instance of "
- + "${name} in the manifest will be replaced with the value corresponding to name in "
- + "this dictionary. applicationId, versionCode, versionName, minSdkVersion, "
- + "targetSdkVersion and maxSdkVersion have a dual behavior of also overriding the "
- + "corresponding attributes of the manifest and uses-sdk tags. packageName will be "
- + "ignored and will be set from either applicationId or the package in manifest. The "
- + "expected format of this string is: key:value[,key:value]*. The keys and values "
- + "may contain colons and commas as long as they are escaped with a backslash.")
+ @Option(
+ name = "manifestValues",
+ defaultValue = "",
+ converter = StringDictionaryConverter.class,
+ category = "config",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help =
+ "A dictionary string of values to be overridden in the manifest. Any instance of "
+ + "${name} in the manifest will be replaced with the value corresponding to name in "
+ + "this dictionary. applicationId, versionCode, versionName, minSdkVersion, "
+ + "targetSdkVersion and maxSdkVersion have a dual behavior of also overriding the "
+ + "corresponding attributes of the manifest and uses-sdk tags. packageName will be "
+ + "ignored and will be set from either applicationId or the package in manifest. The "
+ + "expected format of this string is: key:value[,key:value]*. The keys and values "
+ + "may contain colons and commas as long as they are escaped with a backslash."
+ )
public Map<String, String> manifestValues;
- @Option(name = "customPackage",
- defaultValue = "null",
- category = "config",
- help = "Custom java package to insert in the package attribute of the manifest tag.")
+ @Option(
+ name = "customPackage",
+ defaultValue = "null",
+ category = "config",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help = "Custom java package to insert in the package attribute of the manifest tag."
+ )
public String customPackage;
- @Option(name = "manifestOutput",
- defaultValue = "null",
- converter = PathConverter.class,
- category = "output",
- help = "Path for the merged manifest.")
+ @Option(
+ name = "manifestOutput",
+ defaultValue = "null",
+ converter = PathConverter.class,
+ category = "output",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ help = "Path for the merged manifest."
+ )
public Path manifestOutput;
- @Option(name = "log",
- defaultValue = "null",
- category = "output",
- converter = PathConverter.class,
- help = "Path to where the merger log should be written.")
+ @Option(
+ name = "log",
+ defaultValue = "null",
+ category = "output",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.UNKNOWN},
+ converter = PathConverter.class,
+ help = "Path to where the merger log should be written."
+ )
public Path log;
}