Upgrade to gradle 4.3.1 breaks shadowJar?


(Thufir) #1

what does this mean:

The specified installation directory '/home/thufir/NetBeansProjects/gradleHelloWorld/build/install/gradleHelloWorld-shadow' is neither empty nor does it contain an installation for 'gradleHelloWorld'.
  If you really want to install to this directory, delete it and run the install task again.
  Alternatively, choose a different installation directory.

when I run clean that directory gets removed. Notably, the JAR built from assembleShadowDist is fine. Yet gradle cannot execute shadowJar – it crashes as above.

Not related to the build file (I think):


(Stefan Wolf) #2

Hi @THUFIR,

could you provide a little more context about your project? IIUC, something is in the /home/thufir/NetBeansProjects/gradleHelloWorld/build/install/gradleHelloWorld-shadow directory, which doesn’t seem to be an old application. It may be an empty directory, could you check?
I checked the shadow plugin, and it seems that there is already an issue open: https://github.com/johnrengelman/shadow/issues/339.

Cheers,
Stefan


(Thufir) #3

yup, that looks like it.

No, it’s not an old application. I made it specifically to see if it’s a bug.

The directory is empty – at least when the build finishes.

running clean will remove the problem directory. Notably, shadowJar makes the JAR fine, it’s runnable, etc. It’s just this one task, runShadow which triggers bug 339.

As for the project, it’s a simple as they get:

thufir@dur:~/NetBeansProjects/gradleHelloWorld$ tree
.
├── build.gradle
├── gradle
│   └── wrapper
│       ├── gradle-wrapper.jar
│       └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
└── src
    ├── main
    │   └── java
    │       ├── dur
    │       └── net
    │           └── bounceme
    │               └── dur
    │                   └── gradle
    │                       └── hello
    │                           └── App.java
    └── test
        └── java

13 directories, 7 files
thufir@dur:~/NetBeansProjects/gradleHelloWorld$ 

All App.java does is print “hellooo” to the console.