diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2014-05-07 22:39:14 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2014-05-07 22:39:14 +0200 |
commit | 716951a8518ef4d5260c0d0d58923970dabbd771 (patch) | |
tree | c0b92b6a691baea4f342b705aa7f76a0aad5d0eb | |
parent | be4ed484db62409cc4b22f70e1acd8842df6c90e (diff) | |
parent | b1ffdc06756896b4f3b9b76e454f8d7be6106f19 (diff) | |
download | lombok-716951a8518ef4d5260c0d0d58923970dabbd771.tar.gz lombok-716951a8518ef4d5260c0d0d58923970dabbd771.tar.bz2 lombok-716951a8518ef4d5260c0d0d58923970dabbd771.zip |
Merge branch 'patch-1' of https://github.com/dodgex/lombok into dodgex-patch-androiddocs
-rw-r--r-- | website/setup/android.html | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/website/setup/android.html b/website/setup/android.html index 9aeddfc5..82f0bea1 100644 --- a/website/setup/android.html +++ b/website/setup/android.html @@ -76,6 +76,44 @@ java -jar lombok.jar publicApi</pre> (which you can modify in that project's properties page) with <code>lombok-api.jar</code>, as produced in the procedure explained for <em>Eclipse</em>, above. </div> + <h3>Gradle & Android Studio</h3> + <div> + While there might be other ways, this is how I got lombok working for Gradle and Android Studio. + + <h4>Gradle Setup</h4> + <ul> + <li>First of all make sure that the version of your android plugin is <code>>= 0.4.3</code></li> + <li>Add Lombok to your Apps <code>dependencies</code>-Block +<pre> + provided "org.projectlombok:lombok:1.12.6" +</pre> + </li> + <li>When using <a href="https://bitbucket.org/hvisser/android-apt">android-apt</a>, you have to specify Lombok also with <code>apt</code> in the <code>dependencies</code>-Block +<pre> + provided "org.projectlombok:lombok:1.12.6" + apt "org.projectlombok:lombok:1.12.6" +</pre> + </li> + <li>Now you should be able to compile your App using Lombok Annotations</li> + </ul> + <div> + <b>NOTE</b>: Android does not have the <code>@java.beans.ConstructorProperties</code> therefor you have to use the + <code>suppressConstructorProperties</code> property when using <a href="http://projectlombok.org/features/Constructor.html">@XArgsConstructor Annotations</a>. + With Lombok <code>>= 1.12.7</code> you can use the <code>lombok.config</code> file to enable this property projectwide by adding: + <br/><br/> + <pre>lombok.anyConstructor.suppressConstructorProperties = true</pre> + <br/> + </div> + <h4>Android Studio</h4> + While the Gradle build already works, Android Studio is not able to see the generated methods. To fix this, you have to install the <a href="http://plugins.jetbrains.com/plugin/6317">Lombok Plugin</a> for IntelliJ IDEA/Android Studio. + <ul> + <li>Go to <code>File > Settings > Plugins</code></li> + <li>Click on <code>Browse repositories...</code></li> + <li>Search for <code>Lombok Plugin</code></li> + <li>Click on <code>Install plugin</code></li> + <li>Restart Android Studio & Profit!</li> + </ul> + </div> <div class="endBar"> </div> <div class="footer"> |