-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathbuild.gradle
101 lines (83 loc) · 2.57 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
plugins {
alias(libs.plugins.runtime)
alias(libs.plugins.shadow)
id 'java'
id 'jacoco'
}
repositories {
mavenCentral()
}
dependencies {
implementation libs.batik
implementation libs.gson
implementation libs.imageio.batik
implementation libs.imageio.psd
implementation libs.jave
implementation libs.logback.classic
implementation libs.logback.core
implementation libs.scrimage.core
implementation libs.scrimage.formats.extra
implementation libs.scrimage.webp
implementation libs.slf4j.api
implementation libs.telegram.bot.api
implementation libs.tika
testRuntimeOnly libs.junit.platform
testImplementation libs.hamcrest
testImplementation libs.junit
testImplementation libs.mockwebserver
constraints {
implementation(libs.okio) {
because 'CVE-2023-3635: Okio Signed to Unsigned Conversion Error vulnerability'
}
}
}
group = 'com.github.stickerifier'
version = '1.0'
description = 'Telegram bot to convert medias in the format required to be used as Telegram stickers'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(23)
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
test {
dependsOn jre
inputs.dir tasks.jre.jreDir
def file = DefaultNativePlatform.currentOperatingSystem.isWindows() ? 'java.exe' : 'java'
executable = tasks.jre.jreDir.file('bin/' + file)
useJUnitPlatform()
finalizedBy jacocoTestReport
}
jacocoTestReport {
reports {
html.required = false
xml.required = true
xml.outputLocation = file(".qodana/code-coverage/report.xml")
}
afterEvaluate {
classDirectories = files(classDirectories.files.collect {
fileTree(dir: it, exclude: ['**/MediaConstraints.class',
'**/stickerify/exception/**',
'**/stickerify/process/**',
'**/stickerify/runner**',
'**/stickerify/telegram/**'])
})
}
}
application {
mainClass = 'com.github.stickerifier.stickerify.runner.Main'
}
shadowJar {
mergeServiceFiles()
dependencies {
exclude('dist_webp_binaries/')
}
}
runtime {
options = ['--strip-debug', '--no-header-files', '--no-man-pages']
modules = ['java.desktop', 'java.instrument', 'java.naming', 'java.sql', 'jdk.crypto.ec', 'jdk.unsupported']
}
suggestModules.dependsOn shadowJar