forked from square/retrofit
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathivy-build.xml
48 lines (40 loc) · 1.64 KB
/
ivy-build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2010 Square, Inc. -->
<!--
- Ivy boilerplate build steps, helps keep the main buildfile clean.
-->
<project xmlns:ivy="antlib:org.apache.ivy.ant"
name="ivy-build" basedir="." default="init-ivy">
<property name="ivy.install.version" value="2.2.0"/>
<condition property="ivy.home" value="${env.IVY_HOME}">
<isset property="env.IVY_HOME"/>
</condition>
<property name="ivy.home" value="${user.home}/.ant"/>
<property name="ivy.jar.dir" value="${ivy.home}/lib"/>
<property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar"/>
<!--
- Gets Ivy from the public Maven repo so we don't need a custom Ant
- installation.
-->
<target name="download-ivy" unless="offline">
<mkdir dir="${ivy.jar.dir}"/>
<get
src="http://repo2.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
dest="${ivy.jar.file}" usetimestamp="true"/>
</target>
<target name="init-ivy" depends="download-ivy">
<!--
- Try to load ivy here from ivy home, in case the user has not already
- dropped it into ant's lib dir (note that the latter copy will always
- take precedence). We will not fail as long as local lib dir exists (it
- may be empty) and ivy is in at least one of ant's lib dir or the local
- lib dir.
-->
<path id="ivy.lib.path">
<fileset dir="${ivy.jar.dir}" includes="*.jar"/>
</path>
<taskdef resource="org/apache/ivy/ant/antlib.xml"
uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
<ivy:configure file="ivy-settings.xml"/>
</target>
</project>