mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Added kobaltOptions().
This commit is contained in:
parent
c43967bec9
commit
a4282b299a
4 changed files with 28 additions and 3 deletions
|
@ -161,6 +161,7 @@ private class Main @Inject constructor(
|
|||
} else {
|
||||
val allProjects = projectFinder.initForBuildFile(buildFile, args)
|
||||
|
||||
addOptionsFromBuild(args, Kobalt.optionsFromBuild)
|
||||
if (args.listTemplates) {
|
||||
// --listTemplates
|
||||
Templates().displayTemplates(pluginInfo)
|
||||
|
@ -213,6 +214,15 @@ private class Main @Inject constructor(
|
|||
return result
|
||||
}
|
||||
|
||||
private fun addOptionsFromBuild(args: Args, optionsFromBuild: ArrayList<String>) {
|
||||
optionsFromBuild.forEach {
|
||||
when(it) {
|
||||
Args.SEQUENTIAL -> args.sequential = true
|
||||
else -> throw IllegalArgumentException("Unsupported option found in kobaltOptions(): " + it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun findBuildFile(): File {
|
||||
val deprecatedLocation = File(Constants.BUILD_FILE_NAME)
|
||||
val result: File =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue