Infra to add sub-project settings.gradle files

This CL adds a `playground-common` functionality that allows
creating additional settings.gradle files inside AndroidX
that can be run independently.

The major functionality is under `playground-common` and each
project only needs to declare a settings.gradle file + symlink
a bunch of files from playground-common (see playground-common/README.md
for details).

As we use project dependencies for tests, it has a cascading
effect to include many unrelated projects to make these settings
files work. To workaround it, I've added a `projectOrArtifact`
method that will resolve to the project if it exists or else
declare a dependency on the latest artifact.

To make sure we don't download an additional studio for each of
these projects, I've updated the Studio task to let these projects
define an install location so that Playground and Room can re-use
the same studio installation that is used for AndroidX.

Right now only playground & room uses this setup.
It is best not to extend it for now since there is no CI running
these projects so they can break easily.

Bug: 158536544
Test: existing tests for the main AndroidX checkout
Test: ./gradlew tasks projects in room & playground + manual test

Change-Id: I81b75bb5534c47deba753fbd71179b4c799f52a1
diff --git a/room/settings.gradle b/room/settings.gradle
new file mode 100644
index 0000000..37a197fa
--- /dev/null
+++ b/room/settings.gradle
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// see ../playground-common/README.md for details on how this works
+rootProject.name = "room-playground"
+apply from: "../playground-common/playground-include-settings.gradle"
+setupPlayground(this, "..")
+selectProjectsFromAndroidX({ name ->
+    if (name.startsWith(":room")) return true
+    if (name.startsWith(":sqlite") && !name.contains("inspection")) return true
+    return false
+})