-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
109 lines (89 loc) · 3.3 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
102
103
104
105
106
107
108
109
plugins {
id 'java'
id 'application'
}
group = 'io.easystartup'
version = '1.0'
sourceCompatibility = 21
targetCompatibility = 21
repositories {
mavenCentral()
google()
gradlePluginPortal()
}
dependencies {
implementation group: 'commons-io', name: 'commons-io', version: '2.15.1'
implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: '2.16.1'
implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: '2.16.1'
implementation group: 'org.apache.commons', name: 'commons-collections4', version: '4.4'
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.14.0'
implementation group: 'commons-net', name: 'commons-net', version: '3.10.0'
implementation "me.tomsdevsn:hetznercloud-api:3.2.4"
implementation group: 'com.hubspot.jinjava', name: 'jinjava', version: '2.7.1'
implementation group: 'net.i2p.crypto', name: 'eddsa', version: '0.3.0'
implementation group: 'org.apache.sshd', name: 'sshd-core', version: '2.11.0'
implementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.11'
implementation group: 'org.slf4j', name: 'slf4j-simple', version: '2.0.11'
// Command line arg processor
implementation 'info.picocli:picocli:4.7.5'
annotationProcessor 'info.picocli:picocli-codegen:4.7.5'
testImplementation platform('org.junit:junit-bom:5.9.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
}
test {
useJUnitPlatform()
}
jar {
archiveFileName = 'k3s-simplified.jar'
duplicatesStrategy = "exclude"
archiveClassifier = "all"
manifest {
attributes(
'Main-Class': 'io.easystartup.Main'
)
}
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
}
// Task to create a tar.gz archive
task createTar(type: Tar) {
dependsOn jar // This specifies that the jar task must run before createTar
// Configure the tar task
compression Compression.GZIP
archiveFileName = 'k3s-simplified.tar.gz'
destinationDirectory = file("${buildDir}/distributions")
// Specify the contents of the tar archive
from(jar.archiveFile) { // Include the jar file
into 'k3s-simplified/'
}
from("scripts/") { // Include runtime classpath
into 'k3s-simplified/'
}
}
application {
mainClass = 'io.easystartup.Main'
}
//graalvmNative {
// binaries.all {
// resources.autodetect()
// }
// binaries {
// main {
// javaLauncher = javaToolchains.launcherFor {
// languageVersion = JavaLanguageVersion.of(21)
// vendor = JvmVendorSpec.matching("GraalVM")
// }
// useFatJar = true
// buildArgs(
// "--initialize-at-build-time=org.slf4j.impl.StaticLoggerBinder,org.slf4j.LoggerFactory,org.slf4j.helpers.Reporter,org.slf4j.simple.SimpleLogger",
// "-H:ReflectionConfigurationFiles=../../../reflect-config.json",
// "-H:+UnlockExperimentalVMOptions",
// "--enable-url-protocols=https"
//// "--features=io.easystartup.Main.RuntimeReflectionRegistrationFeature"
//
// )
// }
// }
// toolchainDetection = false
//}