@@ -38,24 +38,6 @@ dependencies {
3838 }
3939}
4040
41- jacocoTestReport {
42- reports {
43- html. required = false
44- xml. required = true
45- xml. outputLocation = file(" .qodana/code-coverage/report.xml" )
46- }
47-
48- afterEvaluate {
49- classDirectories = files(classDirectories. files. collect {
50- fileTree(dir : it, exclude : [' **/MediaConstraints.class' ,
51- ' **/stickerify/exception/**' ,
52- ' **/stickerify/process/**' ,
53- ' **/stickerify/runner**' ,
54- ' **/stickerify/telegram/**' ])
55- })
56- }
57- }
58-
5941group = ' com.github.stickerifier'
6042version = ' 1.0'
6143description = ' Telegram bot to convert medias in the format required to be used as Telegram stickers'
@@ -71,30 +53,49 @@ tasks.withType(JavaCompile).configureEach {
7153}
7254
7355test {
74- dependsOn(' runtime' )
75- useJUnitPlatform()
76- finalizedBy(jacocoTestReport)
56+ dependsOn jre
57+ inputs. files jre. outputs. files
7758
7859 def file = DefaultNativePlatform . currentOperatingSystem. isWindows() ? ' java.exe' : ' java'
7960 executable = layout. buildDirectory. file(' jre/bin/' + file). get()
61+
62+ useJUnitPlatform()
63+ finalizedBy jacocoTestReport
8064}
8165
82- application {
83- 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+ }
8482}
8583
86- runtime {
87- options = [' --strip-debug' , ' --no-header-files' , ' --no-man-pages' ]
88- modules = [' java.desktop' , ' java.instrument' , ' java.naming' , ' java.sql' , ' jdk.crypto.ec' , ' jdk.unsupported' ]
84+ application {
85+ mainClass = ' com.github.stickerifier.stickerify.runner.Main'
8986}
9087
9188shadowJar {
92- archiveBaseName = ' Stickerify'
93- archiveClassifier = ' shadow'
94- archiveVersion = ' '
9589 mergeServiceFiles()
9690
9791 dependencies {
9892 exclude(' dist_webp_binaries/' )
9993 }
10094}
95+
96+ runtime {
97+ options = [' --compress' , ' zip-9' , ' --no-header-files' , ' --no-man-pages' , ' --strip-debug' ]
98+ modules = [ ' java.desktop' , ' java.instrument' , ' java.naming' , ' java.sql' , ' jdk.crypto.ec' , ' jdk.unsupported' ]
99+ }
100+
101+ suggestModules. dependsOn shadowJar
0 commit comments