Skip to content

Instantly share code, notes, and snippets.

@Mercerenies
Created October 1, 2018 00:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mercerenies/7da21144a3030771a5cc5d88d6b062a5 to your computer and use it in GitHub Desktop.
Save Mercerenies/7da21144a3030771a5cc5d88d6b062a5 to your computer and use it in GitHub Desktop.
This configuration worked for me to compile Kotlin onto Android from the command line. My ant-fu is not great, but hopefully this helps someone else who struggled with it.
<?xml version="1.0" encoding="UTF-8"?>
<project name="kotlin_rules">
<property environment="env"/>
<typedef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${env.KOTLIN_HOME}/lib/kotlin-ant.jar"/>
<target name="-post-compile">
<path id="project.javac.classpath">
<path refid="project.all.jars.path" />
<path refid="tested.project.classpath" />
<path path="${java.compiler.classpath}" />
<path path="${project.target.android.jar}"/>
<path path="${out.classes.absolute.dir}" />
</path>
<kotlinc src="src" output="bin/classes"
classpathref="project.javac.classpath" />
</target>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment