Application Plugin in subproject produces errors and strange paths in archive


(kastork) #1

Gradle 1.5

Say you have a mulit-level project:

‘top:intermediate:bottom’

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

intermediate/bottom
   - bin
   - lib

So, a couple problems.

  1. Why all the path depth? ‘distZip’ should create an archive ‘bottom.zip’ that expands to
bottom
  - 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
path-to-top/intermediate/bottom/build/install/intermediate/bottom/bin/intermediate/bottom
   - bin
   - lib

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

path-to-top/intermediate/bottom/build/install/bottom
   - 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?