-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
117 lines (92 loc) · 2.38 KB
/
build.gradle.kts
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
import com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer
plugins {
idea
java
application
alias(libs.plugins.shadow)
alias(libs.plugins.names)
alias(libs.plugins.jib)
}
group = "fr.rakambda"
description = "FileSecure"
dependencies {
implementation(platform(libs.jacksonBom))
implementation(platform(libs.log4j2Bom))
implementation(libs.slf4j)
implementation(libs.bundles.log4j2)
implementation(libs.unirest)
implementation(libs.pointLocation)
implementation(libs.metadataExtractor)
implementation(libs.picocli)
implementation(libs.bundles.jackson)
compileOnly(libs.lombok)
compileOnly(libs.jetbrainsAnnotations)
annotationProcessor(libs.lombok)
testImplementation(libs.bundles.junit)
testRuntimeOnly(libs.junitEngine)
testImplementation(libs.bundles.assertj)
testImplementation(libs.bundles.mockito)
testCompileOnly(libs.lombok)
testCompileOnly(libs.jetbrainsAnnotations)
testAnnotationProcessor(libs.lombok)
}
repositories {
mavenCentral()
}
tasks {
processResources {
expand(project.properties)
}
compileJava {
val moduleName: String by project
inputs.property("moduleName", moduleName)
options.encoding = "UTF-8"
options.isDeprecation = true
}
compileTestJava {
options.encoding = "UTF-8"
}
test {
useJUnitPlatform()
}
jar {
manifest {
attributes["Multi-Release"] = "true"
}
}
shadowJar {
archiveBaseName.set(project.name)
archiveClassifier.set("shaded")
archiveVersion.set("")
transform(Log4j2PluginsCacheFileTransformer::class.java)
}
}
application {
val moduleName: String by project
val className: String by project
mainModule.set(moduleName)
mainClass.set(className)
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
jib {
from {
image = "eclipse-temurin:21-jdk"
platforms {
platform {
os = "linux"
architecture = "arm64"
}
platform {
os = "linux"
architecture = "amd64"
}
}
}
container {
creationTime.set("USE_CURRENT_TIMESTAMP")
user = "1027:100"
}
}