Reverted to using a lib directory, the fatjar was causing problems with log4j not finding the configuration file.

This commit is contained in:
Erik C. Thauvin 2019-04-07 00:22:58 -07:00
parent be94c6ebbf
commit 95899c2840

View file

@ -7,7 +7,6 @@ plugins {
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"
}
@ -35,29 +34,29 @@ dependencies {
annotationProcessor semverProcessor
compileOnly semverProcessor
implementation 'pircbot:pircbot:1.5.0'
compile 'pircbot:pircbot:1.5.0'
compileOnly 'pircbot:pircbot:1.5.0:sources'
implementation 'org.apache.logging.log4j:log4j-api:2.11.2'
implementation 'org.apache.logging.log4j:log4j-core:2.11.2'
implementation 'org.apache.logging.log4j:log4j-slf4j-impl:2.11.2'
compile 'org.apache.logging.log4j:log4j-api:2.11.2'
compile 'org.apache.logging.log4j:log4j-core:2.11.2'
compile 'org.apache.logging.log4j:log4j-slf4j-impl:2.11.2'
implementation 'commons-cli:commons-cli:1.4'
compile 'commons-cli:commons-cli:1.4'
implementation 'commons-net:commons-net:3.6'
implementation 'com.squareup.okhttp3:okhttp:3.14.0'
compile 'commons-net:commons-net:3.6'
compile 'com.squareup.okhttp3:okhttp:3.14.0'
implementation 'com.rometools:rome:1.12.0'
compile 'com.rometools:rome:1.12.0'
implementation 'org.json:json:20180813'
implementation 'org.ostermiller:utils:1.07.00'
implementation 'org.jsoup:jsoup:1.11.3'
implementation 'net.objecthunter:exp4j:0.4.8'
compile 'org.json:json:20180813'
compile 'org.ostermiller:utils:1.07.00'
compile 'org.jsoup:jsoup:1.11.3'
compile 'net.objecthunter:exp4j:0.4.8'
implementation 'org.twitter4j:twitter4j-core:4.0.7'
implementation 'net.thauvin.erik:pinboard-poster:1.0.0'
compile 'org.twitter4j:twitter4j-core:4.0.7'
compile 'net.thauvin.erik:pinboard-poster:1.0.0'
implementation 'net.aksingh:owm-japis:2.5.2.3'
compile 'net.aksingh:owm-japis:2.5.2.3'
testImplementation 'org.testng:testng:6.14.3'
testImplementation 'org.assertj:assertj-core:3.12.2'
@ -82,11 +81,9 @@ javadoc {
}
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
}
@ -127,15 +124,21 @@ tasks.withType(SpotBugsTask) {
task copyToDeploy(type: Copy) {
from('properties')
from shadowJar
from jar
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()
}