Reputation: 857
I was trying to integrate Lombok library to a non-Android module on Android Studio.
At first this is what I added to the build.gradle dependencies:
compile group: 'org.projectlombok', name: 'lombok-maven', version: '1.16.10.0'
This is the same syntax I always use for everything else (spring, etc) and it works just fine.
Everything compiled fine but the Lombok jar simply was not fetched no matter what I did (clean/rebuild/restart IDE, etc.).
Eventually I changed the dependency line to:
compile 'org.projectlombok:lombok:1.12.6'
and then finally the jar was fetched properly.
I don't really understand what's going on here. The first dependency line is what I got from the official maven repository. The second line I just happen to stumble upon around the web.
Attempting to use the 2nd line with the newest version (1.16.10.0) fails to compile, stating that no such jar exists.
I am sure I am missing some fundamental principles here with gradle or something else. I would appreciate if someone could shed some light on things as I have wasted lots of time and effort on this silly issue.
Thanks in advance.
Upvotes: 0
Views: 467
Reputation: 857
I finally realized my confusion. I didn't notice I was trying to add the lombok PLUGIN and not the lombok project itself.
In my defense, it is quite confusing (especially when searching at 2am ;)). This is what I should have used:Maven Repository - Correct lombok dependency
This is what I was wrongfully trying to use:
Maven Repository - Lombok Plugin
Which is actually the first thing that pops up when searching "Maven Lombok" on Google.
Upvotes: 0
Reputation: 2030
I think you just misspelled the version - the latest version is 1.6.10, not 1.6.10.0.
So compile 'org.projectlombok:lombok:1.16.10'
will work.
Upvotes: 2