blob: fbdbc3eb863154c222136c4d9601c481d0b7f454 [file] [log] [blame]
<project name="Test gant invocation from Ant script" default="doGant" xmlns:if="ant:if">
<dirname property="build.dir" file="${ant.file}"/>
<property name="project.home" value="${build.dir}/.."/>
<property name="idea.lib" value="${project.home}/lib"/>
<condition property="gant.target" value="default">
<not>
<isset property="gant.target"/>
</not>
</condition>
<target name="init" unless="intellij.build.scripts.deps">
<condition property="gradle.executable" value="${project.home}/build/dependencies/gradlew.bat"
else="${project.home}/build/dependencies/gradlew">
<os family="windows"/>
</condition>
<exec executable="${gradle.executable}" dir="${project.home}/build/dependencies" failonerror="true">
<env key="JAVA_HOME" value="${java.home}"/>
<arg value="--no-daemon"/>
<arg value="setupBuildScriptsDeps"/>
</exec>
</target>
<target name="doGant" depends="init">
<condition property="script.deps" value="${intellij.build.scripts.deps}" else="build/dependencies/build/build-scripts-deps">
<isset property="intellij.build.scripts.deps"/>
</condition>
<path id="gant.classpath">
<fileset dir="${project.home}/build/lib/jps">
<include name="*.jar"/>
</fileset>
<pathelement path="${project.home}/platform/build-scripts/groovy"/>
<pathelement path="${project.home}/build/groovy"/>
<fileset file="${project.home}/jps/lib/optimizedFileManager.jar"/>
<fileset dir="${project.home}/${script.deps}">
<include name="*.jar"/>
</fileset>
<fileset dir="${idea.lib}">
<include name="jdom.jar"/>
<include name="log4j.jar"/>
<include name="netty*.jar"/>
<include name="asm-all.jar"/>
<include name="jgoodies-forms.jar"/>
<include name="picocontainer.jar"/>
<include name="jna.jar"/>
<include name="jna-platform.jar"/>
<include name="snappy-in-java-*.jar"/>
<include name="aether-*-all.jar"/>
<include name="maven-aether-provider-*-all.jar"/>
<include name="httpclient-*.jar"/>
<include name="httpcore-*.jar"/>
<include name="httpmime-*.jar"/>
<include name="slf4j-api-*.jar"/>
<include name="slf4j-log4j12-*.jar"/>
</fileset>
</path>
<taskdef name="gant" classname="org.jetbrains.jps.gant.GantWithClasspathTask">
<classpath refid="gant.classpath"/>
</taskdef>
<gant file="${gant.script}" target="${gant.target}"/>
</target>
</project>