From 50cce9a368c83fdeecbd1c6bb0721c835c7d30b8 Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Mon, 24 Apr 2017 15:02:11 -0700 Subject: [PATCH] Document multiple application{} --- plug-ins/index.html | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/plug-ins/index.html b/plug-ins/index.html index 5588091..a773c9b 100644 --- a/plug-ins/index.html +++ b/plug-ins/index.html @@ -348,6 +348,8 @@ application {

The application directive supports the following parameters:

+
taskName
+
The name of the task that will launch the main class (default: "run")
args
Arguments to pass to the program.
jvmArgs
@@ -355,8 +357,22 @@ application {
mainClass
The class in your code that contains the main function.
+

+ Note that you can have multiple application{} directives, each launching a different + main class with a different task name: +

+
+application {
+    mainClass = "com.example.Main1"
+    taskName = "runMain1"
+}
 
-

apt

+application { + mainClass = "com.example.Main2" + taskName = "runMain2" +}
+ +

apt

The apt plug-in adds support for annotation processing. It's made of two parts.