-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
48 lines (38 loc) · 1.62 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
group 'com.cn'
version '1.0-SNAPSHOT'
//当前根目录配置优先级高于子模块配置 如果此处配置与子模块配置有一致部分 则会覆盖子模块
buildscript { //构建脚本
//定义版本号
ext { springBootVersion = '1.5.9.RELEASE' }
repositories { mavenCentral() } //jar包仓库 使用maven中心库
dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") }
}
//allprojects { //所有项目通配
// group 'com.cn'
// version '1.0-SNAPSHOT'
//}
subprojects { //子项目通配
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
//编译使用UTF-8
[compileJava, compileTestJava, javadoc]*.options*.encoding = 'UTF-8'
sourceCompatibility = 1.8
targetCompatibility = 1.8
// bootRepackage { //springboot 打包主类 单启动类时
// mainClass = 'AdminApplication'
// }
repositories { //所有子项目jar包中央仓库
mavenCentral()
}
dependencies { //所有子项目通用依赖
compile('org.springframework.boot:spring-boot-starter')
compile('org.springframework.boot:spring-boot-starter-actuator')
compile('org.springframework.boot:spring-boot-starter-web')
compile('org.springframework.boot:spring-boot-starter-data-jpa')
compile('org.springframework.boot:spring-boot-starter-jersey')
compile('org.springframework.boot:spring-boot-starter-security')
compile group: 'com.github.penggle', name: 'kaptcha', version: '2.3.2'
testCompile group: 'junit', name: 'junit', version: '4.12'
}
}