From 3bb1a7445291b31eba62eabc292bbc595f2aa5e8 Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Sat, 25 Jun 2016 09:09:16 -0700 Subject: [PATCH] buildFileClasspath work. --- src/main/kotlin/com/beust/kobalt/app/BuildScriptUtil.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/com/beust/kobalt/app/BuildScriptUtil.kt b/src/main/kotlin/com/beust/kobalt/app/BuildScriptUtil.kt index a077a9e6..cf41d879 100644 --- a/src/main/kotlin/com/beust/kobalt/app/BuildScriptUtil.kt +++ b/src/main/kotlin/com/beust/kobalt/app/BuildScriptUtil.kt @@ -3,6 +3,7 @@ package com.beust.kobalt.app import com.beust.kobalt.KobaltException import com.beust.kobalt.Plugins import com.beust.kobalt.api.IPlugin +import com.beust.kobalt.api.Kobalt import com.beust.kobalt.api.KobaltContext import com.beust.kobalt.api.Project 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 // - kobalt's own jar file val allUrls = (urls + arrayOf(buildScriptJarFile.toURI().toURL()) - + files.kobaltJar.map {File(it).toURI().toURL() }) - .toTypedArray() + + files.kobaltJar.map {File(it).toURI().toURL() } + + Kobalt.buildFileClasspath.map { it.jarFile.get().toURI().toURL()}) + .toTypedArray() val classLoader = URLClassLoader(allUrls) //