mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 08:38:13 -07:00
Introducing project{}.
This commit is contained in:
parent
36aeb392ed
commit
a118d3680b
4 changed files with 28 additions and 25 deletions
|
@ -5,6 +5,7 @@ import com.beust.kobalt.Variant
|
|||
import com.beust.kobalt.api.*
|
||||
import com.beust.kobalt.api.annotation.Directive
|
||||
import com.beust.kobalt.internal.BaseJvmPlugin
|
||||
import com.beust.kobalt.internal.JvmCompilerPlugin
|
||||
import com.beust.kobalt.misc.warn
|
||||
import java.io.File
|
||||
import javax.inject.Inject
|
||||
|
@ -76,7 +77,8 @@ class JavaPlugin @Inject constructor(val javaCompiler: JavaCompiler)
|
|||
public fun javaProject(vararg projects: Project, init: JavaProject.() -> Unit): JavaProject {
|
||||
return JavaProject().apply {
|
||||
init()
|
||||
(Kobalt.findPlugin(JavaPlugin.PLUGIN_NAME) as JavaPlugin).addDependentProjects(this, projects.toList())
|
||||
(Kobalt.findPlugin(JvmCompilerPlugin.PLUGIN_NAME) as JvmCompilerPlugin)
|
||||
.addDependentProjects(this, projects.toList())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ import com.beust.kobalt.Variant
|
|||
import com.beust.kobalt.api.*
|
||||
import com.beust.kobalt.api.annotation.Directive
|
||||
import com.beust.kobalt.internal.BaseJvmPlugin
|
||||
import com.beust.kobalt.internal.JvmCompilerPlugin
|
||||
import com.beust.kobalt.maven.dependency.FileDependency
|
||||
import com.beust.kobalt.maven.dependency.MavenDependency
|
||||
import com.beust.kobalt.misc.KobaltExecutors
|
||||
|
@ -142,7 +143,8 @@ class KotlinPlugin @Inject constructor(val executors: KobaltExecutors)
|
|||
fun kotlinProject(vararg projects: Project, init: KotlinProject.() -> Unit): KotlinProject {
|
||||
return KotlinProject().apply {
|
||||
init()
|
||||
(Kobalt.findPlugin(KotlinPlugin.PLUGIN_NAME) as KotlinPlugin).addDependentProjects(this, projects.toList())
|
||||
(Kobalt.findPlugin(JvmCompilerPlugin.PLUGIN_NAME) as JvmCompilerPlugin)
|
||||
.addDependentProjects(this, projects.toList())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue