[lombok] 06/13: custom ant build just to get the core classes working
Hans-Christoph Steiner
eighthave at moszumanska.debian.org
Tue Dec 15 13:16:27 UTC 2015
This is an automated email from the git hooks/post-receive script.
eighthave pushed a commit to branch master
in repository lombok.
commit c2b1542c19f9b29b0d62277c892568bcbf50824b
Author: Hans-Christoph Steiner <hans at eds.org>
Date: Mon Dec 14 15:28:48 2015 +0100
custom ant build just to get the core classes working
---
debian/build.xml | 209 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
debian/rules | 22 +++---
2 files changed, 218 insertions(+), 13 deletions(-)
diff --git a/debian/build.xml b/debian/build.xml
new file mode 100644
index 0000000..09b4125
--- /dev/null
+++ b/debian/build.xml
@@ -0,0 +1,209 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="lombok" default="dist">
+
+ <property file="debian/lombok.version.properties" />
+
+ <path id="build.path">
+ <fileset dir="/usr/share/java">
+ <include name="ant.jar" />
+ <include name="asm3-all.jar" />
+ <include name="com.zwitserloot.cmdreader.jar" />
+ <include name="osgi.core.jar" />
+ </fileset>
+ <fileset dir="/usr/share/eclipse/dropins/jdt/plugins/">
+ <include name="*.jar" />
+ </fileset>
+ <fileset dir="/usr/share/eclipse/plugins">
+ <include name="*.jar" />
+ </fileset>
+ <fileset dir="/usr/lib/eclipse/plugins">
+ <include name="*.jar" />
+ </fileset>
+ <fileset dir="/usr/lib/jvm/default-java/lib">
+ <include name="tools.jar" />
+ </fileset>
+ </path>
+
+ <target name="clean">
+ <delete dir="build" />
+ <delete dir="dist" />
+ <delete dir="lib" />
+ </target>
+
+ <target name="compile">
+
+ <mkdir dir="build/lombok" />
+ <mkdir dir="build/lombok/Class50" />
+ <mkdir dir="build/lombok-utils" />
+ <mkdir dir="build/lombok/META-INF/services" />
+ <mkdir dir="build/stubs" />
+ <mkdir dir="build/stubsstubs" />
+ <mkdir dir="lib/build" />
+
+ <echo level="info">stubsstubs</echo>
+ <javac destdir="build/stubsstubs" source="1.5" target="1.5" includeantruntime="false">
+ <src path="src/stubsstubs" />
+ </javac>
+
+ <echo level="info">stubs</echo>
+ <javac destdir="build/stubs" source="1.5" target="1.5" includeantruntime="false">
+ <src path="src/stubs" />
+ <src path="src/javac-only-stubs" />
+ <classpath location="build/stubsstubs" />
+ </javac>
+
+ <echo level="info">lombok-utils 1.5</echo>
+ <javac destdir="build/lombok-utils" source="1.5" target="1.5" includeantruntime="false">
+ <src path="src/utils" />
+ <exclude name="lombok/javac/**" />
+ <classpath refid="build.path" />
+ </javac>
+
+ <echo level="info">lombok-utils 1.6</echo>
+ <javac destdir="build/lombok-utils" source="1.6" target="1.6" includeantruntime="false">
+ <src path="src/utils" />
+ <include name="lombok/javac/**" />
+ <exclude name="lombok/javac/java6/**" />
+ <!-- TODO enable java7 and java8 stuff with both as build deps -->
+ <exclude name="lombok/javac/java8/**" />
+ <classpath location="build/lombok-utils" />
+ <classpath refid="build.path" />
+ </javac>
+
+ <copy todir="build/lombok">
+ <fileset dir="build/lombok-utils" />
+ </copy>
+
+ <echo level="info">transformedSources</echo>
+ <mkdir dir="build/transformedSources" />
+ <copy todir="build/transformedSources">
+ <fileset dir="src/eclipseAgent">
+ <include name="**/*Transplants.java" />
+ </fileset>
+ <filterchain>
+ <lineContainsRegExp negate="true">
+ <regexp pattern="^\s*@SuppressWarnings.*$" />
+ </lineContainsRegExp>
+ </filterchain>
+ </copy>
+
+ <echo level="info">lombok 1.4</echo>
+ <javac destdir="build/lombok" source="1.4" target="1.4" includeantruntime="false">
+ <src path="build/transformedSources" />
+ </javac>
+
+ <echo level="info">Class50</echo>
+ <javac destdir="build/lombok/Class50" source="1.4" target="1.6" includeantruntime="false">
+ <src path="build/transformedSources" />
+ </javac>
+
+ <echo level="info">lombok 1.5</echo>
+ <javac destdir="build/lombok" source="1.5" target="1.5" includeantruntime="false">
+ <src path="src/launch" />
+ <src path="src/core" />
+ <!--
+ There are lots of issues with this code that are not yet solved, so only a subset
+ of the classes are currently included. Here are some of the problems
+ * lombok.patcher is not packaged yet
+ * The @ProviderFor annotation is failing with a stacktrace, so exclude things that use org.mangosdk.spi
+ -->
+ <include name="lombok/*.java" />
+ <include name="lombok/bytecode/**" />
+ <exclude name="lombok/bytecode/AsmUtil.java" />
+ <exclude name="lombok/bytecode/PreventNullAnalysisRemover.java" />
+ <exclude name="lombok/bytecode/PostCompilerApp.java" />
+ <exclude name="lombok/bytecode/PoolConstantsApp.java" />
+ <exclude name="lombok/bytecode/SneakyThrowsRemover.java" />
+ <exclude name="lombok/core/LombokConfiguration.java" />
+ <exclude name="lombok/core/Main.java" />
+ <exclude name="lombok/core/PublicApiCreatorApp.java" />
+<!--
+ <exclude name="lombok/core/configuration/**" />
+ <exclude name="lombok/core/handlers/SneakyThrowsAndCleanupDependencyInfo.java" />
+ <exclude name="lombok/core/runtimeDependencies/CreateLombokRuntimeApp.java" />
+ <exclude name="lombok/eclipse/**" />
+ <exclude name="lombok/javac/**" />
+ <exclude name="**/EclipseHandlerUtil.java" />
+ <exclude name="**/HandleGetter.java" />
+ <exclude name="**/*Transplants.java" />
+-->
+ <classpath location="build/lombok" />
+ <classpath refid="build.path" />
+ </javac>
+
+<!--
+ <echo level="info">Class50 1.5</echo>
+ <javac destdir="build/lombok/Class50" source="1.5" target="1.6" includeantruntime="false">
+ <src path="src/eclipseAgent" />
+ <include name="lombok/launch/PatchFixesHider.java" />
+ <classpath location="build/lombok" />
+ <classpath refid="build.path" />
+ </javac>
+-->
+ </target>
+
+ <target name="dist" depends="compile">
+ <mkdir dir="dist" />
+
+ <jar destfile="dist/lombok-utils-${lombok.version}.jar">
+ <fileset dir="build/lombok-utils" />
+ <fileset dir="." includes="LICENSE" />
+ <fileset dir="." includes="AUTHORS" />
+ <manifest>
+ <attribute name="Lombok-Version" value="${lombok.version}" />
+ </manifest>
+ </jar>
+ <mkdir dir="build/utils-api" />
+ <javadoc sourcepath="src/utils" defaultexcludes="yes" destdir="build/utils-api" windowtitle="Lombok Utils">
+ <classpath refid="build.path" />
+ <link href="http://download.oracle.com/javase/6/docs/api/" />
+ <header><![CDATA[<a href='https://projectlombok.org/' target='_blank'>Lombok</a> - ]]>v${lombok.version}</header>
+ <bottom><![CDATA[<i>Copyright © 2011-2015 The Project Lombok Authors, licensed under the <a href='http://www.opensource.org/licenses/mit-license.php' target='_blank'>MIT licence</a>.]]></bottom>
+ </javadoc>
+ <jar destfile="dist/lombok-utils-${lombok.version}-javadoc.jar">
+ <fileset dir="build/utils-api" />
+ </jar>
+
+ <copy todir="build/lombok">
+ <fileset dir="build/lombok-utils" />
+ </copy>
+ <jar destfile="dist/lombok-${lombok.version}.jar">
+ <fileset dir="build/lombok" />
+ <fileset dir="." includes="LICENSE" />
+ <fileset dir="." includes="AUTHORS" />
+ <manifest>
+ <attribute name="Premain-Class" value="lombok.launch.Agent" />
+ <attribute name="Agent-Class" value="lombok.launch.Agent" />
+ <attribute name="Can-Redefine-Classes" value="true" />
+ <attribute name="Main-Class" value="lombok.launch.Main" />
+ <attribute name="Lombok-Version" value="${lombok.version}" />
+ </manifest>
+ </jar>
+ <javadoc sourcepath="src/core" defaultexcludes="yes" destdir="build/api" windowtitle="Lombok" Overview="${javadoc.overview.html}">
+ <classpath refid="build.path" />
+ <classpath location="build/lombok" />
+ <link href="http://download.oracle.com/javase/6/docs/api/" />
+ <link href="http://www.slf4j.org/api/" />
+ <link href="http://commons.apache.org/logging/apidocs/" />
+ <link href="http://logging.apache.org/log4j/1.2/apidocs/" />
+ <header><![CDATA[<a href='https://projectlombok.org/' target='_blank'>Lombok</a> - ]]>v${lombok.version}</header>
+ <bottom><![CDATA[<i>Copyright © 2009-2015 The Project Lombok Authors, licensed under the <a href='http://www.opensource.org/licenses/mit-license.php' target='_blank'>MIT licence</a>.]]></bottom>
+ </javadoc>
+ <mkdir dir="doc/api" />
+ <copy todir="doc/api">
+ <fileset dir="build/api" includes="**/*.html" />
+ <filterchain>
+ <linecontainsregexp negate="true">
+ <regexp pattern="(Generated by javadoc)|(.META NAME=.date.)" />
+ </linecontainsregexp>
+ </filterchain>
+ </copy>
+ <copy todir="doc/api">
+ <fileset dir="build/api" excludes="**/*.html" />
+ </copy>
+ <jar destfile="dist/lombok-${lombok.version}-javadoc.jar">
+ <fileset dir="doc/api" />
+ </jar>
+
+ </target>
+</project>
diff --git a/debian/rules b/debian/rules
index cf5a2bd..df7f778 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,19 +1,15 @@
#!/usr/bin/make -f
-include /usr/share/cdbs/1/class/javahelper.mk
+include /usr/share/dpkg/default.mk
-JAVA_HOME := /usr/lib/jvm/default-java
-JH_BUILD_JAR := lombok.jar
-JH_BUILD_SRC := $(shell find src/core -type f ! -path 'src/core/lombok/eclipse/*' ! -name Main.java ! -name PreventNullAnalysisRemover.java ! -name SneakyThrowsRemover.java ! -name AsmUtil.java ! -name CreateLombokRuntimeApp.java ! -name PublicApiCreatorApp.java ! -name PostCompilerApp.java ! -name PoolConstantsApp.java) patcher/inject/LiveInjector.java src/utils/lombok/core/SpiLoadUtil.java src/utils/lombok/javac/Javac.java src/utils/lombok/javac/TreeMirrorMaker.java src/core/lombok/j [...]
-# TODO: replace with default-java if possible
-ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
-export CLASSPATH := $(shell ls /usr/share/eclipse/plugins/org.eclipse.jdt.core_*.jar):/usr/share/java/spi.jar:/usr/share/java/asm3-all.jar:/usr/share/java/jna.jar:/usr/lib/jvm/java-6-openjdk-$(ARCH)/lib/tools.jar
+%:
+ dh $@
-common-post-build-indep::
- mkdir -p META-INF/services
- echo lombok.core.AnnotationProcessor > META-INF/services/javax.annotation.processing.Processor
- jar uf lombok.jar META-INF
+override_dh_auto_clean:
+ dh_auto_clean
+ ant -buildfile debian/build.xml -Dbasedir=`pwd` clean
-clean::
- rm -rf META-INF
+override_dh_auto_build:
+ echo lombok.version=$(DEB_VERSION_UPSTREAM) > debian/lombok.version.properties
+ ant -buildfile debian/build.xml -Dbasedir=`pwd` dist
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/lombok.git
More information about the pkg-java-commits
mailing list