Teach Gradle how to find and copy a Jar archive that we bundle

I'm not actually sure why this archive is needed, except that it is
mentioned in "META-INF/MANIFEST.MF" and "build.properties".  If we
eventually stop supporting Maven, then we may be able to discard the
"copyJarsIntoLib" task and the corresponding lines in
"META-INF/MANIFEST.MF" and "build.properties"
This commit is contained in:
Ben Liblit 2018-01-15 14:34:25 -06:00
parent fd4d68d278
commit be8f22145e
1 changed files with 13 additions and 0 deletions

View File

@ -76,3 +76,16 @@ model {
}
}
}
// TODO: if we eventually stop supporting Maven, then we may be able
// to discard the "copyJarsIntoLib" task and the corresponding lines
// in "META-INF/MANIFEST.MF" and "build.properties"
task copyJarsIntoLib(type: Copy) {
def commonsIoJar = configurations.runtimeClasspath.files[0]
assert commonsIoJar.name.startsWith('commons-io-')
from commonsIoJar
into 'lib'
}
assemble.dependsOn copyJarsIntoLib