https://kotlinlang.org logo
#announcements
Title
# announcements
n

nfrankel

12/05/2017, 2:20 PM
anyone tried to use the kotlin ant task? it uses the
KotlinAntTaskUtil.kt
file under the cover which checks for the existence of files, not classes on the classpath 1. i’ve to rename files and lose versions, i can live with that 2. i cannot use the embeddable compiler, and run into classpath issues regarding conflicting guava versions ok, this is very specific still, hints appreciated
@yole any hint? 😬
u

udalov

12/05/2017, 4:42 PM
What is the exact problem you're facing? Are you trying to run the Kotlin Ant task without Ant?
n

nfrankel

12/05/2017, 5:00 PM
i’m trying to run the ant task i need some JAR, including the
kotlin-compiler.jar
first issue, i need to remove the version from the JAR name, because the aforementioned class checks for the exact file name plus, i have google guava on class path the compiler also has guava inside, which create compatibility issues the solution is to use the
kotlin-embedddable-compiler.jar
but that’s not possible because the file name is checked again and it doesn’t work...
u

udalov

12/05/2017, 6:17 PM
As far as I see,
KotlinAntTaskUtil
loads the Kotlin compiler in an isolated class loader, so there shouldn't be compatibility issues. Please report this at kotl.in/issue, preferably with the relevant code from your build.xml. Meanwhile, I guess you can rename
kotlin-compiler-embeddable-{...}.jar
to
kotlin-compiler.jar
to make it work in your case
n

nfrankel

12/05/2017, 9:57 PM
that’s what i ended up doing 🙂 thanks for the assist
2 Views