-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildtools.xml
69 lines (62 loc) · 3.47 KB
/
buildtools.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<!-- Copyright (c) Microsoft Corporation. All rights reserved. -->
<project name="buildtools" xmlns:ivy="antlib:org.apache.ivy.ant" >
<!--
NOTE: This file is to be used only for standalone building of libjitsi.
Task "get-build-dependencies" is skipped if libjitsi is included as a submodule.
This antfile fragment provides targets to define extra ant tasks.
Usage: <include file="PATH/TO/buildtools.xml" />, then depends="buildtools.init-whatever" on the targets that want to use the extra tasks.
If the `offlineBuild` property is set to "yes" or "true", the libraries will not be downloaded; otherwise they are downloaded using Apache Ivy (or via <get> task
in the case of the ivy.jar itself). All jar files are downloaded to the dynamically-created "buildtools" subdirectory of the project.
-->
<dirname property="project.basedir" file="${ant.file.buildtools}" />
<property name="ivy.version" value="2.5.0" />
<property name="ivy.dir" value="${project.basedir}/buildtools" />
<target name="init-ivy" unless="${offlineBuild}" >
<mkdir dir="${ivy.dir}" />
<get src="https://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.version}/ivy-${ivy.version}.jar"
dest="${ivy.dir}/ivy.jar" />
<taskdef resource="org/apache/ivy/ant/antlib.xml"
uri="antlib:org.apache.ivy.ant" classpath="${ivy.dir}/ivy.jar"/>
</target>
<condition property="skip-get-build-dependencies">
<or>
<istrue value="${get-build-dependencies-done}" />
<istrue value="${offlineBuild}" />
</or>
</condition>
<target name="get-build-dependencies" description="Get build-time dependencies" unless="skip-get-build-dependencies" depends="init-ivy" >
<!-- This target downloads the build-time tools only. -->
<ivy:settings file="${project.basedir}/ivysettings.xml" />
<ivy:resolve file="${project.basedir}/ivy.xml" transitive="true" conf="buildtools" />
<mkdir dir="${project.basedir}/buildtools" />
<ivy:retrieve conf="buildtools" pattern="${project.basedir}/buildtools/[artifact](-[classifier]).[ext]" overwriteMode="different" />
<property name="get-build-dependencies-done" value="true" />
</target>
<!-- Define ant-contrib tasks e.g. <if> -->
<target name="init-ant-contrib" depends="get-build-dependencies" >
<taskdef resource="net/sf/antcontrib/antlib.xml" >
<classpath>
<pathelement location="${project.basedir}/buildtools/ant-contrib.jar" />
</classpath>
</taskdef>
</target>
<!-- Define cpptasks tasks e.g. <cc> -->
<target name="init-cpptasks" depends="get-build-dependencies" >
<taskdef resource="cpptasks.tasks">
<classpath>
<pathelement location="${project.basedir}/buildtools/cpptasks.jar" />
<pathelement location="${project.basedir}/buildtools/xercesImpl.jar" />
</classpath>
</taskdef>
</target>
<!-- Define jacoco task <jacoco:coverage> -->
<target name="init-jacoco" depends="get-build-dependencies" >
<path id="jacoco.class.path" >
<fileset dir="${project.basedir}/buildtools" >
<include name="org.jacoco*.jar" />
<include name="asm*.jar" />
</fileset>
</path>
<taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml" classpathref="jacoco.class.path" />
</target>
</project>