2018-06-27 12:11:20 -04:00
|
|
|
def destfile = { r ->
|
2018-07-11 09:30:40 -04:00
|
|
|
ant.project.properties.'dir.dist' + '/lib/' + r.file.name.replaceAll(/.lib|.jdk15on|.java16/, '').toLowerCase()
|
2018-06-27 12:11:20 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
project.references.'jar.classpath'.each { r ->
|
2019-05-12 06:56:30 -04:00
|
|
|
ant.jar(destfile: destfile(r), compress: 'no') {
|
2018-06-27 12:11:20 -04:00
|
|
|
zipfileset(src: r) {
|
2019-05-28 08:34:55 -04:00
|
|
|
// strip embedded native libraries
|
|
|
|
exclude(name: '**.dll')
|
|
|
|
exclude(name: '**.so')
|
|
|
|
exclude(name: '**.jnilib')
|
|
|
|
exclude(name: '**.dylib')
|
|
|
|
exclude(name: '**.a')
|
|
|
|
|
|
|
|
// strip jar signatures
|
2018-06-27 12:11:20 -04:00
|
|
|
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')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|