1+ import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
2+
13plugins {
24 alias(libs. plugins. runtime)
35 alias(libs. plugins. shadow)
@@ -36,24 +38,6 @@ dependencies {
3638 }
3739}
3840
39- jacocoTestReport {
40- reports {
41- html. required = false
42- xml. required = true
43- xml. outputLocation = file(" .qodana/code-coverage/report.xml" )
44- }
45-
46- afterEvaluate {
47- classDirectories = files(classDirectories. files. collect {
48- fileTree(dir : it, exclude : [' **/MediaConstraints.class' ,
49- ' **/stickerify/exception/**' ,
50- ' **/stickerify/process/**' ,
51- ' **/stickerify/runner**' ,
52- ' **/stickerify/telegram/**' ])
53- })
54- }
55- }
56-
5741group = ' com.github.stickerifier'
5842version = ' 1.0'
5943description = ' Telegram bot to convert medias in the format required to be used as Telegram stickers'
@@ -69,26 +53,49 @@ tasks.withType(JavaCompile).configureEach {
6953}
7054
7155test {
56+ dependsOn jre
57+ inputs. dir tasks. jre. jreDir
58+
59+ def file = DefaultNativePlatform . currentOperatingSystem. isWindows() ? ' java.exe' : ' java'
60+ executable = tasks. jre. jreDir. file(' bin/' + file)
61+
7262 useJUnitPlatform()
73- finalizedBy( jacocoTestReport)
63+ finalizedBy jacocoTestReport
7464}
7565
76- application {
77- mainClass = ' com.github.stickerifier.stickerify.runner.Main'
66+ jacocoTestReport {
67+ reports {
68+ html. required = false
69+ xml. required = true
70+ xml. outputLocation = file(" .qodana/code-coverage/report.xml" )
71+ }
72+
73+ afterEvaluate {
74+ classDirectories = files(classDirectories. files. collect {
75+ fileTree(dir : it, exclude : [' **/MediaConstraints.class' ,
76+ ' **/stickerify/exception/**' ,
77+ ' **/stickerify/process/**' ,
78+ ' **/stickerify/runner**' ,
79+ ' **/stickerify/telegram/**' ])
80+ })
81+ }
7882}
7983
80- runtime {
81- options = [' --strip-debug' , ' --no-header-files' , ' --no-man-pages' ]
82- modules = [' java.desktop' , ' java.naming' , ' java.sql' , ' jdk.crypto.ec' , ' jdk.unsupported' ]
84+ application {
85+ mainClass = ' com.github.stickerifier.stickerify.runner.Main'
8386}
8487
8588shadowJar {
86- archiveBaseName = ' Stickerify'
87- archiveClassifier = ' shadow'
88- archiveVersion = ' '
8989 mergeServiceFiles()
9090
9191 dependencies {
9292 exclude(' dist_webp_binaries/' )
9393 }
9494}
95+
96+ runtime {
97+ options = [' --strip-debug' , ' --no-header-files' , ' --no-man-pages' ]
98+ modules = [' java.desktop' , ' java.instrument' , ' java.naming' , ' java.sql' , ' jdk.crypto.ec' , ' jdk.unsupported' ]
99+ }
100+
101+ suggestModules. dependsOn shadowJar
0 commit comments