Introduce AbstractCliOption, rewrite all possible kapt options as enum values

This commit is contained in:
Yan Zhulanow
2018-10-24 16:00:34 +03:00
parent 546eff6e45
commit 49941339a3
7 changed files with 98 additions and 128 deletions
@@ -25,7 +25,7 @@ class MavenPluginComponent : KotlinMavenPluginExtension {
return listOf(PluginOption(
"test-me",
TestCommandLineProcessor.TestPluginId,
TestCommandLineProcessor.MyTestOption.name,
TestCommandLineProcessor.MyTestOption.optionName,
"my-special-value"))
}
}
@@ -25,7 +25,7 @@ class TestCommandLineProcessor : CommandLineProcessor {
MyTestOption -> {
configuration.put(TestPluginKeys.TestOption, value)
}
else -> throw CliOptionProcessingException("Unknown option: ${option.name}")
else -> throw CliOptionProcessingException("Unknown option: ${option.optionName}")
}
}
}