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

buildFileClasspath work.

This commit is contained in:
Cedric Beust 2016-06-25 09:09:16 -07:00
parent afeccdc614
commit 3bb1a74452

View file

@ -3,6 +3,7 @@ package com.beust.kobalt.app
import com.beust.kobalt.KobaltException import com.beust.kobalt.KobaltException
import com.beust.kobalt.Plugins import com.beust.kobalt.Plugins
import com.beust.kobalt.api.IPlugin import com.beust.kobalt.api.IPlugin
import com.beust.kobalt.api.Kobalt
import com.beust.kobalt.api.KobaltContext import com.beust.kobalt.api.KobaltContext
import com.beust.kobalt.api.Project import com.beust.kobalt.api.Project
import com.beust.kobalt.api.annotation.IncrementalTask import com.beust.kobalt.api.annotation.IncrementalTask
@ -40,8 +41,9 @@ class BuildScriptUtil @Inject constructor(val plugins: Plugins, val files: KFile
// - all the plug-ins found in the build file // - all the plug-ins found in the build file
// - kobalt's own jar file // - kobalt's own jar file
val allUrls = (urls + arrayOf(buildScriptJarFile.toURI().toURL()) val allUrls = (urls + arrayOf(buildScriptJarFile.toURI().toURL())
+ files.kobaltJar.map {File(it).toURI().toURL() }) + files.kobaltJar.map {File(it).toURI().toURL() }
.toTypedArray() + Kobalt.buildFileClasspath.map { it.jarFile.get().toURI().toURL()})
.toTypedArray()
val classLoader = URLClassLoader(allUrls) val classLoader = URLClassLoader(allUrls)
// //