From 2a8225a6af39d4a82f20928409fcb96ae72d363f Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Mon, 28 Jan 2019 22:15:50 +0100 Subject: [website] updated docs for using lombok with gradle --- website/templates/setup/gradle.html | 32 +++----------------------------- 1 file changed, 3 insertions(+), 29 deletions(-) diff --git a/website/templates/setup/gradle.html b/website/templates/setup/gradle.html index b3c7de3a..53f45a71 100644 --- a/website/templates/setup/gradle.html +++ b/website/templates/setup/gradle.html @@ -11,51 +11,25 @@ <@s.section title="The Lombok Gradle Plugin">

- There is a plugin for gradle that we recommend you use; it makes deployment a breeze, works around shortcomings of gradle prior to v2.12, and makes it easy to do additional tasks, such as running the lombok eclipse installer or delomboking. The plugin is open source. Read more about the gradle-lombok plugin. -

- Note, to tell the gradle-lombok plugin to use the latest version of lombok, you need to explicitly tell it about the latest version number and the SHA-256. For our current latest version, put this in your build.gradle file:

-lombok {
-	version = '${version}'
-	sha256 = ""
-}
+ There is a plugin for gradle that we recommend you use; it makes deployment a breeze, works around shortcomings of gradle prior to v2.12, and makes it easy to do additional tasks, such as running the lombok eclipse installer or delomboking. The plugin is open source. Read more about the gradle-lombok plugin.

- <@s.section title="Gradle v2.12 and up"> + <@s.section title="Gradle without a plugin">

If you don't want to use the plugin, gradle has the built-in compileOnly scope, which can be used to tell gradle to add lombok only during compilation. Your build.gradle will look like:

 repositories {
 	mavenCentral()
 }
 
-plugins {
-	id 'net.ltgt.apt' version '0.10'
-}
-
 dependencies {
 	compileOnly 'org.projectlombok:lombok:${version}'
-	
-	apt 'org.projectlombok:lombok:${version}'
+	annotationProcessor 'org.projectlombok:lombok:${version}'
 }

Remember that you still have to download lombok.jar (or find it in gradle's caches) and run it as a jarfile, if you wish to program in eclipse. The plugin makes that part easier.

- <@s.section title="Gradle prior to v2.12"> -

- If you don't want to use the plugin and you're on gradle prior to v2.12, there's a bit of problem: Gradle didn't introduce the 'provided' concept until v2.12. The concept is added by a few well known plugins: The gradle war plugin has the providedCompile scope, and the Gradle Extra Configurations Plugin supports the provided scope. With these plugins, your build.gradle file will look something like this:

-apply plugin: 'java'
-apply plugin: 'nebula.provided-base'
-
-repositories {
-	mavenCentral()
-}
-
-dependencies {
-	provided 'org.projectlombok:lombok:${version}'
-}
-

- <@s.section title="Android development">

-- cgit