From 6ca2a91d6bb7054328a845771af0a4e618002f14 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Mon, 19 Mar 2012 22:04:20 +0100 Subject: Added documentation (and a minor tidbit of support) for android. --- website/setup/android.html | 90 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 website/setup/android.html (limited to 'website/setup') diff --git a/website/setup/android.html b/website/setup/android.html new file mode 100644 index 00000000..bbcc9c66 --- /dev/null +++ b/website/setup/android.html @@ -0,0 +1,90 @@ + + + + + + + + + Project Lombok + + + Fork me on GitHub +
+

Project Lombok - android instructions

+ +
+

+ Android development with lombok is possible. Lombok should be a compile-time only dependency, as otherwise + the entirety of lombok will end up in your DEX files, wasting precious space on android devices. Also, errors will occur due + to the native libraries present in lombok.jar itself. Unfortunately, android does not (yet) understand the concept of a + compile-time-only dependency, so you need to mess with your build files to make it work. +

+ The instructions listed below are excerpts from The + AndroidAnnotations project cookbook. You may wish to refer to that documentation for complete instructions; lombok is just + the equivalent to androidannotations-VERSION.jar; there is no -api aspect. +

+

Eclipse

+
+ In eclipse, create a 'lightweight' lombok jar that contains only the annotations by running: +
+java -jar lombok.jar publicApi
+ Then, add this jar to your android project, and, as usual, install lombok into eclipse. +
+

Ant

+
+
    +
  • Find build.xml in ${ANDROID_SDK_ROOT}/tools/ant/build.xml and copy the -compile target into the paste buffer. +
  • Copy this to the build.xml of your own project, right before the <import file="${sdk.dir}/tools/ant/build.xml"> line. +
  • Create a compile-libs directory in your own project and copy the complete lombok.jar to it. +
  • Now modify the <classpath> entry inside the <javac> task in the -compile target you just copied:
    + add <fileset dir="compile-libs" includes="*.jar" /> to it. +
+
+

Maven

+
+ You should be able to just follow the normal lombok with maven instructions.
+
+
+
+ +
+ + + -- cgit