Open boxcounter opened 9 years ago
Same issue here. Also using Dagger and EventBus to make things more interesting.
Full build.gradles: https://gist.github.com/bowmanb/7dcbb5de6609bfbca128
please, how can we fix this?
I confirm the problem with Android data binding.
Bump!
:+1: I'm encountering the same thing.
I know there are some problems if multiple annotation processors are involved. One way to handle those if to first run delombok on the whole codebase and feed the resulting files to the rest of the compilation process.
In a build.gradle
file I wrote I used the following setup:
configurations {
provided
compileOnly.extendsFrom provided
testCompile.extendsFrom compileOnly
}
dependencies {
// other stuff
compileOnly 'org.projectlombok:lombok:1.14.8'
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
sourceSets.main.compileClasspath += configurations.compileOnly
task myJavadoc(type: Javadoc) {
source = sourceSets.main.allJava
classpath = sourceSets.main.compileClasspath
options.author = true
options.links(project.ext.javadocLinks)
}
task javadocJar(type: Jar, dependsOn: myJavadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
I hope this helps
@rspilker can you provide a working example? I tried your example above
up! @rspilker that code does not work for me. do you have a working example? thanks!
up? I also encountered this problem, the whole brain is already broken!
I have same issue...
I'm interested on this
Hey @rspilker can you please help us all ? :+1:
How to delombok with gradle 2.2? Thanks @rspilker!
Any update on this issue? Did anyone maybe find a workaround for this issue?
@soldmachine: I can think of four workarounds:
Hope this helps
@Shujito: THX for your suggestions!
I opted for option 3!
Looks like this is still an issue. Any solid work arounds besides public fields?
I found that lombok actually caused a memory leak with Android instant run, inflating my build times dramatically over the course of an hour. Due to that and other issues like this one, I've stopped using lombok, and found myself with a much more pleasant Android development experience.
change
implementation 'org.projectlombok:lombok:1.18.12'
to
compileOnly 'org.projectlombok:lombok:1.18.12' annotationProcessor 'org.projectlombok:lombok:1.18.12'
in your build.gradle
In 2022, convert your Java class to a Kotlin data class, getters/setters are accessible by design and the conversion can be done (mostly) automatically by Android Studio for a simple POJO. You don't need to fully switch to Kotlin, mixed builds are possible.
The Databinding library cannot find getter generated by lombok.
Imported like this:
Thanks.