Gradle how to include root of multi-project build with a buildSrc folder?

1k views Asked by At


I am doing a prototype of a specific feature, which in turn uses a higher Gradle version than our project uses (we are migrating, but will take time). So I have a separate gradle wrapper but in order to complete the task I need to refer to lots of compile dependencies in root project (I have nested my prototype folder like this):

root (multi-project build)
  |-- build.gradle
  |-- moduleA
  |-- moduleB
  |-- buiidSrc
  |---prototype
        |--technologyA (has separate build.gradle and wrapper due to Gradle version requirement)
        |--technologyB 

Basically I want to test various technologies that's why I don't have a build.gradle at the root of 'prototype' folder. Now I want to refer moduleA etc. in technologyA project as compile dependency, so I use the standard way to refer to external project dir (using

include 'root'`
project(':root').rootDir = new File(path to root)`

in settings.gradle but since my root project has a buildSrc, things get complicated. This buildSrc is not invoked when I build technologyA project and hence build does not find its dependencies. How to solve this?

Thanks,
Padmanabhan (Paddy)

0

There are 0 answers