task(console, dependsOn: 'classes', type: JavaExec) {
main = 'groovy.ui.Console'
classpath = sourceSets.main.runtimeClasspath
}
Then type
gradle console at command prompt and TADA! Groovy Console pops up with access to all the classes in your gradle project. Hat Tip to Bob: http://jadn.com/~bob/
thank you sir!
ReplyDeleteHi, Mike
ReplyDeleteThanks a lot for this tip. I have created a Gradle plugin based on it, which works for Groovy and Java. Check it out:
https://github.com/carlosgsouza/gradle-console