Home » Support » Forum » Enhancement from gradle build file

Enhancement from gradle build file

#1

Just wondering if it's possible to add enhancement in the gradle build file after compilation?

an example of this, for an IntelliJ gradle based project would be very helpful.

David

 

#2

The following seems to work:

task enhance(type: JavaExec) {
  main = 'com.objectdb.Enhancer'
  classpath = sourceSets.main.runtimeClasspath
  args '-cp', 'src/main/groovy', 'app.model.*', 'app.model_dir_two.*'
}
compileGroovy.finalizedBy(enhance)

 

note, for java, you want compileJava instead of compileGroovy.


Post Reply

To post a reply and/or subscribe to update notifications - please login