clearer error if project filepath does not exist
Bug: 148102969
Test: add nonexistent path in settings.gradle, observe that the error message mentions the nonexistent path
Change-Id: Id1dfb65cb54a62983953b1493afa2b6735802a93
diff --git a/settings.gradle b/settings.gradle
index 3633cb2..f3f0ccc 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -29,10 +29,13 @@
def file
if (filePath instanceof String) {
- file = new File(filePath)
+ file = new File(rootDir, filePath)
} else {
file = filePath
}
+ if (!file.exists()) {
+ throw new Exception("Path " + file + " does not exist; cannot include project " + name)
+ }
project(name).projectDir = file
}