Permalink
Fetching contributors…
Cannot retrieve contributors at this time
117 lines (99 sloc) 4.45 KB
<!--
~ Copyright 2010 Guy Mahieu
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<project name="IvyIDEA" default="bundle" basedir=".">
<property name="ivyidea.version" value="1.0.14"/>
<property name="ivyidea.sourcedir" value="src/main/java"/>
<property name="ivyidea.resourcedir" value="src/main/resources"/>
<property name="ivyidea.builddir" value="build/classes"/>
<property name="ivyidea.libdir" value="lib"/>
<property environment="env" />
<property name="idea.home" value="${env.IDEA_HOME}" />
<fail message="Environment variable IDEA_HOME was not set!">
<condition>
<equals arg1="${idea.home}" arg2="$${env.IDEA_HOME}" />
</condition>
</fail>
<taskdef name="javac2" classname="com.intellij.ant.Javac2">
<classpath>
<pathelement location="${idea.home}/redist/javac2.jar" />
<pathelement location="${idea.home}/lib/asm.jar" />
<pathelement location="${idea.home}/lib/asm-all.jar" />
<pathelement location="${idea.home}/lib/asm-commons.jar" />
<pathelement location="${idea.home}/lib/asm4-all.jar" />
<pathelement location="${idea.home}/lib/jdom.jar" />
<pathelement location="${idea.home}/lib/jgoodies-forms.jar" />
</classpath>
</taskdef>
<target name="clean">
<delete dir="build" />
</target>
<target name="jar">
<mkdir dir="build" />
<mkdir dir="${ivyidea.builddir}" />
<javac2 srcdir="${ivyidea.sourcedir}"
destdir="${ivyidea.builddir}"
source="1.6"
target="1.6"
includeantruntime="false"
debug="true">
<classpath>
<!-- intelliJ API -->
<pathelement location="${idea.home}/lib/annotations.jar" />
<pathelement location="${idea.home}/lib/extensions.jar" />
<pathelement location="${idea.home}/lib/forms_rt.jar" />
<pathelement location="${idea.home}/lib/jdom.jar" />
<pathelement location="${idea.home}/lib/openapi.jar" />
<pathelement location="${idea.home}/lib/util.jar" />
<pathelement location="${idea.home}/lib/idea.jar" />
<!-- Ivy -->
<pathelement location="${ivyidea.libdir}/ivy-2.4.0.jar" />
</classpath>
</javac2>
<jar file="build/ivyidea-${ivyidea.version}.jar">
<fileset dir="${ivyidea.builddir}">
<include name="**/*"/>
</fileset>
<fileset dir="${ivyidea.sourcedir}">
<include name="META-INF/**/*"/>
</fileset>
<fileset dir="${ivyidea.resourcedir}"/>
</jar>
</target>
<target name="bundle" depends="jar">
<delete dir="build/dist/tmp"/>
<mkdir dir="build/dist/tmp/IvyIDEA/lib"/>
<copy todir="build/dist/tmp/IvyIDEA/lib">
<!-- Ivy -->
<fileset file="${ivyidea.libdir}/ivy-2.4.0.jar"/>
<!--Third party Ivy runtime dependencies-->
<fileset file="${ivyidea.libdir}/jsch-0.1.31.jar"/>
<fileset file="${ivyidea.libdir}/oro-2.0.8.jar"/>
<fileset file="${ivyidea.libdir}/commons-vfs-1.0.jar"/>
<!-- IvyIDEA -->
<fileset dir="build" includes="ivyidea-${ivyidea.version}.jar"/>
</copy>
<mkdir dir="build/dist/tmp/IvyIDEA/license"/>
<copy todir="build/dist/tmp/IvyIDEA/license">
<fileset dir="src/main/license" includes="**/*"/>
</copy>
<zip file="build/dist/IvyIDEA-${ivyidea.version}.zip">
<fileset dir="build/dist/tmp">
<include name="IvyIDEA/**"/>
</fileset>
</zip>
<delete dir="build/dist/tmp"/>
</target>
</project>