This repository has been archived by the owner on Jul 21, 2024. It is now read-only.
forked from jnightlee/webdav-teambition
-
Notifications
You must be signed in to change notification settings - Fork 137
/
build.gradle
99 lines (89 loc) · 3.34 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
plugins {
id 'java'
id 'org.springframework.boot' version '3.2.0'
id 'io.spring.dependency-management' version '1.1.4'
id 'org.graalvm.buildtools.native' version '0.9.28'
}
group 'com.github'
version '4.1.0'
sourceCompatibility = '17'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
maven { url 'https://repo.spring.io/release/' }
maven { url 'https://repo.spring.io/snapshot' }
}
dependencies {
implementation ('org.springframework.boot:spring-boot-starter-web') {
exclude group: 'org.springframework.boot', module: 'spring-boot-starter-json'
}
compileOnly 'org.projectlombok:lombok:1.18.26'
annotationProcessor 'org.projectlombok:lombok'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'com.google.code.findbugs:jsr305:3.0.2'
implementation 'org.apache.commons:commons-lang3:3.8'
implementation 'commons-codec:commons-codec:1.15' //java7
compileOnly 'org.mortbay.jetty:servlet-api:3.0.20100224'
implementation 'com.google.code.gson:gson:2.10.1'
implementation 'com.squareup.okhttp3:okhttp:3.12.13' //api19
implementation 'com.squareup.okhttp3:logging-interceptor:3.12.13' //api19
implementation 'com.google.guava:guava:20.0' //java7
implementation 'com.github.auties00:qr-terminal:2.1'
implementation 'com.google.zxing:core:3.5.3'
implementation project(':aliyundrive-webdav-internal')
implementation project(':aliyundrive-sdk-openapi')
implementation project(':aliyundrive-sdk-webapi')
implementation project(':webdav-jakarta')
implementation project(':jap-http-adapter:jap-http-jakarta-adapter')
}
tasks.named('test') {
useJUnitPlatform()
}
compileJava.options.encoding = 'UTF-8'
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
task ciPrintVersionInformation {
println version
}
// https://graalvm.github.io/native-build-tools/latest/gradle-plugin.html
graalvmNative {
binaries {
main {
buildArgs.add('-J-Dfile.encoding=UTF-8')
buildArgs.add('-H:+AddAllCharsets')
buildArgs.add('--allow-incomplete-classpath')
buildArgs.add('--enable-url-protocols=http,https')
buildArgs.add('--initialize-at-run-time=sun.net.dns.ResolverConfigurationImpl')
buildArgs.add('-march=compatibility')
}
}
}
bootBuildImage {
builder = 'paketobuildpacks/builder:tiny'
environment = [
'BP_JVM_VERSION' : "17",
'BP_NATIVE_IMAGE' : 'true',
'BP_NATIVE_IMAGE_BUILD_ARGUMENTS': '-H:+AddAllCharsets ' +
'--enable-url-protocols=http,https ' +
'-march=compatibility ',
]
tags = ["eritpchy/webdav-aliyundriver:latest", "eritpchy/webdav-aliyundriver:${version}-${new Date().format('yyyyMMdd')}"]
}
File secretPropsFile = project.rootProject.file('local.properties')
if (secretPropsFile.exists()) {
println "Found secret props file, loading props"
Properties p = new Properties()
p.load(new FileInputStream(secretPropsFile))
p.each { name, value ->
if (value.startsWith('./')) {
value = file(value).getAbsolutePath()
}
ext[name] = value
}
}