Gradle to execute Java class (without modifying build.gradle)
问题 There is simple Eclipse plugin to run Gradle, that just uses command line way to launch gradle. What is gradle analog for maven compile and run mvn compile exec:java -Dexec.mainClass=example.Example This way any project with gradle.build could be run. UPDATE: There was similar question What is the gradle equivalent of maven's exec plugin for running Java apps? asked before, but solution suggested altering every project build.gradle package runclass; public class RunClass { public static void