Buildpath for 2 gradle projects is not working

I have multi-module project it has 170 individual gradle projects. All these projects are registered in settings.gradle. Two projects which are being discussed here are registered as below in settings.gradle file.
include ‘:littles3:webapp’
include ‘:ws-trust-bridge:webapp’

project(":littles3:webapp").projectDir = new File("/apps/littles3/webapp")
project(":ws-trust-bridge:webapp").projectDir = new File("/apps/ws-trust-bridge/webapp")

When we do Gradle build, all 168 projects builts perfectly without any issue, however getting below error for these 2 above-mentioned projects and hence the whole build is failing.

**FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:ws-trust-bridge:webapp:powerschool-ws-trust-bridge’.

Included build C:\Bamboo\xml-data\build-dir\UTIL-DG3-BLD\milan\apps\ws-trust-bridge\webapp has build path :webapp which is the same as included build C:\Bamboo\xml-data\build-dir\UTIL-DG3-BLD\milan\apps\littles3\webapp

Can someone helps me here? It is very urgent as we are planning to move the project to production in a couple of days. We are completely stuck with this one error.