RuoYi-Cloud/build-config/build-base.gradle

80 lines
2.2 KiB
Groovy
Raw Normal View History

2020-12-23 12:10:21 +08:00
//该产品的构建基本配置,统一模板,禁止开发人员修改。
2020-12-15 20:21:23 +08:00
ext {
swaggerVersion = "3.0.0"
lombokVersion = "1.18.16"
junitVersion = "4.13.1"
logbackVersion = "1.2.3"
2020-12-23 14:15:26 +08:00
repoUrl="http://192.168.8.200:8081/repository"
2020-12-15 20:21:23 +08:00
}
apply plugin: "java"
apply plugin: "idea"
apply plugin: "io.spring.dependency-management"
2020-12-18 13:28:13 +08:00
2020-12-15 20:21:23 +08:00
task cleanGridnt(type: Exec) {
executable "../rmGridntJar.sh"
}
clean {
delete = ["build", "out", "dist_java", "boot", "log", "logs",]
}
2020-12-15 20:21:23 +08:00
[compileJava, compileTestJava]*.options*.encoding = "UTF-8"
[compileJava, compileTestJava]*.sourceCompatibility = "11"
[compileJava, compileTestJava]*.targetCompatibility = "11"
repositories {
mavenLocal()
mavenCentral()
maven { url "https://maven.aliyun.com/repository/public/" }
2020-12-23 14:15:26 +08:00
maven { url "${repoUrl}/public/" }
2020-12-15 20:21:23 +08:00
}
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, "seconds"
resolutionStrategy.cacheDynamicVersionsFor 0, "seconds"
}
dependencies {
/*lombok依赖*/
testCompile "junit:junit:${junitVersion}"
compileOnly "org.projectlombok:lombok:${lombokVersion}"
annotationProcessor "org.projectlombok:lombok:${lombokVersion}"
testCompileOnly "org.projectlombok:lombok:${lombokVersion}"
testAnnotationProcessor "org.projectlombok:lombok:${lombokVersion}"
compile "ch.qos.logback:logback-classic:${logbackVersion}"
testCompileOnly "ch.qos.logback:logback-classic:${logbackVersion}"
}
jar {
2020-12-18 13:28:13 +08:00
// 排除掉模块调试的资源文件, 启动类.
2020-12-23 16:06:48 +08:00
excludes = ['*.yml','logback.xml',
'com/ruoyi/*/RuoYi*Application*'
]
2020-12-18 13:28:13 +08:00
2020-12-15 20:21:23 +08:00
manifest {
attributes "releaseVersion": version + "-" + getGitVersion()
2020-12-23 14:15:26 +08:00
attributes "vendor": "vendor"
2020-12-15 20:21:23 +08:00
attributes "buildTime": new Date().format("yyyy-MM-dd HH:mm:ss", TimeZone.getTimeZone("GMT+08:00"))
}
}
2020-12-23 14:15:26 +08:00
apply plugin: "org.sonarqube"
sonarqube {
properties {
property "sonar.projectKey", "${project.name}"
property "sonar.projectName", "${project.name}"
property "sonar.sources", "src"
property "sonar.java.binaries", "build"
property "sonar.exclusions", "**/**test**/**"
property "sonar.sourceEncoding", "UTF-8"
}
}
2020-12-15 20:21:23 +08:00