mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-15 18:15:59 +00:00
Integrated lombok.jar and lombok.eclipse.agent.jar into one jar that installs, is a javac apt processor, and an agent, all at once.
This commit is contained in:
1 parent
e2ffd58f81
commit
310862d94e
9 files changed
+69
-128
No files matched your search
@@ -34,35 +34,21 @@ lombok code including the various agents.</description>
|
||||
</loadresource>
|
||||
</target>
|
||||
|
||||
<fileset dir="src" id="eclipse.agent.main.deps">
|
||||
<include name="lombok/core/SpiLoadUtil.java" />
|
||||
<include name="lombok/Lombok.java" />
|
||||
</fileset>
|
||||
|
||||
<path id="deps.path">
|
||||
<fileset dir="deps/lombok">
|
||||
<include name="**/*.jar" />
|
||||
</fileset>
|
||||
</path>
|
||||
|
||||
<path id="lombok.libs.path">
|
||||
<path id="libs.path">
|
||||
<fileset dir="lib/lombok">
|
||||
<include name="**/*.jar" />
|
||||
</fileset>
|
||||
</path>
|
||||
|
||||
<path id="eclipse.agent.libs.path">
|
||||
<fileset dir="lib/eclipse.agent">
|
||||
<include name="**/*.jar" />
|
||||
</fileset>
|
||||
</path>
|
||||
|
||||
<target name="-unpackLibs">
|
||||
<unjar dest="build/lombok">
|
||||
<path refid="lombok.libs.path" />
|
||||
</unjar>
|
||||
<unjar dest="build/eclipse.agent">
|
||||
<path refid="eclipse.agent.libs.path" />
|
||||
<path refid="libs.path" />
|
||||
</unjar>
|
||||
</target>
|
||||
|
||||
@@ -74,13 +60,16 @@ lombok code including the various agents.</description>
|
||||
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 srcdir="src" debug="on" destdir="build/lombok" target="1.5" excludes="lombok/javac/**">
|
||||
<javac debug="on" destdir="build/lombok" target="1.5">
|
||||
<src path="src" />
|
||||
<src path="src_eclipseagent" />
|
||||
<exclude name="lombok/javac/**" />
|
||||
<classpath refid="deps.path" />
|
||||
<classpath refid="lombok.libs.path" />
|
||||
<classpath refid="libs.path" />
|
||||
</javac>
|
||||
<javac srcdir="src" debug="on" destdir="build/lombok" target="1.6" includes="lombok/javac/**">
|
||||
<classpath refid="deps.path" />
|
||||
<classpath refid="lombok.libs.path" />
|
||||
<classpath refid="libs.path" />
|
||||
</javac>
|
||||
<copy todir="build/lombok">
|
||||
<fileset dir="src">
|
||||
@@ -93,35 +82,17 @@ lombok code including the various agents.</description>
|
||||
<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" />
|
||||
<mkdir dir="build/eclipse.agent.src" />
|
||||
<copy todir="build/eclipse.agent.src">
|
||||
<fileset dir="src_eclipseagent" />
|
||||
<fileset refid="eclipse.agent.main.deps" />
|
||||
</copy>
|
||||
|
||||
<javac debug="on" destdir="build/eclipse.agent" target="1.5" srcdir="build/eclipse.agent.src">
|
||||
<classpath refid="deps.path" />
|
||||
<classpath refid="eclipse.agent.libs.path" />
|
||||
</javac>
|
||||
</target>
|
||||
|
||||
<target name="dist" description="Builds THE lombok.jar file which contains everything" depends="compile, version, -unpackLibs">
|
||||
<mkdir dir="dist" />
|
||||
<jar basedir="build/eclipse.agent" destfile="dist/lombok.eclipse.agent-${lombok.version}.jar">
|
||||
<manifest>
|
||||
<attribute name="Premain-Class" value="lombok.eclipse.agent.EclipsePatcher" />
|
||||
<attribute name="Can-Redefine-Classes" value="true" />
|
||||
</manifest>
|
||||
</jar>
|
||||
<copy file="dist/lombok.eclipse.agent-${lombok.version}.jar" tofile="dist/lombok.eclipse.agent.jar" />
|
||||
<copy file="doc/changelog.markdown" tofile="build/changelog.txt" />
|
||||
<jar destfile="dist/lombok-${lombok.version}.jar">
|
||||
<fileset dir="build/lombok" />
|
||||
<fileset dir="dist" includes="lombok.eclipse.agent.jar" />
|
||||
<fileset dir="build" includes="changelog.txt" />
|
||||
<manifest>
|
||||
<attribute name="Premain-Class" value="lombok.eclipse.agent.EclipsePatcher" />
|
||||
<attribute name="Can-Redefine-Classes" value="true" />
|
||||
<attribute name="Main-Class" value="lombok.installer.Installer" />
|
||||
<attribute name="Lombok-Version" value="${lombok.version}" />
|
||||
</manifest>
|
||||
|
||||
@@ -36,16 +36,16 @@ and building dependencies.</description>
|
||||
<ant dir="${lombok.patcher.dir}" target="dist" inheritAll="false" />
|
||||
<condition property="lombok.patcher.replace">
|
||||
<or>
|
||||
<not><available file="lib/eclipse.agent/lombok-patcher.jar" /></not>
|
||||
<not><available file="lib/lombok/lombok-patcher.jar" /></not>
|
||||
<not><uptodate
|
||||
srcfile="${lombok.patcher.dir}/dist/lombok-patcher.jar"
|
||||
targetfile="lib/eclipse.agent/lombok-patcher.jar" /></not>
|
||||
targetfile="lib/lombok/lombok-patcher.jar" /></not>
|
||||
</or>
|
||||
</condition>
|
||||
</target>
|
||||
|
||||
<target name="build-lombok.patcher" depends="-check-lombok.patcher" if="lombok.patcher.replace">
|
||||
<copy file="${lombok.patcher.dir}/dist/lombok-patcher.jar" todir="lib/eclipse.agent" />
|
||||
<echo level="info">** UPDATED: lib/eclipse.agent/lombok-patcher.jar</echo>
|
||||
<copy file="${lombok.patcher.dir}/dist/lombok-patcher.jar" todir="lib/lombok" />
|
||||
<echo level="info">** UPDATED: lib/lombok/lombok-patcher.jar</echo>
|
||||
</target>
|
||||
</project>
|
||||
Reference in new issue
Block a user