mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 00:17:11 -07:00
Put a context on the Kobalt object.
This commit is contained in:
parent
802b7d13bf
commit
36b41c11e9
2 changed files with 6 additions and 2 deletions
|
@ -111,6 +111,8 @@ private class Main @Inject constructor(
|
||||||
if (! buildFile.exists()) {
|
if (! buildFile.exists()) {
|
||||||
jc.usage()
|
jc.usage()
|
||||||
} else {
|
} else {
|
||||||
|
val context = KobaltContext(args)
|
||||||
|
Kobalt.context = context
|
||||||
val allProjects = script2.create(arrayListOf(buildFile)).findProjects()
|
val allProjects = script2.create(arrayListOf(buildFile)).findProjects()
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -128,7 +130,7 @@ private class Main @Inject constructor(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
plugins.applyPlugins(KobaltContext(args), allProjects)
|
plugins.applyPlugins(context, allProjects)
|
||||||
|
|
||||||
if (args.tasks) {
|
if (args.tasks) {
|
||||||
//
|
//
|
||||||
|
|
|
@ -31,7 +31,9 @@ public class Kobalt {
|
||||||
|
|
||||||
public val compilers : ArrayList<ICompilerInfo> = arrayListOf()
|
public val compilers : ArrayList<ICompilerInfo> = arrayListOf()
|
||||||
|
|
||||||
public fun registerCompiler(c: ICompilerInfo) {
|
var context: KobaltContext? = null
|
||||||
|
|
||||||
|
fun registerCompiler(c: ICompilerInfo) {
|
||||||
compilers.add(c)
|
compilers.add(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue