Added sonarcloud, jacoco and now using a fatjar.
This commit is contained in:
parent
d4e9121ca6
commit
cb70995f08
2 changed files with 16 additions and 12 deletions
28
build.gradle
28
build.gradle
|
@ -1,11 +1,13 @@
|
||||||
plugins {
|
plugins {
|
||||||
id 'java'
|
|
||||||
id 'idea'
|
|
||||||
id 'application'
|
id 'application'
|
||||||
|
id 'idea'
|
||||||
|
id 'jacoco'
|
||||||
|
id 'java'
|
||||||
id "com.github.ben-manes.versions" version "0.21.0"
|
id "com.github.ben-manes.versions" version "0.21.0"
|
||||||
id "net.thauvin.erik.gradle.semver" version "0.9.9-beta"
|
|
||||||
id "com.github.spotbugs" version "1.7.1"
|
id "com.github.spotbugs" version "1.7.1"
|
||||||
|
id "net.thauvin.erik.gradle.semver" version "0.9.9-beta"
|
||||||
id "org.sonarqube" version "2.7"
|
id "org.sonarqube" version "2.7"
|
||||||
|
id "com.github.johnrengelman.shadow" version "5.0.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -80,9 +82,11 @@ javadoc {
|
||||||
}
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
manifest.attributes('Main-Class': mainClassName,
|
manifest.attributes('Main-Class': mainClassName)
|
||||||
'Class-Path': '. ./lib/' + configurations.compile.collect { it.getName() }.join(' ./lib/'))
|
}
|
||||||
|
|
||||||
|
shadowJar {
|
||||||
|
classifier = null
|
||||||
version = null
|
version = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,6 +110,12 @@ sonarqube {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
jacocoTestReport {
|
||||||
|
reports {
|
||||||
|
html.enabled true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tasks.withType(SpotBugsTask) {
|
tasks.withType(SpotBugsTask) {
|
||||||
reports {
|
reports {
|
||||||
xml.enabled = false
|
xml.enabled = false
|
||||||
|
@ -116,21 +126,15 @@ tasks.withType(SpotBugsTask) {
|
||||||
|
|
||||||
task copyToDeploy(type: Copy) {
|
task copyToDeploy(type: Copy) {
|
||||||
from('properties')
|
from('properties')
|
||||||
from jar
|
from shadowJar
|
||||||
into deployDir
|
into deployDir
|
||||||
}
|
}
|
||||||
|
|
||||||
task copyToDeployLib(type: Copy) {
|
|
||||||
from configurations.compile
|
|
||||||
into deployDir + '/lib'
|
|
||||||
}
|
|
||||||
|
|
||||||
task deploy(dependsOn: ['build']) {
|
task deploy(dependsOn: ['build']) {
|
||||||
description = 'Copies all needed files to the ${deployDir} directory.'
|
description = 'Copies all needed files to the ${deployDir} directory.'
|
||||||
group = 'Publishing'
|
group = 'Publishing'
|
||||||
outputs.dir deployDir
|
outputs.dir deployDir
|
||||||
inputs.files copyToDeploy
|
inputs.files copyToDeploy
|
||||||
inputs.files copyToDeployLib
|
|
||||||
doLast {
|
doLast {
|
||||||
file(deployDir + '/logs').mkdir()
|
file(deployDir + '/logs').mkdir()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue