Hi,
I use:
- Gradle: Gradle 3.4-rc-3\
- Java: 9 (https://hub.docker.com/_/openjdk/ - https://github.com/docker-library/openjdk/blob/445f8b8d18d7c61e2ae7fda76d8883b5d51ae0a5/9-jdk/Dockerfile)
and my build.gradle contains:
// essentially taken from: http://stackoverflow.com/a/10986799/99256
task fatJar(type: Jar) {
manifest.from jar.manifest
classifier = 'all'
from {
configurations.compile.collect {
it.isDirectory() ? it : zipTree(it) // THIS LINE THROWS AN ERROR (SEE BELOW)
}
} {
exclude "META-INF/*.SF"
exclude "META-INF/*.DSA"
exclude "META-INF/*.RSA"
}
with jar
}
I get the following error:
* What went wrong:
Could not determine the dependencies of task ':app:fatJar'.
> No signature of method: java.io.File.isDirectory() is applicable for argument types: () values: []
Does anyone know how to fix it? The build.gradle works in JDK8 (in and outside of Docker).
Thank you
EDIT: I posted the issue also here: http://stackoverflow.com/questions/42243683/how-to-create-fatjar-uberjar-with-gradle-and-jdk9