In my settings.gradle file, I have a dependency on a sub project:
'includeFlat subProject'
Everything works great. However, when I try and run it from Jenkins, it cannot find the subProject because the directory layout is different:
Project
workspace
build.gradle
SubProject
workspace
build.gradle
I can make it work for Jenkins by setting the projectDir in settings.gradle:
project(':SubProject').projectDir = new File (/path/to/SubProject/workspace)
how can I make it work for both my local build (includeFlat layout) and the slightly different layout that is used for Jenkins? The jenkins build is ran by the jenkins user, can I somehow check for that and then dynamically set the projectDir path? Is there an easy way to do this? Am I not going about this the right way? thanks!