forked from iterate-ch/cyberduck
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
175 lines (159 loc) · 7.01 KB
/
build.xml
File metadata and controls
175 lines (159 loc) · 7.01 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2002-2016 iterate GmbH. All rights reserved.
~ https://cyberduck.io/
~
~ This program is free software; you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation; either version 2 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
-->
<project name="Cyberduck" basedir=".">
<property file="build.properties"/>
<property environment="env"/>
<property name="module" location="."/>
<property name="build" value="${module}/target"/>
<property name="build.compile.target" value="${ant.java.version}"/>
<property name="configuration" value="release"/>
<property name="build.deploy" location="${build}/${configuration}"/>
<property name="build.bundles" value="${build.deploy}/bundles"/>
<property name="build.classes" value="${build}/classes"/>
<property name="build.unittests" value="${build}/test-classes"/>
<property name="build.unittests.include" value="**/*Test.class"/>
<property name="build.unittests.reports" value="${build}/report"/>
<property name="config" value="${home}/config"/>
<property name="img" value="${home}/img"/>
<property name="lib" value="${home}/lib"/>
<property name="lib.ext" value="${lib}/ext"/>
<property name="profiles" value="${home}/profiles"/>
<property name="profiles.default" value="${profiles}/default"/>
<property name="www" value="${home}/www"/>
<property name="www.update" value="${www}/update"/>
<property name="www.help" value="${www}/help"/>
<property name="setup" value="${home}/setup"/>
<tstamp>
<format property="year.current" pattern="yyyy"/>
</tstamp>
<property name="copyright"
value="Copyright (c) 2001-${year.current} David Kocher. Copyright (c) 2011-${year.current} Yves Langisch"/>
<echo message="${copyright}"/>
<property name="bundle.contents" value="Contents"/>
<property name="bundle.home" value="${bundle.contents}/Home"/>
<property name="bundle.macos" value="${bundle.contents}/MacOS"/>
<property name="bundle.plugins" value="${bundle.contents}/PlugIns"/>
<property name="bundle.library" value="${bundle.contents}/Library"/>
<property name="bundle.login" value="${bundle.library}/LoginItems"/>
<property name="bundle.frameworks" value="${bundle.contents}/Frameworks"/>
<property name="bundle.resources" value="${bundle.contents}/Resources"/>
<property name="bundle.spotlight" value="${bundle.library}/Spotlight"/>
<property name="bundle.profiles" value="${bundle.resources}/Profiles"/>
<property name="bundle.bookmarks" value="${bundle.resources}/Bookmarks"/>
<condition property="platform.mac">
<os family="mac"/>
</condition>
<condition property="platform.windows">
<os family="windows"/>
</condition>
<condition property="platform.linux">
<and>
<not>
<!-- Exclude OS X-->
<isset property="platform.mac"/>
</not>
<os family="unix"/>
</and>
</condition>
<condition property="debug" value="on" else="off">
<equals arg1="${configuration}" arg2="debug" />
</condition>
<target name="init" depends="timestamp">
<echo message=""/>
<echo message=" ---------------------------------------------------------------"/>
<echo message=" Java Version: ${ant.java.version}"/>
<echo message=" Home: ${home}"/>
<echo message=" Module: ${module}"/>
<echo message=" Build Target: ${build}"/>
<echo message=" ---------------------------------------------------------------"/>
<echo message=""/>
<echo message="Building ${ant.project.name} on ${os.name}/${os.arch} at ${touch.time}..."/>
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath path="${lib.ext}/ant-contrib-1.0b3.jar"/>
</taskdef>
</target>
<target name="version" depends="init">
<property name="fullversion" value="${version}"/>
<propertyregex property="version"
override="true"
input="${version}"
regexp="((\d+)\.(\d+)(\.(\d+))?)(-SNAPSHOT)?"
select="\1"/>
<condition property="twoDigitsVersion">
<matches string="${version}" pattern="^(\d+)\.(\d+)$"/>
</condition>
<if>
<isset property="twoDigitsVersion"/>
<then>
<property name="normalized.version" value="${version}.0"/>
</then>
<else>
<property name="normalized.version" value="${version}"/>
</else>
</if>
<echo message="Version ${version}"/>
<echo message="Revision ${revision}"/>
<echo message="Hash ${git.revision}"/>
</target>
<target name="timestamp">
<tstamp>
<format property="touch.time"
pattern="dd/MM/yyyy hh:mm aa"
timezone="GMT+1"
locale="en"/>
</tstamp>
</target>
<!--
Windows
-->
<target name="msbuild">
<taskdef name="msbuild" classname="org.apache.ant.dotnet.build.MSBuildTask">
<classpath path="${lib.ext}/ant-dotnet-1.1.jar" />
</taskdef>
<condition property="msbuild.sign" value="false">
<isset property="skipSign"/>
</condition>
<property name="msbuild.sign" value="" />
<condition property="msbuild.configuration" value="Debug">
<equals arg1="${configuration}" arg2="debug" />
</condition>
<property name="msbuild.configuration" value="Release" />
</target>
<target name="msbuild-props" depends="version">
<condition property="msbuild.sign" value="false">
<isset property="skipSign"/>
</condition>
<property name="msbuild.sign" value=""/>
<property name="signtool" value="cng" />
<property name="revision" value="0" />
<copy todir="${build}/generated/msbuild" overwrite="True">
<resources>
<fileset dir="${home}/src/template/msbuild" erroronmissingdir="false" />
<fileset dir="${module}/src/template/msbuild" erroronmissingdir="false" />
</resources>
<filterchain>
<expandproperties />
</filterchain>
</copy>
</target>
<target name="nuget-unpack">
<exec dir="." executable="powershell.exe">
<arg line="-ExecutionPolicy bypass" />
<arg value="-Command" />
<arg value="& { & '${home}/src/main/msbuild/NuGet-Unpack.ps1' '${build}/.nuget/packages.list' }" />
</exec>
</target>
</project>