mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 00:38:11 -07:00
Hide dynamicPlugins.
This commit is contained in:
parent
98e4831411
commit
90455bcfbe
2 changed files with 4 additions and 5 deletions
|
@ -5,7 +5,6 @@ import com.beust.kobalt.api.Kobalt
|
||||||
import com.beust.kobalt.api.annotation.Directive
|
import com.beust.kobalt.api.annotation.Directive
|
||||||
import com.beust.kobalt.maven.DepFactory
|
import com.beust.kobalt.maven.DepFactory
|
||||||
import com.beust.kobalt.maven.dependency.FileDependency
|
import com.beust.kobalt.maven.dependency.FileDependency
|
||||||
import com.beust.kobalt.misc.KobaltExecutors
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
@Directive
|
@Directive
|
||||||
|
@ -17,15 +16,14 @@ fun file(file: String) : String = FileDependency.PREFIX_FILE + file
|
||||||
|
|
||||||
@Directive
|
@Directive
|
||||||
fun plugins(vararg dependency : IClasspathDependency) {
|
fun plugins(vararg dependency : IClasspathDependency) {
|
||||||
Plugins.dynamicPlugins.addAll(dependency)
|
dependency.forEach { Plugins.addDynamicPlugin(it) }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Directive
|
@Directive
|
||||||
fun plugins(vararg dependencies : String) {
|
fun plugins(vararg dependencies : String) {
|
||||||
val executor = Kobalt.INJECTOR.getInstance(KobaltExecutors::class.java).miscExecutor
|
|
||||||
val factory = Kobalt.INJECTOR.getInstance(DepFactory::class.java)
|
val factory = Kobalt.INJECTOR.getInstance(DepFactory::class.java)
|
||||||
dependencies.forEach {
|
dependencies.forEach {
|
||||||
Plugins.dynamicPlugins.add(factory.create(it, executor))
|
Plugins.addDynamicPlugin(factory.create(it))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,8 @@ public class Plugins @Inject constructor (val taskManagerProvider : Provider<Tas
|
||||||
/**
|
/**
|
||||||
* The list of plugins found in the build file.
|
* The list of plugins found in the build file.
|
||||||
*/
|
*/
|
||||||
val dynamicPlugins : ArrayList<IClasspathDependency> = arrayListOf()
|
internal val dynamicPlugins : ArrayList<IClasspathDependency> = arrayListOf()
|
||||||
|
fun addDynamicPlugin(plugin: IClasspathDependency) = dynamicPlugins.add(plugin)
|
||||||
|
|
||||||
val defaultPlugin : IPlugin get() = findPlugin(KobaltPlugin.PLUGIN_NAME)!!
|
val defaultPlugin : IPlugin get() = findPlugin(KobaltPlugin.PLUGIN_NAME)!!
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue