Hi
There are two dependencies with 3-3 jar files each, containing native .dll and .so libraries that I would like to extract to $buildDir/natives/. I made a simple Copy task to handle it.
However, for some reason, Gradle thinks the task is up to date, and refuses to do anything, even if I do an upToDateWhen false.
But, if I instead include a dependency that has the other two as transitive dependencies, suddenly it can extract them. It is commented out below:
apply plugin: 'java'
repositories {
mavenCentral()
}
configurations {
natives
}
dependencies {
natives group: 'net.java.jinput', name: 'jinput-platform', version: 'latest.release'
natives group: 'org.lwjgl.lwjgl', name: 'lwjgl-platform', version: 'latest.release'
//
natives group: 'org.lwjgl.lwjgl', name: 'lwjgl', version: 'latest.release'
}
task extractNatives (type: Copy, dependsOn: configurations.natives) {
from configurations.natives.collect {
zipTree(it)
}
into("$buildDir/natives/")
}
Am I overlooking something obvious or otherwise what is going on?
Thank you for your help!