I've been thinking about several Gradle projects that I have on the horizon
and wondering about creating a task/plugin common to the projects that
would:
1. define a specific set of compile and runtime dependencies
2. compile the code (groovy, scala, java)
3. execute a main() on one of the compiled classes with the appropriate
classpath as defined in step #1
This scenario would alleviate the current (inefficient prototype) approach
of generating multiple jars (one library, another standalone including all
the deps) and subsequently invoking the standalone jar in a separate process
after Gradle completes the jar task. I've just jumped back into Gradle after
nearly a year of being on another project and thus wondered what additional
steps would be needed to complement:
task runMain(dependsOn: compileScala) <<{
//build classpath
//execute main on some target class
}
TIA,
-Russ-