Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
Clone or download
build.gradle 5.45 KB
Copy Edit Web IDE Raw Blame History
清风丶 authored 2018-12-26 11:25 . [删除] 去除devtools兼容eclipse
description = "Crown"
configurations.all {
//每隔100天检查远程依赖是否存在更新
resolutionStrategy.cacheChangingModulesFor 2400, 'hours'
// cache dynamic versions for 24*60 minutes
resolutionStrategy.cacheDynamicVersionsFor 24 * 60 * 60, 'seconds'
}
configurations {
compile.exclude group: "ch.qos.logback"
compile.exclude group: "org.springframework.boot", module: "spring-boot-starter-logging"
compile.exclude group: "org.springframework.boot", module: "spring-boot-starter-tomcat"
compile.exclude group: "org.apache.tomcat", module: "tomcat-jdbc"
}
buildscript {
repositories {
maven { url "https://repo.spring.io/plugins-release" }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
group = "org.crown"
version = "1.0"
apply plugin: "java-library"
apply plugin: "org.springframework.boot"
apply plugin: 'jacoco'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
//options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
repositories {
maven { url "http://maven.aliyun.com/nexus/content/groups/public/" }
maven { url "http://repo.maven.apache.org/maven2" }
maven { url "https://jitpack.io" }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
jcenter()
}
dependencies {
api("org.springframework.boot:spring-boot-starter:${springBootVersion}")
api("org.springframework.boot:spring-boot-starter-web:${springBootVersion}")
api("org.springframework.boot:spring-boot-starter-undertow:${springBootVersion}")
api("org.springframework.boot:spring-boot-starter-jdbc:${springBootVersion}")
api("org.springframework.boot:spring-boot-starter-aop:${springBootVersion}")
api("org.springframework.boot:spring-boot-starter-log4j2:${springBootVersion}")
api("com.baomidou:mybatis-plus-boot-starter:${mybatisPlusVersion}")
api("com.baomidou:mybatis-plus-generator:${mybatisPlusVersion}")
api("mysql:mysql-connector-java:8.0.13")
api("org.apache.commons:commons-lang3:3.8.1")
api("io.springfox:springfox-swagger-ui:${swaggerVersion}")
api("io.springfox:springfox-swagger2:${swaggerVersion}")
api("io.jsonwebtoken:jjwt:0.9.1")
api("org.apache.commons:commons-collections4:4.2")
api("commons-io:commons-io:2.5")
api("commons-codec:commons-codec:1.11")
api("org.hibernate:hibernate-validator:6.0.13.Final")
api("org.liquibase:liquibase-core:${liquibaseVersion}")
api("org.modelmapper:modelmapper:2.3.1")
api("com.vip.vjtools:vjkit:1.0.7")
api("p6spy:p6spy:3.8.0")
api("com.lmax:disruptor:3.3.11")
api("org.apache.shiro:shiro-spring:1.4.0")
annotationProcessor("org.projectlombok:lombok:${lombokVersion}")
compileOnly("org.projectlombok:lombok:${lombokVersion}")
testCompile("org.springframework.boot:spring-boot-starter-test:${springBootVersion}")
testCompile("org.apache.velocity:velocity-engine-core:2.0")
testCompile("org.projectlombok:lombok:${lombokVersion}")
testAnnotationProcessor("org.projectlombok:lombok:${lombokVersion}")
}
tasks.matching { it instanceof Test }.all {
testLogging.events = ["failed", "passed", "skipped"]
}
bootJar {
baseName = "crown"
version = ""
}
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
html.destination = new File("${buildDir}/jacocoHtml")
}
afterEvaluate {
classDirectories = files(classDirectories.files.collect {
fileTree(dir: it, exclude: [
'**/common/cons/Regex.class',
'**/common/modelmapper/jsr310/*.class',
'**/common/modelmapper/jdk8/FromOptionalConverter.class',
'**/common/modelmapper/jdk8/ToOptionalConverter.class',
'**/common/spring/BasicErrorController.class',
'**/common/undertow/UndertowServerFactoryCustomizer.class',
'**/common/spring/validator/ValidatorCollectionImpl.class',
'**/common/spring/CrownHandlerExceptionResolver.class',
'**/common/spring/.class',
'**/common/spring/ApplicationUtils.class',
'**/common/utils/Maps.class',
'**/common/utils/TypeUtils.class',
'**/common/shiro/*.class',
'**/common/utils/*.class',
'**/common/exception/*.class',
'**/common/spring/IEnumConverterFactory.class',
'**/framework/converter/BeanConverter.class',
'**/framework/emuns/ErrorCodeEnum.class',
'**/framework/exception/*.class',
'**/framework/responses/FailedResponse.class',
'**/framework/utils/ApiAssert.class',
'**/framework/utils/AntiSQLFilter.class',
'**/framework/utils/RequestUtils.class',
'**/framework/utils/ResponseUtils.class',
'**/framework/service/*.class',
'**/framework/responses/FailedResponse.class',
'**/generate/MysqlGenerator.class',
'**/framework/model/ErrorCode.class',
'**/framework/wrapper/*.class',
'**/framework/filter/CrownFilter.class'
])
})
}
}
check.dependsOn jacocoTestReport

Comment ( 0 )

Sign in for post a comment