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

81 lines
2.6 KiB
Groovy

//该产品的构建基本配置,公司统一模板,禁止开发人员修改。
ext {
swaggerVersion = "3.0.0"
lombokVersion = "1.18.16"
junitVersion = "4.13.1"
logbackVersion = "1.2.3"
}
task copyConfig(type: Copy) {
from "src/main/resources/application.properties"
from "src/main/resources/application.yaml"
from "src/main/resources/appServer.conf"
from "src/main/resources/subGui.conf"
into "build/libs/"
}
task copySql(type: Copy) {
from "src/main/resources/sql"
into "build/libs/sql"
}
task cleanGridnt(type: Exec) {
executable "../rmGridntJar.sh"
}
clean {
delete = ["build", "out", "dist_java", "boot", "log", "logs",]
}
[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/" }
// maven { url "http://192.168.8.200:8081/repository/public/" }
}
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 {
// // 排除掉模块调试的资源文件, 启动类.
// excludes = ["file/WaveAnalysis", "com/gridnt/**/*Starter*", "logback*.xml",
// "application*.properties", "application*.yaml", "config"
// ]
manifest {
attributes "releaseVersion": version + "-" + getGitVersion()
attributes "vendor": "GRIDNT山东网聪信息科技有限公司 build"
attributes "description": "重新编译打包,引用的其它组织的代码,著作圈原作者所有"
attributes "buildTime": new Date().format("yyyy-MM-dd HH:mm:ss", TimeZone.getTimeZone("GMT+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"
}
}