Skip to content

Instantly share code, notes, and snippets.

@blangel
Created February 20, 2012 03:34
Show Gist options
  • Save blangel/1867619 to your computer and use it in GitHub Desktop.
Save blangel/1867619 to your computer and use it in GitHub Desktop.
Running Kotlin Main - Complete Ant Build
<project name="Kotlin" default="compile">
<property environment="env"/>
<taskdef file="${env.KOTLIN_HOME}/build-tools/ant/src/org/jetbrains/jet/buildtools/ant/antlib.xml">
<classpath>
<fileset dir="${env.KOTLIN_HOME}/dist/kotlinc/lib" includes="*.jar"/>
</classpath>
</taskdef>
<property name="output" value="${basedir}/dist"/>
<target name="clean">
<delete dir="${output}"/>
</target>
<target name="compile">
<kotlinc src="${basedir}/src/main/kotlin/" output="${output}"/>
</target>
<path id="classpath.run">
<pathelement path="${output}/"/>
<pathelement path="${env.KOTLIN_HOME}/dist/kotlinc/lib/kotlin-runtime.jar"/>
</path>
<target name="run">
<java classname="namespace">
<sysproperty key="file.encoding" value="UTF-8"/>
<classpath refid="classpath.run"/>
</java>
</target>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment