@@ -2,9 +2,9 @@ import com.github.stickerifier.stickerify.JlinkJavaLauncher
22import com.github.stickerifier.stickerify.JlinkTask
33
44plugins {
5- id ' application'
6- id ' java'
7- id ' jacoco'
5+ id( ' application' )
6+ id( ' java' )
7+ id( ' jacoco' )
88 alias(libs. plugins. shadow)
99}
1010
@@ -13,26 +13,31 @@ repositories {
1313}
1414
1515dependencies {
16- implementation libs. batik
17- implementation libs. gson
18- implementation libs. imageio. batik
19- implementation libs. imageio. psd
20- implementation libs. jave
21- implementation libs. logback. classic
22- implementation libs. logback. core
23- implementation libs. scrimage. core
24- implementation libs. scrimage. formats. extra
25- implementation libs. scrimage. webp
26- implementation libs. slf4j. api
27- implementation libs. telegram. bot. api
28- implementation libs. tika
16+ implementation(libs. batik)
17+ implementation(libs. gson)
18+ implementation(libs. imageio. batik)
19+ implementation(libs. imageio. psd)
20+ implementation(libs. jave)
21+ implementation(libs. logback. classic)
22+ implementation(libs. logback. core)
23+ implementation(libs. scrimage. core)
24+ implementation(libs. scrimage. formats. extra)
25+ implementation(libs. scrimage. webp)
26+ implementation(libs. slf4j. api)
27+ implementation(libs. telegram. bot. api)
28+ implementation(libs. tika)
29+
30+ testRuntimeOnly(libs. junit. platform)
31+ testImplementation(libs. hamcrest)
32+ testImplementation(libs. junit. jupiter)
33+ testImplementation(libs. mockwebserver)
2934
3035 constraints {
3136 implementation(' org.apache.commons:commons-lang3' ) {
3237 version {
3338 strictly(' [3.18.0, 4[' )
3439 }
35- because ' CVE-2025-48924: Apache Commons Lang is vulnerable to Uncontrolled Recursion when processing long inputs'
40+ because( ' CVE-2025-48924: Apache Commons Lang is vulnerable to Uncontrolled Recursion when processing long inputs' )
3641 }
3742 }
3843}
@@ -59,28 +64,12 @@ def jlink = tasks.register('jlink', JlinkTask) {
5964 description = ' Generates a minimal JRE for the project.'
6065}
6166
62- testing {
63- suites {
64- test {
65- useJUnitJupiter(libs. versions. junit)
67+ test {
68+ inputs. dir(jlink. map { it. outputDirectory. get(). asFile })
69+ javaLauncher = providers. provider { new JlinkJavaLauncher (jlink. get()) }
6670
67- dependencies {
68- implementation libs. hamcrest
69- implementation libs. mockwebserver
70- }
71-
72- targets {
73- all {
74- testTask. configure { Test test ->
75- test. inputs. dir jlink. get(). outputDirectory
76- test. javaLauncher = new JlinkJavaLauncher (jlink. get())
77-
78- test. finalizedBy jacocoTestReport
79- }
80- }
81- }
82- }
83- }
71+ useJUnitPlatform()
72+ finalizedBy(jacocoTestReport)
8473}
8574
8675jacocoTestReport {
@@ -95,7 +84,7 @@ jacocoTestReport {
9584 fileTree(dir : it, exclude : [' **/MediaConstraints.class' ,
9685 ' **/stickerify/exception/**' ,
9786 ' **/stickerify/process/**' ,
98- ' **/stickerify/runner**' ,
87+ ' **/stickerify/runner/ **' ,
9988 ' **/stickerify/telegram/**' ])
10089 })
10190 }
0 commit comments