I'm using following setup:
- gradle 5.2.1
- nexus publish
- lombok 1.18.6
- lombok gradle plugin io.freefair.lombok 3.1.4
I would like to upload sourceJar to nexus after delombok is done.
For maven publishing I use the following:
task javadocJar(type: Jar) {
from javadoc.destinationDir
classifier = 'javadoc'
}
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
classifier = 'sources'
}
...
publications {
maven(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
}
}
Sources uploaded to nexus are just one to one with my original source. How to change configuration so that uploaded sources are delombok sources?
task<Jar>("sourcesJar") { archiveClassifier.set("sources") from(project.extensions.getByType<SourceSetContainer>()["main"].extensions["delombokTask"]) }
– Autostability