Permalink
Fetching contributors…
Cannot retrieve contributors at this time
49 lines (41 sloc) 2.19 KB
<?xml version="1.0" encoding="UTF-8"?>
<project default="get.idea" name="idea">
<dirname property="idea.basedir" file="${ant.file.idea}"/>
<property environment="env"/>
<property name="idea.version" value="${env.IDEA_VERSION}"/>
<property name="idea.output.dir" value="${idea.basedir}/dependencies/idea/${idea.version}"/>
<property name="idea.tarball" value="ideaIC-${idea.version}.tar.gz"/>
<property name="idea.cache" value="${idea.basedir}/cache/idea/${idea.version}"/>
<property name="idea.tarball.root.basename" value="${env.IDEA_TARBALL_ROOT_BASENAME}"/>
<property name="idea.output.tarball.root.dir" value="${idea.output.dir}/${idea.tarball.root.basename}"/>
<available file="${idea.output.tarball.root.dir}" property="idea.output.tarball.root.available"/>
<available file="${idea.output.dir}/${idea.tarball}" property="idea.tarball.available"/>
<target name="clean.idea">
<delete quiet="true">
<fileset dir="${idea.output.dir}"/>
<fileset dir="${idea.cache}"/>
</delete>
</target>
<target name="get.idea" depends="unpack.idea.tarball" description="Get IntelliJ IDEA Community from Jetbrains">
<copy todir="${idea.cache}">
<fileset dir="${idea.output.tarball.root.dir}"/>
</copy>
</target>
<target name="get.idea.tarball" description="Get IntelliJ IDEA Community tarball from Jetbrains" unless="idea.tarball.available">
<mkdir dir="${idea.output.dir}"/>
<get dest="${idea.output.dir}"
src="http://download-cf.jetbrains.com/idea/${idea.tarball}"
usetimestamp="true"
verbose="true"/>
</target>
<target name="unpack.idea.tarball" depends="get.idea.tarball" description="tar -xvfz ideaIC-${idea.version}.tar.gz" unless="idea.output.tarball.root.available">
<!-- untar task has exception: java.io.IOException: unexpected EOF with 1024 bytes unread -->
<exec dir="${idea.output.dir}" executable="tar">
<arg value="-x"/>
<arg value="-v"/>
<arg value="-f"/>
<arg value="${idea.output.dir}/${idea.tarball}"/>
<arg value="-z"/>
</exec>
</target>
</project>