In gradle altering sourceSets.main.java.srcDirs leads to no annotation processing

145 views
Skip to first unread message

Richard Tingle

unread,
Feb 18, 2024, 6:04:22 PM2/18/24
to Project Lombok
I'm having an issue where in my gradle project I want to generate java sources. As such I'm adding this to my build.gradle file

sourceSets.main.java.srcDirs += 'src/main/generated/java'

But adding that line leads to no lombok processing at all. (In either the generated source or the main source).

This is the case whether I use the plugin

plugins {
   id 'application'
   id 'java'
   id "io.freefair.lombok" version "8.6"
}

Or the dependency

dependencies {
    compileOnly 'org.projectlombok:lombok:1.18.30'
    annotationProcessor 'org.projectlombok:lombok:1.18.30'
}

Anyone have any idea why this is going wrong?

Thanks
Reply all
Reply to author
Forward
0 new messages