-
Notifications
You must be signed in to change notification settings - Fork 45
/
build.gradle
118 lines (104 loc) · 2.99 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
buildscript {
ext {
springBootVersion = '3.1.2'
}
repositories {
mavenLocal()
maven {
url 'https://maven.aliyun.com/repository/central'
}
maven {
url 'https://maven.aliyun.com/repository/public'
}
maven {
url 'https://maven.aliyun.com/repository/spring'
}
maven {
url 'https://maven.aliyun.com/repository/spring-plugin'
}
maven {
url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'
allowInsecureProtocol = true
}
mavenCentral()
}
dependencies {
classpath(
"org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
subprojects {
apply plugin: "eclipse"
apply plugin: 'java'
apply plugin: 'maven-publish'
group = 'trader'
version = '1.0.0'
ext {
jtraderCommonVersion = '1.0.0.0-20190528'
jctpLinuxVersion = '6.3.19_20200106-linux_x64'
juntVersion = '4.13'
slf4jVersion = '1.7.30'
}
ext.gitRevision = "git rev-parse --short HEAD".execute().text.trim()
sourceCompatibility = 17
targetCompatibility = 17
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
task sourceJar(type: Jar) {
from sourceSets.main.allJava
}
jar {
manifest {
attributes(
"Implementation-Title": project.group+"."+archivesBaseName,
"Implementation-Version": project.version,
'Built-Time': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
'Git-Revision': gitRevision
)
}
}
configurations.all {
exclude group:"org.apache.hadoop", module: "hadoop-hdfs-client"
exclude group:"com.squareup.okhttp", module: "okhttp"
exclude group:"org.slf4j", module: "slf4j-log4j12"
exclude group:"log4j", module: "log4j"
}
repositories {
mavenLocal()
maven {
url 'http://maven.aliyun.com/nexus/content/groups/public/'
allowInsecureProtocol = true
}
maven {
url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'
allowInsecureProtocol = true
}
mavenCentral()
jcenter()
}
//Export all classpath entries
eclipse {
classpath {
downloadSources=true
file {
withXml {
xml -> xml.asNode().classpathentry.findAll{
it.@kind == 'lib' || it.@kind == 'src'
}.each{
it.@exported = 'true'
}
}
}
}
}
}
ext{
traderHome = System.getenv('TRADER_HOME')
if ( traderHome==null ){
traderHome = System.getProperty('user.home')+'/traderHome'
if( System.getProperty("os.name").indexOf("Windows")>=0 ){
traderHome = "C:/traderHome"
}
}
}