AllOpen, NoArg: Refactoring, support presets in order to hold special annotations for Spring and JPA in one place

This commit is contained in:
Yan Zhulanow
2017-01-31 19:03:40 +03:00
parent f4690ebff9
commit feb5397f6f
9 changed files with 58 additions and 49 deletions
@@ -61,11 +61,7 @@ class AndroidCommandLineProcessor : CommandLineProcessor {
override fun processOption(option: CliOption, value: String, configuration: CompilerConfiguration) {
when (option) {
VARIANT_OPTION -> {
val paths = configuration.getList(AndroidConfigurationKeys.VARIANT).toMutableList()
paths.add(value)
configuration.put(AndroidConfigurationKeys.VARIANT, paths)
}
VARIANT_OPTION -> configuration.appendList(AndroidConfigurationKeys.VARIANT, value)
PACKAGE_OPTION -> configuration.put(AndroidConfigurationKeys.PACKAGE, value)
else -> throw CliOptionProcessingException("Unknown option: ${option.name}")
}