1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 00:17:11 -07:00

Added kobaltOptions().

This commit is contained in:
Cedric Beust 2017-03-21 13:14:25 -07:00
parent c43967bec9
commit a4282b299a
4 changed files with 28 additions and 3 deletions

View file

@ -82,7 +82,11 @@ class Args {
@Parameter(names = arrayOf("--noIncrementalKotlin"), description = "Disable incremental Kotlin compilation")
var noIncrementalKotlin: Boolean = false
@Parameter(names = arrayOf("--sequential"), description = "Build all the projects in sequence")
companion object {
const val SEQUENTIAL = "--sequential"
}
@Parameter(names = arrayOf(Args.SEQUENTIAL), description = "Build all the projects in sequence")
var sequential: Boolean = false
@Parameter(names = arrayOf("--server"), description = "Run in server mode")

View file

@ -27,8 +27,13 @@ class BuildScriptConfig {
@Directive
fun buildFileClasspath(vararg bfc: String) = newBuildFileClasspath(*bfc)
// The following settings modify the compiler used to compile the build file.
// Projects should use kotlinCompiler { compilerVersion } to configure the Kotin compiler for their source files.
/** Options passed to Kobalt */
@Directive
fun kobaltOptions(vararg options: String) = Kobalt.addKobaltOptions(options)
// The following settings modify the compiler used to compile the build file, which regular users should
// probably never need to do. Projects should use kotlinCompiler { compilerVersion } to configure the
// Kotin compiler for their source files.
var kobaltCompilerVersion : String? = null
var kobaltCompilerRepo: String? = null
var kobaltCompilerFlags: String? = null

View file

@ -118,5 +118,11 @@ class Kobalt {
get() = Duration.parse( kobaltProperties.getProperty(PROPERTY_KOBALT_VERSION_CHECK_TIMEOUT) ?: "P1D")
fun findPlugin(name: String) = Plugins.findPlugin(name)
val optionsFromBuild = arrayListOf<String>()
fun addKobaltOptions(options: Array<out String>) {
optionsFromBuild.addAll(options)
}
}
}