Files
lombok/build.xml
T
Reinier Zwitserloot f36be2eb01 Implemented a lot of stuff for javac, but we ran into 2 major issues still to be implemented:
1. The visit mode of a lombok handler (does not trigger off of annotations, instead sees every field, method, type, and statement), needs to be coded,
2. triggering off of annotations via APT's annotation handling system skips method-local classes. We'll need to recode this via an AST visitor like we need for issue #1

Other than that, triggering off of annotations works swimmingly!
2009-06-16 03:04:46 +02:00

89 lines
2.7 KiB
XML

<project name="lombok" default="dist">
<property name="build.compiler" value="javac1.6" />
<path id="lombok.deps.path">
<fileset dir="deps/lombok">
<include name="**/*.jar" />
</fileset>
</path>
<path id="lombok.libs.path">
<fileset dir="lib/lombok">
<include name="**/*.jar" />
</fileset>
</path>
<path id="eclipse.agent.deps.path">
<fileset dir="deps/eclipse.agent">
<include name="**/*.jar" />
</fileset>
</path>
<path id="eclipse.agent.libs.path">
<fileset dir="lib/eclipse.agent">
<include name="**/*.jar" />
</fileset>
</path>
<target name="clean">
<delete dir="build" quiet="true" />
<delete dir="dist" quiet="true" />
</target>
<target name="compile">
<mkdir dir="build/lombok" />
<javac srcdir="src" debug="on" destdir="build/lombok">
<classpath refid="lombok.deps.path" />
<classpath refid="lombok.libs.path" />
</javac>
<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.javac.apt.Processor</echo>
<mkdir dir="build/eclipse.agent" />
<javac srcdir="src_eclipseagent" debug="on" destdir="build/eclipse.agent">
<classpath refid="eclipse.agent.deps.path" />
<classpath refid="eclipse.agent.libs.path" />
</javac>
</target>
<target name="unpackLibs">
<unjar dest="build/lombok">
<path refid="lombok.libs.path" />
</unjar>
<unjar dest="build/eclipse.agent">
<path refid="eclipse.agent.libs.path" />
</unjar>
</target>
<target name="getVersion" depends="compile">
<java
classname="lombok.core.Version"
classpath="build/lombok"
failonerror="true"
output="build/version.txt" />
<loadresource property="lombok.version">
<file file="build/version.txt" />
<filterchain>
<striplinebreaks />
</filterchain>
</loadresource>
<delete file="build/version.txt" quiet="true" />
<echo level="info">Lombok version: ${lombok.version}</echo>
</target>
<target name="dist" depends="clean, compile, getVersion, unpackLibs">
<mkdir dir="dist" />
<jar basedir="build/lombok" destfile="dist/lombok-${lombok.version}.jar">
<manifest>
<attribute name="Main-Class" value="lombok.core.ShowUserHelp" />
</manifest>
</jar>
<jar basedir="build/eclipse.agent" destfile="dist/lombok.eclipse.agent-${lombok.version}.jar">
<manifest>
<attribute name="Premain-Class" value="lombok.eclipse.agent.EclipseParserPatcher" />
<attribute name="Can-Redefine-Classes" value="true" />
</manifest>
</jar>
<copy file="dist/lombok-${lombok.version}.jar" tofile="dist/lombok.jar" />
<copy file="dist/lombok.eclipse.agent-${lombok.version}.jar" tofile="dist/lombok.eclipse.agent.jar" />
</target>
</project>