1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-10-31 15:35:06 -04:00
filebot/lib/jar.groovy
2019-05-28 19:34:55 +07:00

25 lines
690 B
Groovy

def destfile = { r ->
ant.project.properties.'dir.dist' + '/lib/' + r.file.name.replaceAll(/.lib|.jdk15on|.java16/, '').toLowerCase()
}
project.references.'jar.classpath'.each { r ->
ant.jar(destfile: destfile(r), compress: 'no') {
zipfileset(src: r) {
// strip embedded native libraries
exclude(name: '**.dll')
exclude(name: '**.so')
exclude(name: '**.jnilib')
exclude(name: '**.dylib')
exclude(name: '**.a')
// strip jar signatures
exclude(name: 'META-INF/MANIFEST.MF')
exclude(name: 'META-INF/INDEX.LIST')
exclude(name: 'META-INF/*.RSA')
exclude(name: 'META-INF/*.DSA')
exclude(name: 'META-INF/*.SF')
exclude(name: 'META-INF/*.EC')
}
}
}