From fcd684775f21d8fc38228368c6ac4b2a0213def5 Mon Sep 17 00:00:00 2001 From: Googler Date: Wed, 27 Jul 2016 17:23:39 +0000 Subject: Add a resource parsing action. Part of 3 proposed new actions: - parsing action - merging action - validating action Dependencies (directData and transitiveData) expect the symbol files. If the merge action produces the symbol files, then each merge action depends on each other. Instead, produce it in an action with just source resources as prereqs to allow more parallelism. Technically, we don't need a manifest as part of the parameters. I debated about whether to introduce a basic version of UnvalidatedAndroidData or not. -- MOS_MIGRATED_REVID=128599714 --- .../google/devtools/build/android/Converters.java | 26 ++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'src/tools/android/java/com/google/devtools/build/android/Converters.java') diff --git a/src/tools/android/java/com/google/devtools/build/android/Converters.java b/src/tools/android/java/com/google/devtools/build/android/Converters.java index bcbfa97785..464e793872 100644 --- a/src/tools/android/java/com/google/devtools/build/android/Converters.java +++ b/src/tools/android/java/com/google/devtools/build/android/Converters.java @@ -67,8 +67,30 @@ public final class Converters { @Override public String getTypeDescription() { - return "unvalidated android data in the format " - + "resources[#resources]:assets[#assets]:manifest"; + return "unvalidated android data in the format " + UnvalidatedAndroidData.expectedFormat(); + } + } + + /** + * Converter for {@link UnvalidatedAndroidDirectories}. + */ + public static class UnvalidatedAndroidDirectoriesConverter + implements Converter { + + @Override + public UnvalidatedAndroidDirectories convert(String input) throws OptionsParsingException { + try { + return UnvalidatedAndroidDirectories.valueOf(input); + } catch (IllegalArgumentException e) { + throw new OptionsParsingException( + String.format("invalid UnvalidatedAndroidDirectories: %s", e.getMessage()), e); + } + } + + @Override + public String getTypeDescription() { + return "unvalidated android directories in the format " + + UnvalidatedAndroidDirectories.expectedFormat(); } } -- cgit v1.2.3