2932 |
14 Nov 14 |
nicklas |
1 |
<?xml version="1.0" encoding="UTF-8"?> |
2932 |
14 Nov 14 |
nicklas |
2 |
<!-- |
2932 |
14 Nov 14 |
nicklas |
Copyright (C) 2011 Nicklas Nordborg |
2932 |
14 Nov 14 |
nicklas |
4 |
|
2932 |
14 Nov 14 |
nicklas |
This file is part of the Example Code Package for BASE. |
2932 |
14 Nov 14 |
nicklas |
Available at http://baseplugins.thep.lu.se/ |
2932 |
14 Nov 14 |
nicklas |
BASE main site: http://base.thep.lu.se/ |
2932 |
14 Nov 14 |
nicklas |
8 |
|
2932 |
14 Nov 14 |
nicklas |
This is free software; you can redistribute it and/or |
2932 |
14 Nov 14 |
nicklas |
modify it under the terms of the GNU General Public License |
2932 |
14 Nov 14 |
nicklas |
as published by the Free Software Foundation; either version 3 |
2932 |
14 Nov 14 |
nicklas |
of the License, or (at your option) any later version. |
2932 |
14 Nov 14 |
nicklas |
13 |
|
2932 |
14 Nov 14 |
nicklas |
The software is distributed in the hope that it will be useful, |
2932 |
14 Nov 14 |
nicklas |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
2932 |
14 Nov 14 |
nicklas |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2932 |
14 Nov 14 |
nicklas |
GNU General Public License for more details. |
2932 |
14 Nov 14 |
nicklas |
18 |
|
2932 |
14 Nov 14 |
nicklas |
You should have received a copy of the GNU General Public License |
2932 |
14 Nov 14 |
nicklas |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
2932 |
14 Nov 14 |
nicklas |
21 |
--> |
2932 |
14 Nov 14 |
nicklas |
22 |
<project |
2932 |
14 Nov 14 |
nicklas |
23 |
name="SkinCollection" |
2932 |
14 Nov 14 |
nicklas |
24 |
default="build" |
2932 |
14 Nov 14 |
nicklas |
25 |
basedir="."> |
2932 |
14 Nov 14 |
nicklas |
26 |
|
2932 |
14 Nov 14 |
nicklas |
<!--create this file if you need to override values from properties below --> |
2932 |
14 Nov 14 |
nicklas |
28 |
<property file="build.properties" /> |
2932 |
14 Nov 14 |
nicklas |
29 |
|
2932 |
14 Nov 14 |
nicklas |
<!-- variables used --> |
2932 |
14 Nov 14 |
nicklas |
31 |
<property name="name" value="skin-collection" /> |
6227 |
05 May 21 |
nicklas |
32 |
<property name="version" value="1.3-dev" /> |
2932 |
14 Nov 14 |
nicklas |
33 |
<property name="src" location="src" description="Location of source files" /> |
2932 |
14 Nov 14 |
nicklas |
34 |
<property name="build" location="build" description="Location of compiled files" /> |
2932 |
14 Nov 14 |
nicklas |
35 |
<property name="dist" location="dist" description="Directory where distribution should be created" /> |
2932 |
14 Nov 14 |
nicklas |
36 |
<property name="jar.name" value="${name}.jar" description="Name of JAR file with the extensions." /> |
2932 |
14 Nov 14 |
nicklas |
37 |
<property name="tar.prefix" value="${name}-${version}" description="Prefix of .tar.gz file for download." /> |
2932 |
14 Nov 14 |
nicklas |
38 |
<property name="tar.name" value="${tar.prefix}.tar.gz" description="Full name of .tar.gz file for download." /> |
2932 |
14 Nov 14 |
nicklas |
39 |
<property name="depend.base-version" |
6223 |
05 May 21 |
nicklas |
40 |
value="3.18.1" |
2932 |
14 Nov 14 |
nicklas |
41 |
description="The BASE version that this project depends on." |
2932 |
14 Nov 14 |
nicklas |
42 |
/> |
2932 |
14 Nov 14 |
nicklas |
43 |
|
2932 |
14 Nov 14 |
nicklas |
44 |
<target name="init"> |
2932 |
14 Nov 14 |
nicklas |
45 |
<mkdir dir="${build}" /> |
2932 |
14 Nov 14 |
nicklas |
46 |
<mkdir dir="${dist}" /> |
2932 |
14 Nov 14 |
nicklas |
47 |
</target> |
2932 |
14 Nov 14 |
nicklas |
48 |
|
2932 |
14 Nov 14 |
nicklas |
49 |
<target name="clean"> |
2932 |
14 Nov 14 |
nicklas |
50 |
<delete failonerror="false" includeemptydirs="true"> |
2932 |
14 Nov 14 |
nicklas |
51 |
<fileset dir="${build}" defaultexcludes="no" /> |
2932 |
14 Nov 14 |
nicklas |
52 |
<fileset dir="${dist}" defaultexcludes="no" /> |
2932 |
14 Nov 14 |
nicklas |
53 |
<fileset file="${jar.name}" /> |
2932 |
14 Nov 14 |
nicklas |
54 |
<fileset file="${tar.name}" /> |
2932 |
14 Nov 14 |
nicklas |
55 |
</delete> |
2932 |
14 Nov 14 |
nicklas |
56 |
</target> |
2932 |
14 Nov 14 |
nicklas |
57 |
|
2932 |
14 Nov 14 |
nicklas |
58 |
<target |
2932 |
14 Nov 14 |
nicklas |
59 |
name="dist" |
2932 |
14 Nov 14 |
nicklas |
60 |
depends="clean,build" |
2932 |
14 Nov 14 |
nicklas |
61 |
> |
2932 |
14 Nov 14 |
nicklas |
62 |
<copy todir="${dist}"> |
2932 |
14 Nov 14 |
nicklas |
63 |
<fileset dir="." includes="README,LICENSE" /> |
2932 |
14 Nov 14 |
nicklas |
64 |
<fileset file="${jar.name}" /> |
2932 |
14 Nov 14 |
nicklas |
65 |
</copy> |
2932 |
14 Nov 14 |
nicklas |
66 |
</target> |
2932 |
14 Nov 14 |
nicklas |
67 |
|
2932 |
14 Nov 14 |
nicklas |
68 |
<target |
2932 |
14 Nov 14 |
nicklas |
69 |
name="package" |
2932 |
14 Nov 14 |
nicklas |
70 |
depends="dist" |
2932 |
14 Nov 14 |
nicklas |
71 |
description="Create binary distribution package" |
2932 |
14 Nov 14 |
nicklas |
72 |
> |
2932 |
14 Nov 14 |
nicklas |
73 |
<tar |
2932 |
14 Nov 14 |
nicklas |
74 |
destfile="${tar.name}" |
2932 |
14 Nov 14 |
nicklas |
75 |
longfile="gnu" |
2932 |
14 Nov 14 |
nicklas |
76 |
compression="gzip" |
2932 |
14 Nov 14 |
nicklas |
77 |
> |
2932 |
14 Nov 14 |
nicklas |
78 |
<tarfileset |
2932 |
14 Nov 14 |
nicklas |
79 |
dir="${dist}" |
2932 |
14 Nov 14 |
nicklas |
80 |
prefix="${tar.prefix}" |
2932 |
14 Nov 14 |
nicklas |
81 |
preserveLeadingSlashes="true" |
2932 |
14 Nov 14 |
nicklas |
82 |
> |
2932 |
14 Nov 14 |
nicklas |
83 |
</tarfileset> |
2932 |
14 Nov 14 |
nicklas |
84 |
</tar> |
2932 |
14 Nov 14 |
nicklas |
85 |
</target> |
2932 |
14 Nov 14 |
nicklas |
86 |
|
2932 |
14 Nov 14 |
nicklas |
87 |
<target |
2932 |
14 Nov 14 |
nicklas |
88 |
name="build" |
2932 |
14 Nov 14 |
nicklas |
89 |
depends="init" |
2932 |
14 Nov 14 |
nicklas |
90 |
description="Compiles the plugin and put in jar" |
2932 |
14 Nov 14 |
nicklas |
91 |
> |
2932 |
14 Nov 14 |
nicklas |
92 |
<jar |
2932 |
14 Nov 14 |
nicklas |
93 |
jarfile="${jar.name}" |
2932 |
14 Nov 14 |
nicklas |
94 |
manifest="META-INF/MANIFEST.MF" |
2932 |
14 Nov 14 |
nicklas |
95 |
> |
2932 |
14 Nov 14 |
nicklas |
96 |
<fileset dir="." includes="META-INF/**" /> |
2932 |
14 Nov 14 |
nicklas |
97 |
<fileset dir="." includes="resources/**" /> |
2932 |
14 Nov 14 |
nicklas |
98 |
</jar> |
2932 |
14 Nov 14 |
nicklas |
99 |
</target> |
2932 |
14 Nov 14 |
nicklas |
100 |
|
2932 |
14 Nov 14 |
nicklas |
101 |
<target |
2932 |
14 Nov 14 |
nicklas |
102 |
name="install" |
2932 |
14 Nov 14 |
nicklas |
103 |
depends="build" |
2932 |
14 Nov 14 |
nicklas |
104 |
> |
2932 |
14 Nov 14 |
nicklas |
105 |
<fail unless="base.plugins" message="base.plugins is not set to the path of BASE plug-ins directory." /> |
2932 |
14 Nov 14 |
nicklas |
106 |
<copy todir="${base.plugins}"> |
2932 |
14 Nov 14 |
nicklas |
107 |
<fileset file="${jar.name}" /> |
2932 |
14 Nov 14 |
nicklas |
108 |
</copy> |
2932 |
14 Nov 14 |
nicklas |
109 |
<echo>Copied '${jar.name}' to '${base.plugins}'.</echo> |
2932 |
14 Nov 14 |
nicklas |
110 |
</target> |
2932 |
14 Nov 14 |
nicklas |
111 |
|
2932 |
14 Nov 14 |
nicklas |
112 |
<target name="update-version"> |
2932 |
14 Nov 14 |
nicklas |
113 |
<echo>Setting version to: ${version}</echo> |
2932 |
14 Nov 14 |
nicklas |
114 |
|
2932 |
14 Nov 14 |
nicklas |
115 |
<echo>extensions.xml</echo> |
2932 |
14 Nov 14 |
nicklas |
116 |
<replaceregexp |
2932 |
14 Nov 14 |
nicklas |
117 |
file="META-INF/extensions.xml" |
2932 |
14 Nov 14 |
nicklas |
118 |
match="<version>.*</version>" |
2932 |
14 Nov 14 |
nicklas |
119 |
replace="<version>${version}</version>" |
2932 |
14 Nov 14 |
nicklas |
120 |
encoding="UTF-8" |
2932 |
14 Nov 14 |
nicklas |
121 |
/> |
2932 |
14 Nov 14 |
nicklas |
122 |
<replaceregexp |
2932 |
14 Nov 14 |
nicklas |
123 |
file="META-INF/extensions.xml" |
2932 |
14 Nov 14 |
nicklas |
124 |
match="<min-base-version>.*</min-base-version>" |
2932 |
14 Nov 14 |
nicklas |
125 |
replace="<min-base-version>${depend.base-version}</min-base-version>" |
2932 |
14 Nov 14 |
nicklas |
126 |
encoding="UTF-8" |
2932 |
14 Nov 14 |
nicklas |
127 |
/> |
2932 |
14 Nov 14 |
nicklas |
128 |
<echo>Don't forget to commit the changes to the subversion repository!</echo> |
2932 |
14 Nov 14 |
nicklas |
129 |
</target> |
2932 |
14 Nov 14 |
nicklas |
130 |
</project> |