forked from mindcandy/Teamcity-unity3d-build-runner-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
70 lines (55 loc) · 3.07 KB
/
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<project xmlns:artifact="antlib:org.apache.maven.artifact.ant" name="unityrunner-custom-build" default="dist"
basedir=".">
<property file="build.properties"/>
<property name="plugin.name" value="unityRunner"/>
<property name="javac2.home" value="${basedir}/lib-compile"/>
<import file="teamcity-common.xml"/>
<import file="unityrunner.xml"/>
<target name="package" depends="define.version">
<package.teamcity.plugin name="${plugin.name}"
common.output="${unityrunner-common.output.dir}"
server.output="${unityrunner-server.output.dir}"
agent.output="${unityrunner-agent.output.dir}"
server.lib.dir="lib" server.lib.includes="*.jar"
plugin.descriptor.file="${basedir}/teamcity-plugin.xml"
plugin.version="${plugin.version}">
<agent-additional-files>
<fileset dir="${basedir}" id="agent-additional-files">
<include name="${unityrunner-agent.relative.output.dir}/*.exe"></include>
<include name="${unityrunner-agent.relative.output.dir}/*.config"></include>
<include name="lib/*.jar"/>
<exclude name="lib/*maven-ant-tasks*"/>
</fileset>
</agent-additional-files>
</package.teamcity.plugin>
</target>
<path id="maven-ant-tasks.classpath" path="lib/maven-ant-tasks-2.1.3.jar"/>
<typedef resource="org/apache/maven/artifact/ant/antlib.xml"
uri="antlib:org.apache.maven.artifact.ant"
classpathref="maven-ant-tasks.classpath"/>
<target name="define.version" depends="define.version.if.under.teamcity">
<tstamp>
<format property="current.time" pattern="yyyyMMddHHmm"/>
</tstamp>
<property name="plugin.version" value="SNAPSHOT-${current.time}"/>
</target>
<target name="define.version.if.under.teamcity" if="build.number">
<property name="plugin.version" value="${build.number}"/>
</target>
<target name="dist" depends="check.teamcitydistribution,all,package"/>
<target name="clean" depends="unityrunner.clean"/>
<target name="deploy" depends="dist">
<deploy.teamcity.plugin name="${plugin.name}"/>
</target>
<artifact:dependencies filesetId="dependency.fileset">
<dependency groupId="commons-io" artifactId="commons-io" version="2.4"/>
<dependency groupId="commons-configuration" artifactId="commons-configuration" version="1.9"/>
<dependency groupId="net.java.dev.jna" artifactId="jna" version="3.4.0"/>
<dependency groupId="net.java.dev.jna" artifactId="platform" version="3.4.0"/>
</artifact:dependencies>
<copy todir="${basedir}/lib">
<fileset refid="dependency.fileset"/>
<!-- This mapper strips off all leading directory information -->
<mapper type="flatten"/>
</copy>
</project>