diff --git a/build.gradle b/build.gradle index 1f3548d..536138c 100644 --- a/build.gradle +++ b/build.gradle @@ -1,11 +1,13 @@ plugins { - id 'java' - id 'idea' id 'application' + id 'idea' + id 'jacoco' + id 'java' 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 "net.thauvin.erik.gradle.semver" version "0.9.9-beta" id "org.sonarqube" version "2.7" + id "com.github.johnrengelman.shadow" version "5.0.0" } @@ -80,9 +82,11 @@ javadoc { } jar { - manifest.attributes('Main-Class': mainClassName, - 'Class-Path': '. ./lib/' + configurations.compile.collect { it.getName() }.join(' ./lib/')) + manifest.attributes('Main-Class': mainClassName) +} +shadowJar { + classifier = null version = null } @@ -106,6 +110,12 @@ sonarqube { } } +jacocoTestReport { + reports { + html.enabled true + } +} + tasks.withType(SpotBugsTask) { reports { xml.enabled = false @@ -116,21 +126,15 @@ tasks.withType(SpotBugsTask) { task copyToDeploy(type: Copy) { from('properties') - from jar + from shadowJar into deployDir } -task copyToDeployLib(type: Copy) { - from configurations.compile - into deployDir + '/lib' -} - task deploy(dependsOn: ['build']) { description = 'Copies all needed files to the ${deployDir} directory.' group = 'Publishing' outputs.dir deployDir inputs.files copyToDeploy - inputs.files copyToDeployLib doLast { file(deployDir + '/logs').mkdir() } diff --git a/sonar-project.properties b/sonar-project.properties deleted file mode 100644 index e69de29..0000000