1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
project.buildDir = syslogBuildDir + '/common/gradle'
if (jar.hasProperty('baseName')) {
jar.baseName = 'syslog-ng-common'
}
else {
jar.archiveBaseName = 'syslog-ng-common'
}
dependencies {
implementation name: 'syslog-ng-core'
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.17.2'
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.17.2'
testImplementation 'junit:junit:4.12'
testImplementation 'org.hamcrest:hamcrest-core:1.3'
}
configurations.default.setCanBeResolved(true)
ext.jarDestDir = project.hasProperty('jarDestDir') ? project.getProperty('jarDestDir') : '/'
task copyLog4j(type: Copy) {
from findJar('log4j-core')
into jarDestDir
from findJar('log4j-api')
into jarDestDir
}
def findJar(prefix) {
configurations.default.filter { it.name.startsWith(prefix) }
}
|