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

Force a load of the compiler jar file.

This commit is contained in:
Cedric Beust 2015-10-13 01:26:13 -07:00
parent 6368fdf18b
commit 8adad2a773

View file

@ -4,6 +4,7 @@ import com.beust.kobalt.api.Kobalt
import com.beust.kobalt.internal.JvmCompilerPlugin
import com.beust.kobalt.internal.TaskResult
import com.beust.kobalt.maven.*
import com.beust.kobalt.misc.KFiles
import com.beust.kobalt.misc.KobaltExecutors
import com.beust.kobalt.misc.KobaltLogger
import org.jetbrains.kotlin.cli.jvm.K2JVMCompiler
@ -28,9 +29,10 @@ class KotlinCompiler @Inject constructor(override val localRepo : LocalRepo,
override val name = "kotlin"
private fun getKotlinCompilerJar(name: String) : String {
return com.beust.kobalt.misc.KFiles.joinDir(localRepo.toFullPath(""),
File("org/jetbrains/kotlin/${name}").path,
File("${KOTLIN_VERSION}/${name}-${KOTLIN_VERSION}.jar").getPath())
val id = "org.jetbrains.kotlin:$name:$KOTLIN_VERSION"
val dep = MavenDependency.create(id, executors.miscExecutor)
val result = dep.jarFile.get().absolutePath
return result
}
fun compile(compileDependencies: List<IClasspathDependency>, otherClasspath: List<String>,