[GH] Move playground projects into a separate folder
This PR updates the GitHub setup to position playground projects outside the main project structure.
This is done for 2 reasons:
* Running `gw` (gradle shortcut that finds the closest gradlew) would match the playground gradlew even when the developer is not using playground
* Android studio would pick the playground settings.gradle file when running jvm tests from studio's gutter icon. This caused a lot of confusion for developers as it might run with different dependencies, confuse studio etc.
This updates moves them into playground-projects folder, also names each one as `projectName-playground` to further avoid any confusion with the parent project (e.g. :room gets included automatically when :room-common is included, we don't want it to conflict with the playground root project).
I updated the workflow files to use the new setup (PR will fail on target since it will use the old workflow file)
I've also added an empty playground project to run ktlint on CI so that it doesn't get affected by other projects.
Bug: n/a
Test: CI
This is an imported pull request from https://github.com/androidx/androidx/pull/624.
Resolves #624
Github-Pr-Head-Sha: ebfcbba1a0fa94306eb6fb4803097dc527554e3d
GitOrigin-RevId: c1db28e996eabad2396ee431c6e95afef234ca22
Change-Id: I6c2176678187dc5f043cdb4391496ee372834c7f
diff --git a/playground-projects/fragment-playground/settings.gradle b/playground-projects/fragment-playground/settings.gradle
new file mode 100644
index 0000000..bf5e622
--- /dev/null
+++ b/playground-projects/fragment-playground/settings.gradle
@@ -0,0 +1,33 @@
+/*
+ * 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
+pluginManagement {
+ apply from: "../../playground-common/configure-plugin-management.gradle", to: it
+}
+plugins {
+ id "playground"
+}
+
+rootProject.name = "fragment-playground"
+
+playground {
+ setupPlayground("../..")
+ selectProjectsFromAndroidX({ name ->
+ if (name.startsWith(":fragment")) return true
+ return false
+ })
+}