forked from jarrodek/ChromeRestClient
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon.ant.xml
52 lines (47 loc) · 2.65 KB
/
common.ant.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
<project name="common">
<property name="gwt.root" location="." />
<property file="local.ant.properties" />
<property file="build.properties" />
<property environment="env" />
<!-- try from system properties set GWT SDK location -->
<condition property="gwt.home" value="${env.GWT_HOME}">
<isset property="env.GWT_HOME" />
</condition>
<!-- But override if there is SDK location set in properties file. -->
<condition property="gwt.home" value="${GWT_HOME}">
<isset property="GWT_HOME" />
</condition>
<!-- Report an error if there is no SDK available. -->
<fail unless="gwt.home" message="You need to set env value 'GWT_HOME' that's point to GWTs sdk home dir. Use command: export GWT_HOME=./gwt/home/path/ (${gwt.home})" />
<!-- Check for GWT VERSION. -->
<!-- If system property exists - set its value or default value -->
<condition property="gwt.version" value="${env.GWT_VERSION}">
<isset property="env.GWT_VERSION" />
</condition>
<!-- If local project value exist - overwrite system values. -->
<condition property="gwt.version" value="${GWT_VERSION}">
<isset property="GWT_VERSION" />
</condition>
<fail unless="gwt.version" message="GWT version not set. '${gwt.version}'; perhaps you should define the GWT_VERSION environment variable" />
<!-- Location for .class files -->
<property name="classes.dir" value="${build.dir}${file.separator}classes" />
<!-- Location for .jar file -->
<property name="module.jar.dir" value="${build.dir}${file.separator}jar" />
<!-- Location for working directory -->
<property name="module.tmp.dir" value="${build.dir}${file.separator}tmp" />
<property name="module.src.dir" value="src${file.separator}" />
<!-- gwt-dev.jar file location -->
<property name="gwt.dev.jar" location="${gwt.home}${file.separator}gwt-user.jar" />
<!-- set is.gwt property to fail if file doeas not exists -->
<condition property="gwt.is.dev">
<available file="${gwt.dev.jar}" />
</condition>
<!-- Report an error if dev file do not exists -->
<fail unless="gwt.is.dev" message="Cannot find '${gwt.dev.jar}'; perhaps you should define the GWT_HOME environment variable" />
<!-- Final file name for builded jar -->
<property name="module.jar.filename" value="${jar.modulename}-${gwt.version}.jar" />
<property name="module.jar.file" value="${module.jar.dir}${file.separator}${module.jar.filename}" />
<property name="module.src.root" location="${src.dir}${file.separator}${module.path}${file.separator}" />
<property name="module.tmp.root" location="${module.tmp.dir}${file.separator}${module.path}${file.separator}" />
<property name="module.path.module.file.src" location="${module.src.root}${file.separator}${module.name}" />
</project>