2019-01-25 13:32:24 +08:00
|
|
|
|
buildscript {
|
|
|
|
|
ext {
|
2019-05-11 17:58:03 +08:00
|
|
|
|
springBootVersion = '2.1.4.RELEASE'
|
2019-01-25 13:32:24 +08:00
|
|
|
|
}
|
|
|
|
|
repositories {
|
2019-06-27 15:59:13 +08:00
|
|
|
|
mavenLocal() //优先查找本地maven库,性能最好
|
2019-01-25 13:32:24 +08:00
|
|
|
|
maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
|
|
|
|
|
}
|
|
|
|
|
dependencies {
|
|
|
|
|
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-04-20 21:21:35 +08:00
|
|
|
|
// 全局配置
|
2019-01-25 13:32:24 +08:00
|
|
|
|
allprojects {
|
|
|
|
|
group 'com.diboot'
|
|
|
|
|
version '2.0-alpha'
|
|
|
|
|
apply plugin: 'idea'
|
|
|
|
|
}
|
2019-04-20 21:21:35 +08:00
|
|
|
|
// 子项目的配置
|
2019-01-25 13:32:24 +08:00
|
|
|
|
subprojects {
|
|
|
|
|
apply plugin: 'java'
|
2019-06-27 15:59:13 +08:00
|
|
|
|
apply plugin: 'maven'
|
|
|
|
|
apply plugin: 'io.spring.dependency-management'
|
|
|
|
|
apply plugin: 'java-library'
|
|
|
|
|
|
2019-04-20 21:21:35 +08:00
|
|
|
|
sourceCompatibility = 1.8
|
|
|
|
|
targetCompatibility = 1.8
|
|
|
|
|
|
|
|
|
|
[compileJava,compileTestJava,javadoc]*.options*.encoding = 'UTF-8'
|
2019-01-25 13:32:24 +08:00
|
|
|
|
repositories {
|
2019-06-27 15:59:13 +08:00
|
|
|
|
mavenLocal() //优先查找本地maven库,性能最好
|
2019-04-20 21:21:35 +08:00
|
|
|
|
maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
|
2019-01-25 13:32:24 +08:00
|
|
|
|
}
|
|
|
|
|
ext {//依赖版本
|
2019-04-20 21:21:35 +08:00
|
|
|
|
springBootVersion = "2.1.4.RELEASE"
|
2019-05-11 17:58:03 +08:00
|
|
|
|
mysqlConnectorVersion = "8.0.16"
|
2019-04-20 21:21:35 +08:00
|
|
|
|
mybatisStarterVersion = "2.0.1"
|
2019-05-11 17:58:03 +08:00
|
|
|
|
mybatisPlusVersion = "3.1.1"
|
|
|
|
|
fastjsonVersion = "1.2.58"
|
|
|
|
|
lombokVersion = "1.18.8"
|
2019-01-25 13:32:24 +08:00
|
|
|
|
}
|
|
|
|
|
dependencies {
|
2019-06-25 17:06:57 +08:00
|
|
|
|
// Gradle 5.0及以上版本,使用如下方式
|
2019-06-27 15:59:13 +08:00
|
|
|
|
// annotationProcessor("org.projectlombok:lombok:$lombokVersion")
|
2019-06-25 17:06:57 +08:00
|
|
|
|
//gradle 5.0版本以下,使用如下方式
|
2019-06-27 15:59:13 +08:00
|
|
|
|
compileOnly("org.projectlombok:lombok:$lombokVersion")
|
2019-06-06 11:02:07 +08:00
|
|
|
|
|
2019-01-25 13:32:24 +08:00
|
|
|
|
compile("javax.servlet:javax.servlet-api:4.0.1")
|
|
|
|
|
compile("org.springframework.boot:spring-boot-starter-web:$springBootVersion")
|
|
|
|
|
// Mybatis
|
|
|
|
|
compile("org.mybatis.spring.boot:mybatis-spring-boot-starter:$mybatisStarterVersion")
|
|
|
|
|
// Mybatis-Plus
|
|
|
|
|
compile("com.baomidou:mybatis-plus-boot-starter:$mybatisPlusVersion")
|
|
|
|
|
// Log4j2
|
|
|
|
|
compile("org.springframework.boot:spring-boot-starter-log4j2:$springBootVersion")
|
|
|
|
|
// JDBC Driver
|
|
|
|
|
compile("mysql:mysql-connector-java:$mysqlConnectorVersion")
|
|
|
|
|
// JSON
|
|
|
|
|
compile("com.alibaba:fastjson:$fastjsonVersion")
|
|
|
|
|
// Apache Commons
|
|
|
|
|
compile("org.apache.commons:commons-lang3:3.8.1")
|
2019-04-20 21:21:35 +08:00
|
|
|
|
|
2019-05-11 17:58:03 +08:00
|
|
|
|
// 单元测试
|
2019-01-25 13:32:24 +08:00
|
|
|
|
testCompile("org.springframework.boot:spring-boot-starter-test:$springBootVersion")
|
|
|
|
|
testCompile("junit:junit:4.12")
|
|
|
|
|
}
|
|
|
|
|
configurations {
|
|
|
|
|
//移除spring boot 默认logger依赖
|
|
|
|
|
all*.exclude module: 'spring-boot-starter-logging'
|
|
|
|
|
}
|
|
|
|
|
}
|