franzbecker / gradle-lombok

Gradle plugin for Lombok support
Apache License 2.0
182 stars 22 forks source link

Gradle 4.6 Generates "annotationProcessors" Warning #34

Closed pluttrell closed 6 years ago

pluttrell commented 6 years ago

Using Gradle v4.6 with this simple build script:

plugins {
    id 'io.franzbecker.gradle-lombok' version '1.11'
    id 'java'
}

repositories {
    jcenter()
}

lombok {
    version = "1.16.20"
    sha256 = ""
}

Builds generate the following warning:

$ gradle clean assemble                    

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.6/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 0s

And with the full warning:

$ gradle clean assemble --warning-mode=all                                                                                                                          

> Task :compileJava 
Putting annotation processors on the compile classpath has been deprecated and is scheduled to be removed in Gradle 5.0. Please add them to the processor path instead. If these processors were unintentionally leaked on the compile classpath, use the -proc:none compiler option to ignore them..

BUILD SUCCESSFUL in 0s
ahamana commented 6 years ago

@pluttrell You need to specify the annotation processor dependency for Lombok, in order to remove this warning.

plugins {
    id 'io.franzbecker.gradle-lombok' version '1.11'
    id 'java'
}

repositories {
    jcenter()
}

dependencies {
    annotationProcessor 'org.projectlombok:lombok:1.16.20'
}

lombok {
    version = "1.16.20"
    sha256 = ""
}
pluttrell commented 6 years ago

@ahamana Thanks for letting me know. It does resolve the warning.

However I wonder if the plugin should add this without requiring that users do it themselves. It seams strange that we're defining the version in two places.

Also if this going to be required now and into the future, perhaps the docs should be updated.

franzbecker commented 6 years ago

Yes absolutely, I’ll try to update the plugin as soon as possible. Contributions are very welcome :)

dialogbox commented 6 years ago

35 I opened a PR.

franzbecker commented 6 years ago

I merged the PR of @dialogbox and create a new release, this should fix this issue. Thanks again!