I\'m using the gradle \'application\' plugin to start my application. This works well. Now I want to add the option to start a different main class in the same project. Can I ch
From http://mrhaki.blogspot.com/2010/09/gradle-goodness-run-java-application.html
apply plugin: 'java'
task(runSimple, dependsOn: 'classes', type: JavaExec) {
main = 'com.mrhaki.java.Simple'
classpath = sourceSets.main.runtimeClasspath
args 'mrhaki'
systemProperty 'simple.message', 'Hello '
}
Clearly then what you can change:
To run:
gradle runSimple
You can put as many of these as you like into your build.gradle file.