forked from WeBankBlockchain/Data-Stash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
148 lines (126 loc) · 3.65 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
buildscript {
ext {
springBootVersion = '2.1.2.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'maven'
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
sourceCompatibility = 1.8
targetCompatibility = 1.8
group = 'com.webank'
version = '1.2.3'
ext['lombok.version'] = "1.18.8"
repositories {
maven {
url "http://maven.aliyun.com/nexus/content/groups/public/"
}
maven { url "https://dl.bintray.com/ethereum/maven/" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
mavenLocal()
mavenCentral()
}
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 {
compile logger
//implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
annotationProcessor "org.projectlombok:lombok"
compileOnly "org.projectlombok:lombok"
testAnnotationProcessor "org.projectlombok:lombok"
testCompileOnly "org.projectlombok:lombok"
compile 'org.apache.shardingsphere:sharding-jdbc-spring-boot-starter:4.1.1'
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-cache'
implementation "org.springframework.boot:spring-boot-starter-aop"
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
compile 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.1.0'
compile "org.apache.commons:commons-lang3:3.6"
compile "commons-io:commons-io:2.6"
compile group: 'com.google.guava', name: 'guava', version: '28.0-jre'
compile 'mysql:mysql-connector-java'
compile 'commons-codec:commons-codec:1.9'
compile 'net.sf.ehcache:ehcache:2.10.1'
compile 'cn.hutool:hutool-all:4.6.2'
// web3j依赖
implementation ('org.fisco-bcos.java-sdk:fisco-bcos-java-sdk:2.9.0') {
exclude group: 'org.slf4j'
}
compile "com.madgag.spongycastle:core:1.58.0.0"
compile "com.madgag.spongycastle:prov:1.58.0.0"
compile "com.cedarsoftware:java-util:1.8.0" // for deep equals
compile group: 'commons-collections', name: 'commons-collections', version: '3.2.1'
compile fileTree(dir:'libs',include:['*.jar'])
}
configurations {
mybatisGenerator
}
sourceSets {
main {
java {
srcDir 'src/main/java'
}
resources {
srcDir 'src/main/resources'
}
}
}
bootJar {
destinationDir file('dist')
archiveName project.name + '.jar'
exclude '**/*.properties'
exclude '**/*.yml'
doLast {
copy {
from configurations.runtime
into 'dist/lib'
}
copy {
from file('src/main/resources/application.properties')
into 'dist/config/'
}
copy {
from file('.').listFiles().findAll{File f -> (f.name.endsWith('.crt') || f.name.endsWith('.keystore'))}
into 'dist/config'
}
copy {
from file('config/contract/')
into 'dist/config/contract'
}
}
}
jar {
enabled = true
destinationDir file('dist')
archiveName project.name + '.jar'
exclude '**/*.xml'
exclude '**/*.properties'
exclude '**/*.yml'
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"
}