mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 00:38:11 -07:00
Fix Retrolambda for Windows.
Note: this file is now in its own repo, will delete it soon.
This commit is contained in:
parent
eedc0cfbb1
commit
8b92f31982
1 changed files with 9 additions and 3 deletions
|
@ -12,6 +12,7 @@ import com.beust.kobalt.misc.RunCommand
|
||||||
import com.google.inject.Inject
|
import com.google.inject.Inject
|
||||||
import com.google.inject.Singleton
|
import com.google.inject.Singleton
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
import java.nio.charset.Charset
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run Retrolambda on the classes right after "compile". This plug-in automatically downloads and uses
|
* Run Retrolambda on the classes right after "compile". This plug-in automatically downloads and uses
|
||||||
|
@ -55,11 +56,16 @@ class RetrolambdaPlugin @Inject constructor(val dependencyManager: DependencyMan
|
||||||
project.compileDependencies)
|
project.compileDependencies)
|
||||||
.map {
|
.map {
|
||||||
it.jarFile.get()
|
it.jarFile.get()
|
||||||
} + classesDir).joinToString(File.pathSeparator)
|
} + classesDir).joinToString("\n")
|
||||||
|
|
||||||
|
// Use retrolambda.classpathFile instead of retrolambda.classpath to avoid problems
|
||||||
|
// with file path separators on Windows
|
||||||
|
val classpathFile = File.createTempFile("kobalt-", "")
|
||||||
|
classpathFile.writeText(classpath, Charset.defaultCharset())
|
||||||
|
|
||||||
val args = listOf(
|
val args = listOf(
|
||||||
"-Dretrolambda.inputDir=" + classesDir,
|
"-Dretrolambda.inputDir=" + classesDir.replace("\\", "/"),
|
||||||
"-Dretrolambda.classpath=" + classpath,
|
"-Dretrolambda.classpathFile=" + classpathFile,
|
||||||
"-Dretrolambda.bytecodeVersion=${config.byteCodeVersion}",
|
"-Dretrolambda.bytecodeVersion=${config.byteCodeVersion}",
|
||||||
"-jar", JAR.jarFile.get().path)
|
"-jar", JAR.jarFile.get().path)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue