anyone tried to use the kotlin ant task? it uses t...
# announcements
n
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
What is the exact problem you're facing? Are you trying to run the Kotlin Ant task without Ant?
n
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
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
that’s what i ended up doing 🙂 thanks for the assist