-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
113 lines (102 loc) · 3.96 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
110
111
112
113
plugins {
id "io.spring.dependency-management" version "1.1.0"
id "org.springframework.boot" version "2.6.13" apply false
id "java-library"
id "idea"
id "maven-publish"
}
description = "Blueking Audit Java SDK Build"
ext {
springVersion = "5.3.25"
springBootVersion = "2.6.13"
aspectjVersion = "1.9.7"
jacksonVersion = "2.13.4"
slf4jVersion = "1.7.30"
commonsLang3Version = "3.12.0"
commonsCollectionsVersion = "3.2.2"
commonsCollections4Version = "4.4"
servletVersion = "4.0.1"
junitVersion = "5.8.2"
assertjVersion = "3.21.0"
lombokVersion = "1.18.10"
mockitoVersion = "4.0.0"
hamcrestVersion = "2.2"
}
allprojects {
group = "com.tencent.bk.sdk"
version = project.property("version")
apply plugin: "idea"
apply plugin: "eclipse"
apply plugin: "java-library"
apply plugin: "io.spring.dependency-management"
// 版本管理
dependencyManagement {
dependencies {
dependency("org.springframework.boot:spring-boot-autoconfigure:$springBootVersion")
dependency("org.springframework.boot:spring-boot-test-autoconfigure:$springBootVersion")
dependency("org.springframework.boot:spring-boot-configuration-processor:$springBootVersion")
dependency("org.springframework:spring-web:$springVersion")
dependency("org.springframework:spring-webmvc:$springVersion")
dependency("org.springframework:spring-test:$springVersion")
dependency("org.springframework.boot:spring-boot-test:$springBootVersion")
dependencySet(group: "org.aspectj", version: "$aspectjVersion") {
entry "aspectjrt"
entry "aspectjweaver"
}
dependencySet(group: "com.fasterxml.jackson.core", version: "$jacksonVersion") {
entry "jackson-core"
entry "jackson-databind"
entry "jackson-annotations"
}
dependency("com.fasterxml.jackson.module:jackson-module-jsonSchema:$jacksonVersion")
dependency("org.slf4j:slf4j-api:$slf4jVersion")
dependency("org.apache.commons:commons-lang3:$commonsLang3Version")
dependency("commons-collections:commons-collections:$commonsCollectionsVersion")
dependency("org.apache.commons:commons-collections4:$commonsCollections4Version")
dependency("javax.servlet:javax.servlet-api:$servletVersion")
dependencySet(group: "org.junit.jupiter", version: "$junitVersion") {
entry "junit-jupiter-api"
entry "junit-jupiter-engine"
}
dependency("org.assertj:assertj-core:$assertjVersion")
dependency("org.projectlombok:lombok:$lombokVersion")
dependency("org.mockito:mockito-core:$mockitoVersion")
dependency("org.hamcrest:hamcrest:$hamcrestVersion")
}
}
test {
useJUnitPlatform()
testLogging {
events 'PASSED', 'FAILED', 'SKIPPED'
}
include '**/*Test.class'
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
tasks.withType(Javadoc) {
options.encoding("UTF-8")
}
task sourceJar(type: Jar) {
classifier "sources"
from sourceSets.main.allJava
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier "javadoc"
from javadoc.destinationDir
}
javadoc {
description = "javadoc for bk-auit-java-sdk"
options.memberLevel = JavadocMemberLevel.PROTECTED
options.author = true
options.version = true
options.header = project.name
// 不检查:非标的javadoc注解不报错
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption("charset", "UTF-8")
logging.captureStandardError LogLevel.INFO
logging.captureStandardOutput LogLevel.INFO
options.encoding = "UTF-8"
options.charSet = "UTF-8"
}
}