//该产品的构建基本配置,统一模板,禁止开发人员修改。 ext { swaggerVersion = "3.0.0" lombokVersion = "1.18.16" junitVersion = "4.13.1" logbackVersion = "1.2.3" } apply plugin: "java" apply plugin: "idea" apply plugin: "io.spring.dependency-management" 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 = [] manifest { attributes "releaseVersion": version + "-" + getGitVersion() attributes "vendor": "GRIDNT山东网聪信息科技有限" 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" // } //}