Application Plugin in subproject produces errors and strange paths in archive

(kastork) #1

Gradle 1.5

Say you have a mulit-level project:


Now in bottom you have a java application that uses the java and application plugins. When you do ‘gradle installApp’, an error is produced:

Execution failed for task ':intermediate/bottom:installApp'.
  path-to-top/intermediate/bottom/build/install/intermediate/bottom/bin/intermediate does not exist.

if you do ‘distZip’, there’s no error, but the archive unzips to something like

   - bin
   - lib

So, a couple problems.

  1. Why all the path depth? ‘distZip’ should create an archive ‘’ that expands to
  - bin
  - lib
  1. The error in ‘installApp’ is, I think related. It seems to know there shouldn’t be this extra path depth (and so it doesn’t create the deep directory), but then the copy task presumes it exists anyway and fails. It looks like what it is trying to do is create a structure like
   - bin
   - lib

‘installApp’ should, I think, create something like:

   - bin
   - lib

Alternatively, perhaps a configuration is required to give the project author the option of what the root of the install package should look like.

(Luke Daley) #2

What does your ‘settings.gradle’ look like?