From 01d45029e6df4390f45b20ca5ec54b438e90b7ae Mon Sep 17 00:00:00 2001 From: Abe Pazos Date: Tue, 7 Feb 2023 22:57:45 +0100 Subject: Add application gradle option to allow running custom Kt files --- build.gradle.kts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'build.gradle.kts') diff --git a/build.gradle.kts b/build.gradle.kts index a5bc8fd..62982b3 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -139,6 +139,13 @@ tasks.withType { // ------------------------------------------------------------------------------------------------------------------ // project.setProperty("mainClassName", applicationMainClass) + +application { + if (hasProperty("application")) { + mainClass.set("${property("application")}Kt") + } +} + tasks { named("shadowJar") { manifest { @@ -297,4 +304,4 @@ if (properties["openrndr.tasks"] == "true") { group = " \uD83E\uDD8C OPENRNDR" dependsOn("jpackageZip") } -} \ No newline at end of file +} -- cgit v1.3.1