project.buildDir = syslogBuildDir + '/common/gradle'

jar.baseName = 'syslog-ng-common'

dependencies {
  implementation name: 'syslog-ng-core'
  implementation 'log4j:log4j:1.2.16'
  testImplementation 'junit:junit:4.12'
  testImplementation 'org.hamcrest:hamcrest-core:1.3'
}

ext.jarDestDir = project.hasProperty('jarDestDir') ? project.getProperty('jarDestDir') : '/'
task copyLog4j(type: Copy) {
     from findJar('log4j')
     into jarDestDir
}

def findJar(prefix) {
    configurations.default.filter { it.name.startsWith(prefix) }
}
