Add application gradle option to allow running custom Kt files

This commit is contained in:
Abe Pazos
2023-02-07 22:57:45 +01:00
committed by Edwin Jakobs
parent ff1942d2a8
commit 01d45029e6
2 changed files with 18 additions and 1 deletions

View File

@@ -139,6 +139,13 @@ tasks.withType<KotlinCompile> {
// ------------------------------------------------------------------------------------------------------------------ //
project.setProperty("mainClassName", applicationMainClass)
application {
if (hasProperty("application")) {
mainClass.set("${property("application")}Kt")
}
}
tasks {
named<ShadowJar>("shadowJar") {
manifest {
@@ -297,4 +304,4 @@ if (properties["openrndr.tasks"] == "true") {
group = " \uD83E\uDD8C OPENRNDR"
dependsOn("jpackageZip")
}
}
}