Skip to content

Instantly share code, notes, and snippets.

@takscape
Created October 13, 2011 10:54
Show Gist options
  • Save takscape/1283958 to your computer and use it in GitHub Desktop.
Save takscape/1283958 to your computer and use it in GitHub Desktop.
Scala: IntelliJ IDEA用build.xml
<?xml version="1.0" encoding="UTF-8"?>
<project name="scalatest" default="compile" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
Scala test code.
</description>
<property name="bin" location="out/production/scalatest"/>
<property name="src" location="src"/>
<property name="lib" location="lib"/>
<property name="version" value="dev"/>
<property environment="env"/>
<path id="core.classpath">
<fileset dir="${lib}">
<include name="*.jar"/>
</fileset>
<pathelement path="${java.class.path}"/>
</path>
<path id="compile.classpath">
<fileset dir="${env.SCALA_HOME}/lib">
<include name="*.jar"/>
</fileset>
<path refid="core.classpath"/>
</path>
<path id="run.classpath">
<path path="${bin}"/>
<path refid="core.classpath"/>
</path>
<target name="init">
<mkdir dir="${bin}"/>
</target>
<taskdef resource="scala/tools/ant/antlib.xml" classpathref="compile.classpath"/>
<target name="resolve">
<setproxy proxyhost="proxy.host" proxyport="proxy.port"/>
<ivy:settings file="ivysettings.xml"/>
<ivy:retrieve sync="true"/>
</target>
<target name="compile" depends="resolve">
<scalac encoding="utf-8" srcdir="${src}" destdir="${bin}"
classpathref="compile.classpath">
<include name="**/*.java"/>
<include name="**/*.scala"/>
<exclude name="**/.hg/"/>
</scalac>
<javac encoding="utf-8" srcdir="${src}" destdir="${bin}"
classpathref="compile.classpath"
source="1.5" target="1.5" debug="true" includeantruntime="false">
<include name="**/*.java"/>
<exclude name="**/.hg/"/>
</javac>
</target>
<target name="run" depends="compile">
<java fork="true" classname="scalatest" classpathref="run.classpath"/>
</target>
<target name="clean">
<delete quiet="true" includeemptydirs="true">
<fileset dir="${bin}" includes="**/*"/>
<fileset dir="${lib}" includes="**/*"/>
</delete>
</target>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment