summaryrefslogtreecommitdiff
path: root/RegExpSupport/regexp-lang.xml
blob: c6ba85180913021cb62668be1c51250c3486e7c0 (plain)
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
176
177
178
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="RegExpSupport" default="all">

  <property file="regexp-lang.properties" />
  
  <!-- Uncomment the following property if no tests compilation is needed -->
  <!-- 
  <property name="skip.tests" value="true"/>
   -->

  <!-- The task requires the following libraries from IntelliJ IDEA distribution: -->
  <!--   javac2.jar; jdom.jar; asm.jar; asm-commons.jar -->
  <taskdef name="javac2" classname="com.intellij.ant.Javac2">
    <classpath refid="classpath.uidesigner" />
  </taskdef>

  <path id="classpath.uidesigner">
    <path refid="jdk.classpath.idea_8.0" />
    <path>
      <fileset dir="${jdk.home.idea_8.0}">
        <include name="redist/javac2.jar" />
      </fileset>
    </path>
  </path>

  <!-- Compiler options -->

  <property name="compiler.debug" value="on" />
  <property name="compiler.generate.no.warnings" value="off" />
  <property name="compiler.args" value="" />
  <property name="compiler.max.memory" value="128m" />
  <patternset id="ignored.files">
    <exclude name="**/CVS/**" />
    <exclude name="**/SCCS/**" />
    <exclude name="**/RCS/**" />
    <exclude name="**/rcs/**" />
    <exclude name="**/.dependency-info/**" />
    <exclude name="**/.svn/**" />
  </patternset>
  <patternset id="compiler.excluded">
  </patternset>
  <patternset id="compiler.resources">
    <include name="**/?*.properties" />
    <include name="**/?*.xml" />
    <include name="**/?*.html" />
    <include name="**/?*.gif" />
    <include name="**/?*.png" />
    <include name="**/?*.jpeg" />
    <include name="**/?*.xsd" />
    <include name="**/?*.xsl" />
    <include name="**/?*.xhtml" />
    <include name="**/?*.template" />
  </patternset>

  <!-- JDK definitions -->

  <path id="jdk.classpath.idea_8.0">
    <fileset dir="${jdk.home.idea_8.0}">
      <include name="lib/*.jar" />

      <include name="lib/tools.jar"/>
    </fileset>
  </path>

  <property name="project.jdk.home" value="${jdk.home.idea_8.0}" />
  <property name="project.jdk.classpath" value="jdk.classpath.idea_8.0" />


  <!-- Global Libraries -->

  <!-- Application Server Libraries -->

  <!-- Modules -->


  <!-- Module regexp-lang -->

  <dirname property="module.regexp-lang.basedir" file="${ant.file}" />


  <property name="module.jdk.home.regexp-lang" value="${project.jdk.home}" />
  <property name="module.jdk.classpath.regexp-lang" value="${project.jdk.classpath}" />

  <property name="compiler.args.regexp-lang" value="${compiler.args}" />

  <property name="regexp-lang.output.dir" value="${module.regexp-lang.basedir}/build/classes/production" />
  <property name="regexp-lang.testoutput.dir" value="${module.regexp-lang.basedir}/build/classes/test" />

  <path id="regexp-lang.module.bootclasspath">
    <!-- Paths to be included in compilation bootclasspath -->
  </path>

  <path id="regexp-lang.module.classpath">
    <path refid="${module.jdk.classpath.regexp-lang}" />
  </path>


  <patternset id="excluded.from.module.regexp-lang">
    <patternset refid="ignored.files" />
  </patternset>

  <patternset id="excluded.from.compilation.regexp-lang">
    <patternset refid="compiler.excluded" />
    <patternset refid="excluded.from.module.regexp-lang" />
  </patternset>

  <path id="regexp-lang.module.sourcepath">
    <dirset dir="${module.regexp-lang.basedir}">
      <include name="src" />
    </dirset>
  </path>

  <path id="regexp-lang.module.test.sourcepath">
    <dirset dir="${module.regexp-lang.basedir}">
      <include name="test" />
    </dirset>
  </path>


  <target name="compile.module.regexp-lang"
          depends="compile.module.regexp-lang.production,compile.module.regexp-lang.tests"
          description="Compile module regexp-lang" />

  <target name="compile.module.regexp-lang.production" description="Compile module regexp-lang; production classes">
    <mkdir dir="${regexp-lang.output.dir}" />
    <javac2 destdir="${regexp-lang.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}"
            memorymaximumsize="${compiler.max.memory}" target="1.5">
      <compilerarg line="${compiler.args.regexp-lang}" />
      <bootclasspath refid="regexp-lang.module.bootclasspath" />
      <classpath refid="regexp-lang.module.classpath" />
      <src refid="regexp-lang.module.sourcepath" />
      <patternset refid="excluded.from.compilation.regexp-lang" />
    </javac2>

    <copy todir="${regexp-lang.output.dir}">
      <fileset dir="${module.regexp-lang.basedir}/src">
        <patternset refid="compiler.resources" />
        <type type="file" />
        <patternset refid="excluded.from.compilation.regexp-lang" />
      </fileset>
    </copy>
  </target>

  <target name="compile.module.regexp-lang.tests" depends="compile.module.regexp-lang.production"
          description="compile module regexp-lang; test classes" unless="skip.tests">
    <mkdir dir="${regexp-lang.testoutput.dir}" />
    <javac2 destdir="${regexp-lang.testoutput.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}"
            memorymaximumsize="${compiler.max.memory}" target="1.5">
      <compilerarg line="${compiler.args.regexp-lang}" />
      <classpath refid="regexp-lang.module.classpath" />
      <classpath location="${regexp-lang.output.dir}" />
      <src refid="regexp-lang.module.test.sourcepath" />
      <patternset refid="excluded.from.compilation.regexp-lang" />
    </javac2>

    <copy todir="${regexp-lang.testoutput.dir}">
      <fileset dir="${module.regexp-lang.basedir}/test">
        <patternset refid="compiler.resources" />
        <type type="file" />
        <patternset refid="excluded.from.compilation.regexp-lang" />
      </fileset>
    </copy>
  </target>

  <target name="clean.module.regexp-lang" description="cleanup module">
    <delete dir="${regexp-lang.output.dir}" />
    <delete dir="${regexp-lang.testoutput.dir}" />
  </target>


  <target name="init" description="Build initialization">
    <!-- Perform any build initialization in this target -->
  </target>

  <target name="clean" depends="clean.module.regexp-lang" description="cleanup all" />

  <target name="all" depends="init, clean, compile.module.regexp-lang" description="build all" />
</project>