-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbuild.gradle
More file actions
131 lines (116 loc) · 4.27 KB
/
Copy pathbuild.gradle
File metadata and controls
131 lines (116 loc) · 4.27 KB
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
plugins {
id 'groovy'
id 'io.seqera.wave.cli.java-application-conventions'
id 'org.graalvm.buildtools.native' version '0.11.5'
id 'com.gradleup.shadow' version '9.5.0'
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
sourceCompatibility = 17
targetCompatibility = 17
}
repositories {
maven { url = "https://s3-eu-west-1.amazonaws.com/maven.seqera.io/releases" }
maven { url = "https://s3-eu-west-1.amazonaws.com/maven.seqera.io/snapshots" }
}
dependencies {
implementation 'io.seqera:wave-api:1.31.2'
implementation 'io.seqera:wave-utils:1.31.2'
implementation 'info.picocli:picocli:4.6.1'
implementation 'com.squareup.moshi:moshi:1.15.2'
implementation 'com.squareup.moshi:moshi-adapters:1.15.2'
implementation 'dev.failsafe:failsafe:3.1.0'
implementation 'org.apache.commons:commons-lang3:3.19.0'
implementation 'org.yaml:snakeyaml:2.1'
implementation 'org.semver4j:semver4j:5.4.0'
annotationProcessor 'info.picocli:picocli-codegen:4.6.1'
// bump commons-io version to address security vulnerabilities
runtimeOnly 'commons-io:commons-io:2.18.0'
testImplementation "org.apache.groovy:groovy:4.0.24"
testImplementation "org.apache.groovy:groovy-nio:4.0.24"
testImplementation "org.apache.groovy:groovy-test:4.0.24"
testImplementation "org.apache.groovy:groovy-json:4.0.24"
testImplementation "net.bytebuddy:byte-buddy:1.14.11"
testImplementation ("org.spockframework:spock-core:2.4-groovy-4.0") { exclude group: 'org.apache.groovy' }
}
test {
useJUnitPlatform()
}
/*
* Copyright 2023-2026, Seqera Labs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
// read the version from the `VERSION` file
version = new File(rootDir,'VERSION').text.trim()
group = 'io.seqera'
application {
// Define the main class for the application.
mainClass = 'io.seqera.wave.cli.App'
// Run the Graalvm agent to resolve dynamic proxies configuration
applicationDefaultJvmArgs = ["-agentlib:native-image-agent=config-merge-dir=conf/"]
}
shadowJar {
archiveBaseName.set('wave')
archiveClassifier.set('')
archiveVersion.set('')
}
run {
if( environment['JVM_OPTS'] ) {
jvmArgs(environment['JVM_OPTS'])
}
}
graalvmNative {
binaries {
main {
imageName = 'wave'
mainClass = 'io.seqera.wave.cli.App'
configurationFileDirectories.from(file('conf'))
if (System.env.getOrDefault("PLATFORM", "") == "linux-x86_64") {
buildArgs(['--static', '--libc=musl', '--gc=G1', '-march=compatibility'])
}
javaLauncher = javaToolchains.launcherFor {
languageVersion = JavaLanguageVersion.of(21)
vendor = JvmVendorSpec.matching("Oracle Corporation")
}
buildArgs.add('--enable-url-protocols=https')
buildArgs.add('-R:MaxHeapSize=100M')
buildArgs.add('-R:MinHeapSize=10M')
buildArgs.add('-R:MaxNewSize=25M')
// Initialize logback classes at build time since they're used by static logger fields
buildArgs.add('--initialize-at-build-time=ch.qos.logback,org.slf4j')
}
}
toolchainDetection = true
testSupport = false
}
task buildInfo {
doLast {
def version = rootProject.file('VERSION').text.trim()
def commitId = System.env.getOrDefault("GITHUB_SHA", "unknown").substring(0,7)
def info = """\
name=${rootProject.name}
version=${version}
commitId=${commitId}
""".stripIndent().toString()
def f = file("src/main/resources/META-INF/build-info.properties")
f.parentFile.mkdirs()
f.text = info
}
}
compileJava {
dependsOn buildInfo
}