From dad85a619d54ffd35e030f0b23259f1802755772 Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Fri, 13 Nov 2015 17:58:53 -0800 Subject: [PATCH] apt documentation. --- plug-ins/index.html | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/plug-ins/index.html b/plug-ins/index.html index 9ec04e0..f23a48e 100644 --- a/plug-ins/index.html +++ b/plug-ins/index.html @@ -131,6 +131,29 @@ application {
Arguments to pass to the JVM.
+

apt

+

+ The apt plug-in adds support for annotation processing. It's made of two parts. +

+

The apt dependency directive

+
+    dependencies {
+        apt("com.google.dagger:dagger:2.0.2")
+    }
+  
+

+ Instead of using compile, you use apt in your dependencies and you point to the jar file that contains the annotation processor. This will instruct any compiler involved in the build to run this annotation processor first. +

+

The apt configuration directive

+
+    apt {
+        outputDir = "generated/sources/apt"
+    }
+
+

This directive lets you configure the output directory and a few other settings that drive the annotation processor. This directive is optional.

+

For a full example defining and then using an annotation processor, see the java-apt-example project.

+ +

Packaging