Add checkstyle plugin

This commit is contained in:
cugurlu
2019-03-17 17:06:50 +01:00
parent b1ab9f4e8a
commit f5fa03b104
7 changed files with 242 additions and 258 deletions

View File

@@ -13,6 +13,7 @@ apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'jacoco'
apply plugin: 'checkstyle'
bootJar {
baseName = 'gs-rest-service'
@@ -31,6 +32,22 @@ repositories {
sourceCompatibility = 1.8
targetCompatibility = 1.8
def configDir = "${project.rootDir}/quality"
checkstyle {
toolVersion '7.8.1'
configFile file("$configDir/checkstyle/checkstyle.xml")
configProperties.checkstyleSuppressionsPath = file("$configDir/checkstyle/suppressions.xml").absolutePath
}
checkstyleMain {
source ='src/main/java'
}
checkstyleTest {
source ='src/test/java'
}
dependencies {
compile("org.springframework.boot:spring-boot-starter-web")
testCompile('org.springframework.boot:spring-boot-starter-test')