Skip to content

Instantly share code, notes, and snippets.

@hohserg1
Created October 2, 2020 19:01
Show Gist options
  • Save hohserg1/9f7bd9fd138b840f495da4776dcd231b to your computer and use it in GitHub Desktop.
Save hohserg1/9f7bd9fd138b840f495da4776dcd231b to your computer and use it in GitHub Desktop.
def srcDelomboked = 'build/src-delomboked'
task delombok {
description 'Delomboks the entire source code tree'
def srcJava = 'src'
inputs.files file(srcJava)
outputs.dir file(srcDelomboked)
doLast {
def collection = files(configurations.compile + configurations.testCompile)
def sumTree = collection + fileTree(dir: 'bin')
ant.taskdef(name: 'delombok', classname: 'lombok.delombok.ant.Tasks$Delombok',
classpath: configurations.compile.asPath +
configurations.testCompile.asPath)
ant.delombok(from: srcJava, to: srcDelomboked, classpath: sumTree.asPath)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment