-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
121 lines (93 loc) · 3.77 KB
/
build.gradle
File metadata and controls
121 lines (93 loc) · 3.77 KB
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
group 'acheng1314.cn'
//项目版本
version '1.0-SNAPSHOT'
buildscript {
repositories {
//使用阿里云国内镜像仓库
maven { url "http://maven.aliyun.com/nexus/content/repositories/central" }
maven { url "https://jitpack.io" }
jcenter()
//使用maven的中央仓库
mavenCentral()
}
dependencies {
//使用1.5.4.RELEASE版本的Spring框架
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.4.RELEASE")
classpath 'org.springframework:springloaded:1.2.7.RELEASE'
}
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Werror"
}
}
}
//使用的插件
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'org.springframework.boot'
//指定JDK
sourceCompatibility = 1.8
targetCompatibility = 1.8
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
task createJavadoc(type: Javadoc) {
source = sourceSets.main.allJava
}
allprojects {
repositories {
// maven库
// 先从阿里云maven下载jar若没有找到,则在后面的仓库中寻找
//仓库优先级从上到下顺序排列
maven { url "http://maven.aliyun.com/nexus/content/repositories/central" }
maven { url "https://jitpack.io" }
jcenter()
mavenCentral()
}
}
tasks.whenTaskAdded { task ->
if (task.name == "lint") {
task.enabled = false
}
}
dependencies {
//测试的依赖
testCompile group: 'junit', name: 'junit', version: '4.12'
// https://mvnrepository.com/artifact/org.mybatis.spring.boot/mybatis-spring-boot-starter
compile 'org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.0'
compile 'com.squareup.okhttp3:okhttp:3.8.1'
//druid-spring-boot-starter
compile('com.github.drtrang:druid-spring-boot-starter:1.0.3') {
exclude group: 'com.alibaba'
}
compile 'com.alibaba:druid:1.1.2'
// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-parent
compile 'org.springframework.boot:spring-boot-starter-parent:1.5.4.RELEASE'
// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web
compile 'org.springframework.boot:spring-boot-starter-web:1.5.4.RELEASE'
compile 'org.springframework.boot:spring-boot-starter-aop:1.5.4.RELEASE'
//访问MongoDB
compile "javax.annotation:javax.annotation-api:1.2"
// https://mvnrepository.com/artifact/org.projectlombok/lombok
compile group: 'org.projectlombok', name: 'lombok', version: '1.16.16'
compile('org.springframework.boot:spring-boot-starter-data-mongodb')
compile group: 'org.mongodb', name: 'mongo-java-driver', version: '2.11.4'
runtime 'mysql:mysql-connector-java:5.1.39'
compile 'org.springframework.boot:spring-boot-starter-redis:1.4.7.RELEASE'
testCompile 'org.springframework.boot:spring-boot-starter-test:1.5.4.RELEASE'
compile 'org.springframework.boot:spring-boot-starter-freemarker:1.5.4.RELEASE'
compile("org.springframework.boot:spring-boot-devtools")
compile "io.springfox:springfox-swagger2:2.7.0"
compile "io.springfox:springfox-staticdocs:2.6.1"
compile "io.springfox.ui:springfox-swagger-ui-rfc6570:1.0.0"
compile 'com.github.sd4324530:fastweixin:1.3.15'
// https://mvnrepository.com/artifact/eu.bitwalker/UserAgentUtils
compile group: 'eu.bitwalker', name: 'UserAgentUtils', version: '1.20'
compile group: 'com.google.code.gson', name: 'gson', version: '2.7'
compile('com.baomidou:mybatisplus-spring-boot-starter:1.0.4') {
exclude group: 'org.springframework.*'
}
compile 'com.baomidou:mybatis-plus:2.1-gamma'
//加入shiro作为安全管理
compile 'org.apache.shiro:shiro-all:1.3.2'
}