forked from CaiBaoHong/elegant-shiro-boot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
63 lines (53 loc) · 1.76 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
//引入spring boot gradle插件
buildscript {
ext {
springIOVersion = 'Cairo-RELEASE'
springBootVersion = '2.0.1.RELEASE'
}
repositories {
maven{ url 'http://maven.aliyun.com/nexus/content/groups/public'}
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
//所有模块的配置,含elegant-shiro
allprojects{
group 'com.abc.shiro'
version '1.0'
}
//所有子模块的配置,不含elegant-shiro
subprojects {
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
//编译设置
sourceCompatibility = 1.8
targetCompatibility = 1.8
compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"
//设置maven阿里云镜像
repositories {
maven{ url 'http://maven.aliyun.com/nexus/content/groups/public'}
}
//设置后依赖不用写版本号
dependencyManagement {
imports {
mavenBom "io.spring.platform:platform-bom:${springIOVersion}"
mavenBom "org.springframework.boot:spring-boot-starter-parent:${springBootVersion}"
}
}
//子模块公共的依赖,不包括elegant-shiro模块
dependencies {
//spring boot的starter
compile 'org.springframework.boot:spring-boot-starter-web'
compile 'org.springframework.boot:spring-boot-starter-aop'
compile 'org.springframework.boot:spring-boot-devtools'
testCompile 'org.springframework.boot:spring-boot-starter-test'
//shiro
compile 'org.apache.shiro:shiro-spring-boot-web-starter:1.4.0'
//其它
compile 'com.alibaba:fastjson:1.2.47'
}
}