-
Notifications
You must be signed in to change notification settings - Fork 12
/
build.gradle
113 lines (100 loc) · 2.55 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 'org.springframework.boot' version '2.7.1'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'java'
id 'eclipse'
id 'idea'
id 'com.github.sherter.google-java-format' version '0.8'
id 'jacoco'
}
group = 'com.webank'
version = '1.0.0'
sourceCompatibility = '1.8'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenLocal()
mavenCentral()
maven {
allowInsecureProtocol = true
url "http://maven.aliyun.com/nexus/content/groups/public/"
}
}
test {
useJUnitPlatform()
}
def log4j_version="2.16.0"
List logger = [
"org.apache.logging.log4j:log4j-api:$log4j_version",
"org.apache.logging.log4j:log4j-to-slf4j:$log4j_version",
]
dependencies {
implementation logger
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
implementation ('org.fisco-bcos.java-sdk:fisco-bcos-java-sdk:2.9.0') {
exclude group: 'org.slf4j'
}
implementation group: 'com.google.guava', name: 'guava', version: '31.1-jre'
implementation 'commons-codec:commons-codec:1.15'
}
googleJavaFormat {
options style: 'AOSP'
source = sourceSets*.allJava
include '**/*.java'
}
verifyGoogleJavaFormat {
source = sourceSets*.allJava
include '**/*.java'
}
bootJar {
destinationDir file('dist')
archiveName project.name + version + '.jar'
exclude '**/*.xml'
exclude '**/*.properties'
exclude '**/*.yml'
doLast {
copy {
from file('src/main/resources/')
into 'dist/config'
}
}
}
jar {
enabled = true
destinationDir file('dist')
archiveName project.name + version + '.jar'
exclude '**/*.xml'
exclude '**/*.properties'
//exclude '**/spring.factories'
doLast {
copy {
from file('src/main/resources/')
into 'dist/config'
}
copy {
from configurations.runtime
into 'dist/lib'
}
}
}
clean {
println "delete ${projectDir}/dist"
delete "${projectDir}/dist"
}
jacocoTestReport {
reports {
xml.enabled true
html.enabled false
xml.destination file("$buildDir/jacocoXml.xml")
html.destination file("$buildDir/jacocoHtml")
}
}
check.dependsOn jacocoTestReport