@@ -2,48 +2,32 @@ import com.github.stickerifier.stickerify.JlinkJavaLauncher
22import com.github.stickerifier.stickerify.JlinkTask
33
44plugins {
5- id(' application' )
65 id(' java' )
76 id(' jacoco' )
8- alias(libs. plugins. shadow)
7+ id(' application' )
8+ alias(libs. plugins. spring. nullability)
99}
1010
1111repositories {
1212 mavenCentral()
1313}
1414
1515dependencies {
16- implementation (libs. batik )
16+ compileOnly (libs. jspecify )
1717 implementation(libs. gson)
18- implementation(libs. imageio. batik)
19- implementation(libs. imageio. psd)
2018 implementation(libs. jave)
2119 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)
2720 implementation(libs. telegram. bot. api)
2821 implementation(libs. tika)
2922
3023 testImplementation(libs. hamcrest)
3124 testImplementation(libs. junit. jupiter)
3225 testImplementation(libs. mockwebserver)
3326 testRuntimeOnly(libs. junit. platform)
34-
35- constraints {
36- implementation(' org.apache.commons:commons-lang3' ) {
37- version {
38- strictly(' [3.18.0, 4)' )
39- }
40- because(' CVE-2025-48924: Apache Commons Lang is vulnerable to Uncontrolled Recursion when processing long inputs' )
41- }
42- }
4327}
4428
4529group = ' com.github.stickerifier'
46- version = ' 1 .0'
30+ version = ' 2 .0'
4731description = ' Telegram bot to convert medias in the format required to be used as Telegram stickers'
4832
4933java. toolchain {
@@ -58,7 +42,12 @@ updateDaemonJvm {
5842
5943def jlink = tasks. register(' jlink' , JlinkTask ) {
6044 options = [' --strip-debug' , ' --no-header-files' , ' --no-man-pages' ]
61- modules = [' java.desktop' , ' java.instrument' , ' java.naming' , ' java.sql' , ' jdk.crypto.ec' , ' jdk.unsupported' ]
45+ modules = [
46+ ' java.instrument' , // for junit
47+ ' java.naming' , // for logback
48+ ' java.sql' , // for tika
49+ ' jdk.unsupported' // for gson
50+ ]
6251 includeModulePath = false
6352
6453 group = ' build'
7362 finalizedBy(jacocoTestReport)
7463
7564 testLogging {
76- events ' passed' , ' failed' , ' skipped'
65+ events( ' passed' , ' failed' , ' skipped' )
7766 }
7867}
7968
@@ -99,19 +88,16 @@ application {
9988 mainClass = ' com.github.stickerifier.stickerify.runner.Main'
10089}
10190
102- shadowJar {
103- duplicatesStrategy = DuplicatesStrategy . INCLUDE
104- mergeServiceFiles()
105- failOnDuplicateEntries = true
106-
107- exclude(' dist_webp_binaries/' ,
108- ' META-INF/LICENSE' ,
109- ' META-INF/LICENSE.txt' ,
110- ' META-INF/NOTICE' ,
111- ' META-INF/NOTICE.txt' ,
112- ' license/LICENSE' ,
113- ' license/LICENSE.dom-documentation.txt' ,
114- ' license/LICENSE.dom-software.txt' ,
115- ' license/NOTICE' ,
116- ' license/README.dom.txt' )
91+ distributions {
92+ main {
93+ contents {
94+ // noinspection GroovyAssignabilityCheck
95+ from(jlink)
96+ }
97+ }
98+ }
99+
100+ tasks. named(' startScripts' , CreateStartScripts ) {
101+ unixStartScriptGenerator. template = resources. text. fromFile(' src/main/resources/customUnixStartScript.txt' )
102+ windowsStartScriptGenerator. template = resources. text. fromFile(' src/main/resources/customWindowsStartScript.txt' )
117103}
0 commit comments