diff --git a/src/main/groovy/org/beryx/jlink/data/JlinkPluginExtension.groovy b/src/main/groovy/org/beryx/jlink/data/JlinkPluginExtension.groovy index c2b597d0..be14e379 100644 --- a/src/main/groovy/org/beryx/jlink/data/JlinkPluginExtension.groovy +++ b/src/main/groovy/org/beryx/jlink/data/JlinkPluginExtension.groovy @@ -174,7 +174,7 @@ class JlinkPluginExtension { action.execute(launcherData.get()) } - void secondaryLauncher(Action action) { + void secondaryLauncher(Action action) { def ld = new SecondaryLauncherData(null) ld.moduleName = moduleName.get() Util.addToListProperty(secondaryLaunchers, ld) diff --git a/src/test/resources/multi-launch-kotlin-dsl/build.gradle b/src/test/resources/multi-launch-kotlin-dsl/build.gradle deleted file mode 100644 index bea11a17..00000000 --- a/src/test/resources/multi-launch-kotlin-dsl/build.gradle +++ /dev/null @@ -1,29 +0,0 @@ -plugins { - id 'org.javamodularity.moduleplugin' version '1.8.12' - id 'org.beryx.jlink' -} - -repositories { - mavenCentral() -} - -ext.moduleName = 'org.example.multi' - -application { - mainClass = 'org.example.multi.Hello' -} - -jlink { - launcher { - name = 'hello' - } - secondaryLauncher { - name = 'helloAgain' - mainClass = 'org.example.multi.HelloAgain' - } - secondaryLauncher { - name = 'howdy' - moduleName = 'org.example.multi' - mainClass = 'org.example.multi.Howdy' - } -} diff --git a/src/test/resources/multi-launch-kotlin-dsl/build.gradle.kts b/src/test/resources/multi-launch-kotlin-dsl/build.gradle.kts new file mode 100644 index 00000000..667d2bc6 --- /dev/null +++ b/src/test/resources/multi-launch-kotlin-dsl/build.gradle.kts @@ -0,0 +1,35 @@ +plugins { + id("org.javamodularity.moduleplugin") version "1.8.12" + id("org.beryx.jlink") +} + +repositories { + mavenCentral() +} + +extra["moduleName"] = "org.example.multi" + +application { + mainClass.set("org.example.multi.Hello") +} + +jlink { + launcher { + name = "hello" + noConsole = false + jvmArgs = listOf( + "-Xms512m", + "-Xmx4g", + "-XX:+UseShenandoahGC" + ) + } + secondaryLauncher { + name = "helloAgain" + mainClass = "org.example.multi.HelloAgain" + } + secondaryLauncher { + name = "howdy" + moduleName= "org.example.multi" + mainClass = "org.example.multi.Howdy" + } +} diff --git a/src/test/resources/multi-launch-kotlin-dsl/settings.gradle b/src/test/resources/multi-launch-kotlin-dsl/settings.gradle deleted file mode 100644 index a8f91313..00000000 --- a/src/test/resources/multi-launch-kotlin-dsl/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'multi-launch-kotlin-dsl' diff --git a/src/test/resources/multi-launch-kotlin-dsl/settings.gradle.kts b/src/test/resources/multi-launch-kotlin-dsl/settings.gradle.kts new file mode 100644 index 00000000..739e51d4 --- /dev/null +++ b/src/test/resources/multi-launch-kotlin-dsl/settings.gradle.kts @@ -0,0 +1 @@ +rootProject.name = "multi-launch-kotlin-dsl"