aboutsummaryrefslogtreecommitdiff
path: root/buildScripts/compile.ant.xml
diff options
context:
space:
mode:
Diffstat (limited to 'buildScripts/compile.ant.xml')
-rw-r--r--buildScripts/compile.ant.xml173
1 files changed, 0 insertions, 173 deletions
diff --git a/buildScripts/compile.ant.xml b/buildScripts/compile.ant.xml
deleted file mode 100644
index 7f8e2ba7..00000000
--- a/buildScripts/compile.ant.xml
+++ /dev/null
@@ -1,173 +0,0 @@
-<!--
- Copyright © 2009 Reinier Zwitserloot and Roel Spilker.
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
--->
-<project name="lombok-compile" basedir=".." default="dist">
- <description>
-This buildfile is part of projectlombok.org. It responsible for compiling the main
-lombok code including the various agents.
- </description>
- <property name="build.compiler" value="javac1.6" />
-
- <target name="version" unless="lombok.version">
- <ant antfile="build.xml" target="version" inheritAll="false" />
- <loadresource property="lombok.version">
- <file file="build/version.txt" />
- <filterchain>
- <striplinebreaks />
- </filterchain>
- </loadresource>
- </target>
-
- <path id="deps.path">
- <fileset dir="deps/lombok">
- <include name="**/*.jar" />
- </fileset>
- </path>
-
- <path id="libs.path">
- <fileset dir="lib/lombok">
- <include name="**/*.jar" />
- </fileset>
- </path>
-
- <path id="findbugs_deps.path">
- <fileset dir="deps/buildScripts/findbugs">
- <include name="**/*.jar" />
- </fileset>
- </path>
-
- <target name="-unpackLibs">
- <unjar dest="build/lombok">
- <path refid="libs.path" />
- </unjar>
- </target>
-
- <target name="-check-findbugs">
- <available property="findbugs.available" file="deps/buildScripts/findbugs/bin/findbugs" />
- <fail unless="findbugs.available" message="You don't have findbugs available. Run 'ant installDeps' to fetch it." />
- </target>
-
- <target name="findbugs" depends="-check-findbugs, dist" description="Runs findbugs on the lombok sources">
- <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpathref="findbugs_deps.path" />
- <mkdir dir="build/lombok_aux" />
- <!-- This ridiculous waste of time (unpacking ALL deps, which is a lot of data!) is done because the ant findbugs task is
- a retarded stepchild; it does not understand either pathrefs or wildcards (*.jar), and hardcoding the names of the various
- eclipse module jars would be even worse. -->
- <unjar dest="build/lombok_aux">
- <fileset dir="deps/lombok">
- <include name="**/*.jar" />
- </fileset>
- </unjar>
-
- <findbugs home="deps/buildScripts/findBugs" output="html" outputFile="findbugsReport.html" jvmargs="-Xmx512m">
- <auxClasspath path="build/lombok" />
- <auxClasspath path="build/lombok_aux" />
- <sourcePath path="src/core" />
- <sourcePath path="src/installer" />
- <sourcePath path="src/eclipseAgent" />
- <sourcePath path="src/netbeansAgent" />
- <sourcePath path="src/delombok" />
- <class location="build/lombok/lombok" />
- </findbugs>
- </target>
-
- <patternset id="copyables">
- <exclude name="**/*.java" />
- <exclude name="**/*.class" />
- <exclude name="**/*.svg" />
- </patternset>
-
- <target name="compile" description="Compiles the code">
- <mkdir dir="build/lombok" />
- <!-- ant includes the destination dir on the classpath (and there are good reason to do this), but that also means
- the bleeding edge lombok from the previous build is run, which means if there are bugs in it, you can't compile
- anymore until you 'ant clean'. That's very much not desired, so we kill the processor, which stops lombok from running.
- We re-create the file at the end of this target. -->
- <delete file="build/lombok/META-INF/services/javax.annotation.processing.Processor" quiet="true" />
-
- <!-- This version trickery is so that an eclipse running in a JVM 1.5 will run
- properly (It'll never touch the javac files and hence never trigger a
- Bad Class Version Number error, but for javac we definitely cannot support
- javac 1.5, partly because they completely rewrote large swaths of javac,
- and partly because our injection mechanism (annotations) doesn't work very
- well on javac 1.5, hence, when using javac, we do demand you're on 1.6. -->
- <javac debug="on" destdir="build/lombok" target="1.5" source="1.5">
- <src path="src/core" />
- <src path="src/installer" />
- <src path="src/eclipseAgent" />
- <exclude name="lombok/javac/**" />
- <classpath refid="deps.path" />
- <classpath refid="libs.path" />
- <compilerarg value="-Xlint:unchecked" />
- </javac>
- <javac debug="on" destdir="build/lombok" target="1.6" source="1.6">
- <src path="src/core" />
- <src path="src/delombok" />
- <src path="src/netbeansAgent" />
- <include name="lombok/javac/**" />
- <include name="lombok/delombok/**" />
- <include name="lombok/netbeans/**" />
- <classpath location="build/lombok" />
- <classpath refid="deps.path" />
- <classpath refid="libs.path" />
- <compilerarg value="-Xlint:unchecked" />
- </javac>
- <copy todir="build/lombok">
- <fileset dir="src/installer">
- <patternset refid="copyables" />
- </fileset>
- <fileset dir="src/core">
- <patternset refid="copyables" />
- </fileset>
- <fileset dir="src/eclipseAgent">
- <patternset refid="copyables" />
- </fileset>
- <fileset dir="src/netbeansAgent">
- <patternset refid="copyables" />
- </fileset>
- <fileset dir="src/delombok">
- <patternset refid="copyables" />
- </fileset>
- </copy>
-
- <mkdir dir="build/lombok/META-INF" />
- <mkdir dir="build/lombok/META-INF/services" />
- <echo file="build/lombok/META-INF/services/javax.annotation.processing.Processor">lombok.core.AnnotationProcessor</echo>
- </target>
-
- <target name="dist" description="Builds THE lombok.jar file which contains everything" depends="compile, version, -unpackLibs">
- <mkdir dir="dist" />
- <copy file="doc/changelog.markdown" tofile="build/changelog.txt" />
- <jar destfile="dist/lombok-${lombok.version}.jar">
- <fileset dir="build/lombok" />
- <fileset dir="build" includes="changelog.txt" />
- <fileset dir="." includes="LICENCE" />
- <manifest>
- <attribute name="Premain-Class" value="lombok.core.Agent" />
- <attribute name="Agent-Class" value="lombok.core.Agent" />
- <attribute name="Can-Redefine-Classes" value="true" />
- <attribute name="Main-Class" value="lombok.core.Main" />
- <attribute name="Lombok-Version" value="${lombok.version}" />
- </manifest>
- </jar>
- <copy file="dist/lombok-${lombok.version}.jar" tofile="dist/lombok.jar" />
- </target>
-</project>