1
+ import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
2
+
1
3
plugins {
2
4
alias(libs. plugins. runtime)
3
5
alias(libs. plugins. shadow)
@@ -36,24 +38,6 @@ dependencies {
36
38
}
37
39
}
38
40
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
-
57
41
group = ' com.github.stickerifier'
58
42
version = ' 1.0'
59
43
description = ' Telegram bot to convert medias in the format required to be used as Telegram stickers'
@@ -69,26 +53,49 @@ tasks.withType(JavaCompile).configureEach {
69
53
}
70
54
71
55
test {
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
+
72
62
useJUnitPlatform()
73
- finalizedBy( jacocoTestReport)
63
+ finalizedBy jacocoTestReport
74
64
}
75
65
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
+ }
78
82
}
79
83
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'
83
86
}
84
87
85
88
shadowJar {
86
- archiveBaseName = ' Stickerify'
87
- archiveClassifier = ' shadow'
88
- archiveVersion = ' '
89
89
mergeServiceFiles()
90
90
91
91
dependencies {
92
92
exclude(' dist_webp_binaries/' )
93
93
}
94
94
}
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