| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<!-- |
| 3 |
~ Copyright 2000-2014 JetBrains s.r.o. |
| 4 |
~ |
| 5 |
~ Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 |
~ you may not use this file except in compliance with the License. |
| 7 |
~ You may obtain a copy of the License at |
| 8 |
~ |
| 9 |
~ http://www.apache.org/licenses/LICENSE-2.0 |
| 10 |
~ |
| 11 |
~ Unless required by applicable law or agreed to in writing, software |
| 12 |
~ distributed under the License is distributed on an "AS IS" BASIS, |
| 13 |
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 |
~ See the License for the specific language governing permissions and |
| 15 |
~ limitations under the License. |
| 16 |
--> |
| 17 |
|
| 18 |
<project name="iconloader" default="all"> |
| 19 |
|
| 20 |
|
| 21 |
<!--<property file="iconloader.properties"/>--> |
| 22 |
|
| 23 |
<property name="skip.tests" value="true"/> |
| 24 |
|
| 25 |
<!-- Compiler options --> |
| 26 |
|
| 27 |
<property name="compiler.debug" value="on"/> |
| 28 |
<property name="compiler.generate.no.warnings" value="off"/> |
| 29 |
<property name="compiler.args" value=""/> |
| 30 |
<property name="compiler.max.memory" value="700m"/> |
| 31 |
<patternset id="ignored.files"> |
| 32 |
<exclude name="**/CVS/**"/> |
| 33 |
<exclude name="**/SCCS/**"/> |
| 34 |
<exclude name="**/RCS/**"/> |
| 35 |
<exclude name="**/rcs/**"/> |
| 36 |
<exclude name="**/.DS_Store/**"/> |
| 37 |
<exclude name="**/.svn/**"/> |
| 38 |
<exclude name="**/.pyc/**"/> |
| 39 |
<exclude name="**/.pyo/**"/> |
| 40 |
<exclude name="**/*.pyc/**"/> |
| 41 |
<exclude name="**/*.pyo/**"/> |
| 42 |
<exclude name="**/.git/**"/> |
| 43 |
<exclude name="**/*.hprof/**"/> |
| 44 |
<exclude name="**/_svn/**"/> |
| 45 |
<exclude name="**/.hg/**"/> |
| 46 |
<exclude name="**/*.lib/**"/> |
| 47 |
<exclude name="**/*~/**"/> |
| 48 |
<exclude name="**/__pycache__/**"/> |
| 49 |
<exclude name="**/.bundle/**"/> |
| 50 |
<exclude name="**/*.rbc/**"/> |
| 51 |
</patternset> |
| 52 |
<patternset id="library.patterns"> |
| 53 |
<include name="*.zip"/> |
| 54 |
<include name="*.apk"/> |
| 55 |
<include name="*.war"/> |
| 56 |
<include name="*.egg"/> |
| 57 |
<include name="*.ear"/> |
| 58 |
<include name="*.ane"/> |
| 59 |
<include name="*.swc"/> |
| 60 |
<include name="*.jar"/> |
| 61 |
</patternset> |
| 62 |
<patternset id="compiler.resources"> |
| 63 |
<exclude name="**/?*.java"/> |
| 64 |
<exclude name="**/?*.form"/> |
| 65 |
<exclude name="**/?*.class"/> |
| 66 |
<exclude name="**/?*.groovy"/> |
| 67 |
<exclude name="**/?*.scala"/> |
| 68 |
<exclude name="**/?*.flex"/> |
| 69 |
<exclude name="**/?*.kt"/> |
| 70 |
<exclude name="**/?*.clj"/> |
| 71 |
</patternset> |
| 72 |
|
| 73 |
|
| 74 |
<!-- Project Libraries --> |
| 75 |
|
| 76 |
<path id="library.eawtstub.classpath"> |
| 77 |
<pathelement location="${basedir}/lib/eawtstub.jar"/> |
| 78 |
</path> |
| 79 |
|
| 80 |
<!-- Modules --> |
| 81 |
|
| 82 |
|
| 83 |
<!-- Module IconLoader --> |
| 84 |
|
| 85 |
<dirname property="module.iconloader.basedir" file="${ant.file}"/> |
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
<property name="compiler.args.iconloader" value="${compiler.args}"/> |
| 90 |
|
| 91 |
<property name="iconloader.output.dir" value="${module.iconloader.basedir}/out/production/IconLoader"/> |
| 92 |
<property name="iconloader.testoutput.dir" value="${module.iconloader.basedir}/out/test/IconLoader"/> |
| 93 |
|
| 94 |
<path id="iconloader.module.bootclasspath"> |
| 95 |
<!-- Paths to be included in compilation bootclasspath --> |
| 96 |
</path> |
| 97 |
|
| 98 |
<path id="iconloader.module.production.classpath"> |
| 99 |
<path refid="library.eawtstub.classpath"/> |
| 100 |
</path> |
| 101 |
|
| 102 |
<path id="iconloader.runtime.production.module.classpath"> |
| 103 |
<pathelement location="${iconloader.output.dir}"/> |
| 104 |
<path refid="library.eawtstub.classpath"/> |
| 105 |
</path> |
| 106 |
|
| 107 |
<path id="iconloader.module.classpath"> |
| 108 |
<pathelement location="${iconloader.output.dir}"/> |
| 109 |
<path refid="library.eawtstub.classpath"/> |
| 110 |
</path> |
| 111 |
|
| 112 |
<path id="iconloader.runtime.module.classpath"> |
| 113 |
<pathelement location="${iconloader.testoutput.dir}"/> |
| 114 |
<pathelement location="${iconloader.output.dir}"/> |
| 115 |
<path refid="library.eawtstub.classpath"/> |
| 116 |
</path> |
| 117 |
|
| 118 |
|
| 119 |
<patternset id="excluded.from.module.iconloader"> |
| 120 |
<patternset refid="ignored.files"/> |
| 121 |
</patternset> |
| 122 |
|
| 123 |
<patternset id="excluded.from.compilation.iconloader"> |
| 124 |
<patternset refid="excluded.from.module.iconloader"/> |
| 125 |
</patternset> |
| 126 |
|
| 127 |
<path id="iconloader.module.sourcepath"> |
| 128 |
<dirset dir="${module.iconloader.basedir}"> |
| 129 |
<include name="src"/> |
| 130 |
</dirset> |
| 131 |
</path> |
| 132 |
|
| 133 |
|
| 134 |
<target name="compile.module.iconloader" depends="compile.module.iconloader.production,compile.module.iconloader.tests" description="Compile module IconLoader"/> |
| 135 |
|
| 136 |
<target name="compile.module.iconloader.production" description="Compile module IconLoader; production classes"> |
| 137 |
<mkdir dir="${iconloader.output.dir}"/> |
| 138 |
<javac destdir="${iconloader.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true"> |
| 139 |
<compilerarg line="${compiler.args.iconloader}"/> |
| 140 |
<bootclasspath refid="iconloader.module.bootclasspath"/> |
| 141 |
<classpath refid="iconloader.module.production.classpath"/> |
| 142 |
<src refid="iconloader.module.sourcepath"/> |
| 143 |
<patternset refid="excluded.from.compilation.iconloader"/> |
| 144 |
</javac> |
| 145 |
|
| 146 |
<copy todir="${iconloader.output.dir}"> |
| 147 |
<fileset dir="${module.iconloader.basedir}/src"> |
| 148 |
<patternset refid="compiler.resources"/> |
| 149 |
<type type="file"/> |
| 150 |
</fileset> |
| 151 |
</copy> |
| 152 |
</target> |
| 153 |
|
| 154 |
<target name="compile.module.iconloader.tests" depends="compile.module.iconloader.production" description="compile module IconLoader; test classes" unless="skip.tests"/> |
| 155 |
|
| 156 |
<target name="clean.module.iconloader" description="cleanup module"> |
| 157 |
<delete dir="${iconloader.output.dir}"/> |
| 158 |
<delete dir="${iconloader.testoutput.dir}"/> |
| 159 |
</target> |
| 160 |
|
| 161 |
<target name="init" description="Build initialization"> |
| 162 |
<!-- Perform any build initialization in this target --> |
| 163 |
</target> |
| 164 |
|
| 165 |
<target name="clean" depends="clean.module.iconloader" description="cleanup all"/> |
| 166 |
|
| 167 |
<target name="build.modules" depends="init, clean, compile.module.iconloader" description="build all modules"/> |
| 168 |
|
| 169 |
<target name="init.artifacts"> |
| 170 |
<property name="artifacts.temp.dir" value="${basedir}/__artifacts_temp"/> |
| 171 |
<property name="artifact.output.iconloader:jar" value="${basedir}"/> |
| 172 |
<mkdir dir="${artifacts.temp.dir}"/> |
| 173 |
<property name="temp.jar.path.iconloader.jar" value="${artifacts.temp.dir}/iconloader.jar"/> |
| 174 |
</target> |
| 175 |
|
| 176 |
<target name="artifact.iconloader:jar" depends="init.artifacts, compile.module.iconloader" description="Build 'iconloader:jar' artifact"> |
| 177 |
<property name="artifact.temp.output.iconloader:jar" value="${artifacts.temp.dir}/iconloader_jar"/> |
| 178 |
<mkdir dir="${artifact.temp.output.iconloader:jar}"/> |
| 179 |
<jar destfile="${temp.jar.path.iconloader.jar}" duplicate="preserve" filesetmanifest="mergewithoutmain"> |
| 180 |
<zipfileset dir="${iconloader.output.dir}"/> |
| 181 |
</jar> |
| 182 |
<copy file="${temp.jar.path.iconloader.jar}" tofile="${artifact.temp.output.iconloader:jar}/iconloader.jar"/> |
| 183 |
</target> |
| 184 |
|
| 185 |
<target name="build.all.artifacts" depends="artifact.iconloader:jar" description="Build all artifacts"> |
| 186 |
<mkdir dir="${artifact.output.iconloader:jar}"/> |
| 187 |
<copy todir="${artifact.output.iconloader:jar}"> |
| 188 |
<fileset dir="${artifact.temp.output.iconloader:jar}"/> |
| 189 |
</copy> |
| 190 |
|
| 191 |
<!-- Delete temporary files --> |
| 192 |
<delete dir="${artifacts.temp.dir}"/> |
| 193 |
</target> |
| 194 |
|
| 195 |
<target name="all" depends="build.modules, build.all.artifacts" description="build all"/> |
| 196 |
</project> |