Having includeProject provide a default filepath

based on the project logical path

Bug: 134082137

Change-Id: I2973da15b1d2ae90b5d54e0b45396cd5be5c1f97
diff --git a/settings.gradle b/settings.gradle
index 4505e79..2fff537 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -28,10 +28,15 @@
     settings.include(name)
 
     def file
-    if (filePath instanceof String) {
-        file = new File(rootDir, filePath)
+    if (filePath != null) {
+        if (filePath instanceof String) {
+            file = new File(rootDir, filePath)
+        } else {
+            file = filePath
+        }
+        project(name).projectDir = file
     } else {
-        file = filePath
+        file = project(name).projectDir
     }
     if (!file.exists()) {
         // This option is supported so that development/simplify_build_failure.sh can try
@@ -40,9 +45,11 @@
             throw new Exception("Path " + file + " does not exist; cannot include project " + name)
         }
     }
-    project(name).projectDir = file
 }
 
+def includeProject(name) {
+    includeProject(name, null)
+}
 
 /////////////////////////////
 //
@@ -83,7 +90,7 @@
 includeProject(":benchmark:integration-tests:startup-benchmark", "benchmark/integration-tests/startup-benchmark")
 includeProject(":biometric:biometric", "biometric/biometric")
 includeProject(":browser:browser", "browser/browser")
-includeProject(":buildSrc-tests", "buildSrc-tests")
+includeProject(":buildSrc-tests")
 includeProject(":camera:camera-camera2", "camera/camera-camera2")
 includeProject(":camera:camera-core", "camera/camera-core")
 includeProject(":camera:camera-extensions", "camera/camera-extensions")
@@ -408,4 +415,4 @@
 //
 /////////////////////////////
 
-apply from: new File('buildSrc/remoteBuildCache.gradle')
\ No newline at end of file
+apply from: new File('buildSrc/remoteBuildCache.gradle')