-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
108 lines (93 loc) · 3.38 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
buildscript {
ext {
kotlinVersion = '1.3.61'
springBootVersion = '2.2.4.RELEASE'
}
repositories {
mavenLocal()
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
mavenCentral()
maven { url 'https://repo.spring.io/plugins-release' }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
classpath("io.spring.gradle:propdeps-plugin:0.0.10.RELEASE")
}
}
allprojects {
repositories {
mavenLocal()
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
mavenCentral()
maven { url "https://repo.spring.io/release" }
maven { url "https://repo.spring.io/milestone" }
maven { url 'https://repo.spring.io/plugins-release' }
maven { url 'https://jitpack.io' }
}
}
subprojects {
apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'propdeps'
apply plugin: 'propdeps-maven'
apply plugin: 'propdeps-idea'
apply plugin: 'propdeps-eclipse'
springBoot {
buildInfo()
}
repositories {
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
mavenLocal()
mavenCentral()
maven { url "https://repo.spring.io/release" }
maven { url 'https://repo.spring.io/plugins-release' }
maven { url 'https://jitpack.io' }
}
dependencies {
// kotlin
compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
compile("org.jetbrains.kotlin:kotlin-reflect")
// spring boot
compile('org.springframework.boot:spring-boot-starter-web')
compile('org.springframework.boot:spring-boot-starter-security')
// 自动加载配置
compileOnly('org.springframework.boot:spring-boot-configuration-processor')
annotationProcessor('org.springframework.boot:spring-boot-configuration-processor')
testCompileOnly('org.springframework.boot:spring-boot-configuration-processor')
testAnnotationProcessor('org.springframework.boot:spring-boot-configuration-processor')
// test
testCompile('org.springframework.boot:spring-boot-starter-test')
// java9支持
compile('javax.xml.bind:jaxb-api:2.3.0')
// lombok
compileOnly('org.projectlombok:lombok:1.16.20')
compileOnly("com.alibaba:fastjson:1.2.47")
// dubbo
implementation('com.alibaba.spring.boot:dubbo-spring-boot-starter:2.0.0') {
exclude group: 'org.slf4j', module: 'slf4j-log4j12'
}
implementation('com.101tec:zkclient:0.10') {
exclude group: 'org.slf4j', module: 'slf4j-log4j12'
}
}
sourceCompatibility = 1.8
sourceSets.main.java.srcDirs('src/main/kotlin')
sourceSets.main.kotlin.srcDirs('src/main/kotlin')
compileKotlin {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
jvmTarget = "1.8"
}
}
}