Introduce AbstractCliOption, rewrite all possible kapt options as enum values
This commit is contained in:
+1
-1
@@ -25,7 +25,7 @@ class MavenPluginComponent : KotlinMavenPluginExtension {
|
||||
return listOf(PluginOption(
|
||||
"test-me",
|
||||
TestCommandLineProcessor.TestPluginId,
|
||||
TestCommandLineProcessor.MyTestOption.name,
|
||||
TestCommandLineProcessor.MyTestOption.optionName,
|
||||
"my-special-value"))
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -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}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user