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

Turning on project{} (and warnings for javaProject/kotlinProject).

This commit is contained in:
Cedric Beust 2016-02-04 22:38:49 +04:00
parent a118d3680b
commit 44bc37881e
5 changed files with 22 additions and 13 deletions

View file

@ -0,0 +1,16 @@
package com.beust.kobalt
import com.beust.kobalt.api.Kobalt
import com.beust.kobalt.api.Project
import com.beust.kobalt.api.annotation.Directive
import com.beust.kobalt.internal.JvmCompilerPlugin
@Directive
public fun project(vararg projects: Project, init: Project.() -> Unit): Project {
return Project("").apply {
init()
(Kobalt.findPlugin(JvmCompilerPlugin.PLUGIN_NAME) as JvmCompilerPlugin)
.addDependentProjects(this, projects.toList())
}
}

View file

@ -308,12 +308,3 @@ open class JvmCompilerPlugin @Inject constructor(
open val compiler: ICompilerContributor? = null
}
@Directive
public fun project(vararg projects: Project, init: Project.() -> Unit): Project {
return Project("").apply {
init()
(Kobalt.findPlugin(JvmCompilerPlugin.PLUGIN_NAME) as JvmCompilerPlugin)
.addDependentProjects(this, projects.toList())
}
}