@@ -142,9 +142,11 @@ dependencies {
142
142
Logging .NONE -> {
143
143
runtimeOnly(libs.slf4j.nop)
144
144
}
145
+
145
146
Logging .SIMPLE -> {
146
147
runtimeOnly(libs.slf4j.simple)
147
148
}
149
+
148
150
Logging .FULL -> {
149
151
runtimeOnly(libs.log4j.slf4j2)
150
152
runtimeOnly(libs.log4j.core)
@@ -172,12 +174,11 @@ kotlin {
172
174
173
175
// ------------------------------------------------------------------------------------------------------------------ //
174
176
175
- project.setProperty(" mainClassName" , applicationMainClass)
176
-
177
177
application {
178
- if (hasProperty(" openrndr.application" )) {
179
- mainClass = " ${property(" openrndr.application" )} "
180
- }
178
+ mainClass = if (hasProperty(" openrndr.application" ))
179
+ " ${property(" openrndr.application" )} "
180
+ else
181
+ applicationMainClass
181
182
}
182
183
183
184
tasks {
@@ -198,7 +199,7 @@ tasks {
198
199
}
199
200
named< org.beryx.runtime.JPackageTask > (" jpackage" ) {
200
201
doLast {
201
- val destPath = if (OperatingSystem .current().isMacOsX)
202
+ val destPath = if (OperatingSystem .current().isMacOsX)
202
203
" build/jpackage/openrndr-application.app/Contents/Resources/data"
203
204
else
204
205
" build/jpackage/openrndr-application/data"
@@ -290,11 +291,13 @@ class Openrndr {
290
291
" aarch64" , " arm-v8" -> " macos-arm64"
291
292
else -> " macos"
292
293
}
294
+
293
295
currOs.isLinux -> when (currArch) {
294
296
" x86-64" -> " linux-x64"
295
297
" aarch64" -> " linux-arm64"
296
298
else -> throw IllegalArgumentException (" architecture not supported: $currArch " )
297
299
}
300
+
298
301
else -> throw IllegalArgumentException (" os not supported: ${currOs.name} " )
299
302
}
300
303
@@ -331,25 +334,26 @@ class Openrndr {
331
334
}
332
335
}
333
336
}
337
+
334
338
val openrndr = Openrndr ()
335
339
336
340
if (properties[" openrndr.tasks" ] == " true" ) {
337
- task (" create executable jar for $applicationMainClass " ) {
341
+ tasks.register (" create executable jar for $applicationMainClass " ) {
338
342
group = " \uD83E\uDD8C OPENRNDR"
339
343
dependsOn(" shadowJar" )
340
344
}
341
345
342
- task (" run $applicationMainClass " ) {
346
+ tasks.register (" run $applicationMainClass " ) {
343
347
group = " \uD83E\uDD8C OPENRNDR"
344
348
dependsOn(" run" )
345
349
}
346
350
347
- task (" create standalone executable for $applicationMainClass " ) {
351
+ tasks.register (" create standalone executable for $applicationMainClass " ) {
348
352
group = " \uD83E\uDD8C OPENRNDR"
349
353
dependsOn(" jpackageZip" )
350
354
}
351
355
352
- task (" add IDE file scopes" ) {
356
+ tasks.register (" add IDE file scopes" ) {
353
357
group = " \uD83E\uDD8C OPENRNDR"
354
358
val scopesFolder = File (" ${project.projectDir} /.idea/scopes" )
355
359
scopesFolder.mkdirs()
0 commit comments