How to declare dependent project that are not side-by-side (built with jenkins)?


(Jean-Michel Cazaux) #1

Hi there, we do have a large java application that we want to move to gradle AND split in multiple projects and independent git repos.

Due to the later we use the “includeFlat” depandency.

So in our dev environement (eclipse) we have a directory per project (as usual) : - projectA that contains its own build.gradle - projectB that contains its own build.gradle and a gradle.settings file with “includeFlat 'projectA”.

This all works fine.

The issue is that it ends up with a diferent layout in jenkins as the code is checked out and compiled in a workspace subdir : - projectA/workspace contains project A (and its build.gradle) - projectB/workspace contains project B (it build.gradle and the gradle.settings file still with “includeFlat 'projectA”).

As you may think the includeFlat directive does not work with this directory layout and teh build of project B fails.

Any idea how we could resole this dependency ?

Many thanks in advance, JM


(Guojun Zhu) #2

We have the same problem. I saw another post about this as well. http://forums.gradle.org/gradle/topics/multi_project_build_with_different_directly_layout_in_jenkins So this problem is relatively common.

The only way to resolve it I can think of so far is to change the dependency into the normal module dependency, then build one and commit it to a temporary (or maybe local) snapshot repository, and then build the next one who depends on it, so and so on. Kind of ugly.

Any expert, please help!


(John Engelman) #3

You might want to look at a tool like Pride.