-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.xml
171 lines (150 loc) · 7.41 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
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
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
<!-- for some information on what you could do (e.g. targets to override). -->
<!-- If you delete this file and reopen the project it will be recreated. -->
<project name="com.redhat.ceylon.ide.netbeans" default="netbeans" basedir=".">
<description>Builds, tests, and runs the project com.redhat.ceylon.ide.netbeans.</description>
<import file="nbproject/build-impl.xml"/>
<property file="config.properties"/>
<property name="ceylon.verbosity" value="false" />
<property name="ceylon.executable" value="${dist.bin.dir}/ceylon" />
<property name="out.repo" location="modules" />
<property name="ceylon.repo.dir" location="${user.home}/.ceylon/repo" />
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="${ceylon.root.dir}/lib/ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>
<path id="ant-tasks">
<pathelement location="${ceylon.ant.lib}" />
</path>
<tstamp>
<format property="buildnumber" pattern="yyyyMMddHHmm" timezone="UTC"/>
<format property="specnumber" pattern="yyMMddHHmm" timezone="UTC"/>
</tstamp>
<property name="ceylon.version" value="1.3.4"/>
<property name="spec.version.base" value="${ceylon.version}.${specnumber}"/>
<target name="ceylondefs">
<typedef resource="org/eclipse/ceylon/ant/antlib.xml" classpathref="ant-tasks" />
<moduleset id="modules.source">
<module name="com.redhat.ceylon.ide.netbeans" />
</moduleset>
<reposet id="reposet.compile">
<repo url="${out.repo}" />
<repo url="aether:./settings.xml"/>
<repo url="${basedir}/../ceylon-ide-common/repo"/>
<repo url="${ceylon.repo.dir}" />
</reposet>
</target>
<!-- Clean -->
<target name="clean-ceylon">
<delete dir="${basedir}/modules"/>
<delete dir="${basedir}/release/ceylon/embeddedDist"/>
<delete dir="${basedir}/release/ceylon/embeddedRepo"/>
</target>
<target name="clean" depends="clean-ceylon,projectized-common.clean"/>
<!-- Prepare dependencies -->
<target name="nb-deps-up-to-date">
<uptodate targetfile="${basedir}/modules/com/redhat/ceylon/ide/netbeans/current/com.redhat.ceylon.ide.netbeans-current.car"
property="nb.deps.uptodate">
<srcfiles dir="nbproject">
<include name="project.xml"/>
<include name="project.properties"/>
</srcfiles>
</uptodate>
</target>
<target name="ceylon-init-release">
<echo message="Gathering Ceylon dependencies"/>
<mkdir dir="${basedir}/release/ceylon/embeddedRepo"/>
<copy todir="${basedir}/release/ceylon/embeddedRepo/ceylon/collection/">
<fileset dir="${basedir}/../ceylon-sdk/modules/ceylon/collection/"
includes="${ceylon.dist.version}/**.car"/>
</copy>
<copy todir="${basedir}/release/ceylon/embeddedRepo/ceylon/file/">
<fileset dir="${basedir}/../ceylon-sdk/modules/ceylon/file/"
includes="${ceylon.dist.version}/**.car"/>
</copy>
<copy todir="${basedir}/release/ceylon/embeddedRepo/ceylon/interop/java/">
<fileset dir="${basedir}/../ceylon-sdk/modules/ceylon/interop/java/"
includes="${ceylon.dist.version}/**.car"/>
</copy>
<copy todir="${basedir}/release/ceylon/embeddedRepo/org/eclipse/ceylon/ide/common/">
<fileset dir="${basedir}/../ceylon-ide-common/modules/org/eclipse/ceylon/ide/common/"
includes="${ceylon.dist.version}/**.car"/>
</copy>
<copy todir="${basedir}/release/ceylon/embeddedRepo/org/jgrapht/core/">
<fileset dir="${basedir}/../ceylon-ide-common/repo/org/jgrapht/core/"
includes="0.9.1/**.jar"/>
</copy>
<copy todir="${basedir}/release/ceylon/embeddedRepo/net/lingala/zip4j/">
<fileset dir="${basedir}/../ceylon-ide-common/repo/net/lingala/zip4j/"
includes="1.3.2/**.jar"/>
</copy>
<copy todir="${basedir}/release/ceylon/embeddedRepo/ceylon/formatter/">
<fileset dir="${basedir}/../ceylon.formatter/modules/ceylon/formatter/"
includes="${ceylon.dist.version}/**.car"/>
</copy>
<copy todir="${basedir}/release/ceylon/embeddedDist">
<fileset dir="${basedir}/../ceylon/dist/dist"/>
</copy>
</target>
<target name="init" depends="ceylon-init-release,harness.init"/>
<!-- Compile -->
<target name="compile-ceylon" depends="ceylondefs">
<ceylon-compile executable="${ceylon.executable}"
verbose="${ceylon.verbosity}"
encoding="UTF-8"
pack200="true"
fork="true"
mavenoverrides="${basedir}/overrides.xml"
out="${out.repo}">
<source value="${basedir}/source"/>
<reposet refid="reposet.compile"/>
<moduleset refid="modules.source"/>
</ceylon-compile>
<copy todir="${basedir}/release/ceylon/embeddedRepo/com/redhat/ceylon/ide/netbeans/">
<fileset dir="${basedir}/modules/com/redhat/ceylon/ide/netbeans/" includes="current/**.car"/>
</copy>
</target>
<target name="compile" depends="compile-ceylon,projectized-common.compile"/>
<!-- Rebuild update_tracking because some files were added after module.files was set -->
<target name="netbeans" depends="-netbeans">
<pathconvert pathsep="," property="our.release.files">
<path>
<fileset dir="${release.dir}"/>
</path>
<filtermapper>
<replacestring from="${release.dir}${file.separator}" to=""/>
<replacestring from=" " to="?"/>
</filtermapper>
</pathconvert>
<patternset id="our.module.files" includes="${our.release.files},${release.files},${release.files.extra},${extra.module.files}">
<include name="${module.jar}"/>
<include name="${javahelp.jar}" if="has.javahelp"/>
<include name="config/Modules/${code.name.base.dashes}.xml"/>
<include name="config/ModuleAutoDeps/${code.name.base.dashes}.xml" if="has.module.auto.deps"/>
<include name="ant/nblib/${code.name.base.dashes}.jar"/>
</patternset>
<genlist outputfiledir="${cluster}" module="${module.jar}">
<fileset dir="${cluster}">
<patternset refid="our.module.files"/>
</fileset>
</genlist>
</target>
<target name="create-update-center" depends="nbm">
<pathfileset id="updater.jar">
<path refid="cluster.path.id"/>
<filename name="modules/ext/updater.jar"/>
</pathfileset>
<makeupdatedesc desc="./build/updates.xml" distbase="."
automaticgrouping="true"
uselicenseurl="${use.license.url.in.catalog}">
<fileset dir="./build">
<include name="*.nbm"/>
</fileset>
<updaterjar>
<resources refid="updater.jar"/>
</updaterjar>
</makeupdatedesc>
</target>
</project>