This is my setup:
- AndroidStudio Lombok Plugin is installed
- Enable Annotation Processing is checked in AndroidStudio Settings
- Gradle wrapper is using version 4.6
- I am using kotlin version 1.2.71
- I am using com.android.tools.build:gradle:3.2.1
- I tried "Invalidate cache / Restart AndroidStudio" after each change
- Lombok dependencies are defined like this:
apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-kapt' dependencies { compileOnly "org.projectlombok:lombok:1.18.2" kapt "org.projectlombok:lombok:1.18.2" }
When I build the app, I get the followin error:
Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor. Please add them to the annotationProcessor configuration. - lombok-1.18.2.jar (org.projectlombok:lombok:1.18.2)
I also tried this dependency setup:
apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-kapt' dependencies { compileOnly "org.projectlombok:lombok:1.18.2" annotationProcessor "org.projectlombok:lombok:1.18.2" }
But then I get "cannot find symbol"-errors all over the place, because no getters/setters are generated by lombok.