| dependencies { |
| compile 'com.google.code.findbugs:annotations:3.0.0' |
| compile 'org.apache.logging.log4j:log4j-api:2.1' |
| compile 'org.apache.logging.log4j:log4j-core:2.1' |
| |
| provided project(path: ':gemfire-junit', configuration: 'testOutput') |
| } |
| |
| def generatedResources = "$buildDir/generated-resources/main" |
| |
| sourceSets { |
| main { |
| output.dir(generatedResources, builtBy: 'jgMagic') |
| } |
| } |
| |
| task jgMagic (type: JavaExec, dependsOn: compileJava) { |
| description 'Creates the JGroups configuration file jg-magic-map.txt' |
| def magicXml = file 'src/main/resources/com/gemstone/org/jgroups/conf/jg-magic-map.xml' |
| def magicTxt = file (generatedResources + "/com/gemstone/org/jgroups/conf/jg-magic-map.txt") |
| |
| inputs.file magicXml |
| outputs.file magicTxt |
| |
| main 'com.gemstone.org.jgroups.conf.MagicNumberReader' |
| classpath sourceSets.main.output.classesDir |
| args magicXml |
| |
| doFirst { |
| magicTxt.getParentFile().mkdirs(); |
| standardOutput = magicTxt.newOutputStream() |
| } |
| } |
| |
| jar { |
| dependsOn jgMagic |
| |
| from sourceSets.main.output |
| } |