-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
61 lines (49 loc) · 1.42 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
// https://plugins.gradle.org/
// import plugin by plugins DSL
plugins {
id 'idea'
id 'java'
id 'org.springframework.boot' version '3.3.1'
id 'io.spring.dependency-management' version '1.1.5'
id 'org.graalvm.buildtools.native' version '0.10.2'
}
group = 'com.chuntung.explorer'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
[compileJava,compileTestJava,javadoc]*.options*.encoding = 'UTF-8'
repositories {
mavenCentral()
maven { url 'https://repo.spring.io/release' }
}
dependencies {
implementation('org.springframework.boot:spring-boot-starter-web')
// jsoup for html handle
implementation 'org.jsoup:jsoup:1.17.2'
// https://mvnrepository.com/artifact/org.brotli/dec
implementation 'org.brotli:dec:0.1.2'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
test {
useJUnitPlatform()
}
graalvmNative {
binaries {
main {
buildArgs.add('-H:+AddAllCharsets')
buildArgs.add('-H:ExcludeResources=".*/application-local.yml$"')
}
}
}
tasks.named('bootBuildImage') {
imageName = 'explorer'
builder = 'paketobuildpacks/builder:tiny'
pullPolicy = 'IF_NOT_PRESENT'
environment = ['BP_NATIVE_IMAGE': 'true', 'BP_NATIVE_IMAGE_BUILD_ARGUMENTS': '-H:+AddAllCharsets -H:ExcludeResources=".*/application-local.yml$"']
}