diff options
-rw-r--r-- | build.xml | 24 | ||||
-rw-r--r-- | src/lombok/core/Version.java | 17 | ||||
-rw-r--r-- | version.txt | 1 |
3 files changed, 34 insertions, 8 deletions
@@ -1,10 +1,4 @@ <project name="lombok" default="dist"> - <loadresource property="lombok.version"> - <file file="version.txt" /> - <filterchain> - <striplinebreaks /> - </filterchain> - </loadresource> <property name="build.compiler" value="javac1.6" /> <path id="lombok.deps.path"> <fileset dir="deps/lombok"> @@ -59,7 +53,23 @@ </unjar> </target> - <target name="dist" depends="clean, compile, unpackLibs"> + <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" /> + <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" /> <jar basedir="build/eclipse.agent" destfile="dist/lombok.eclipse.agent-${lombok.version}.jar"> diff --git a/src/lombok/core/Version.java b/src/lombok/core/Version.java new file mode 100644 index 00000000..b2689847 --- /dev/null +++ b/src/lombok/core/Version.java @@ -0,0 +1,17 @@ +package lombok.core; + +public class Version { + private static final String VERSION = "0.2.0"; + + private Version() { + //Prevent instantiation + } + + public static void main(String[] args) { + System.out.println(VERSION); + } + + public static String getVersion() { + return VERSION; + } +} diff --git a/version.txt b/version.txt deleted file mode 100644 index 0ea3a944..00000000 --- a/version.txt +++ /dev/null @@ -1 +0,0 @@ -0.2.0 |