[GH] Add settings plugin for playground projects and enable Gradle Enterprise
- Moves `playground-include-settings` logic into a settings plugin
- Updates all playground modules to use `playground` plugin instead of `playground-include-settings.gradle`
- Enables Gradle Enterprise for all playground projects
Test: I ran `./gradlew help` from all playground projects, and `./gradlew` assemble from some.
This is an imported pull request from https://github.com/androidx/androidx/pull/264.
Resolves #264
Github-Pr-Head-Sha: 7b01fce5cb2ab2afbc65b38c44347bef0ba7b3b8
GitOrigin-RevId: e054540119f8a990e2274d2253065972940d432e
Change-Id: I2693039f66149b588029dbec49b47639a58f6ca3
diff --git a/fragment/settings.gradle b/fragment/settings.gradle
index 424ef67..8142fa6 100644
--- a/fragment/settings.gradle
+++ b/fragment/settings.gradle
@@ -15,12 +15,21 @@
*/
// see ../playground-common/README.md for details on how this works
+pluginManagement {
+ includeBuild "../playground-common/playground-plugin"
+}
+plugins {
+ id "playground"
+}
+
rootProject.name = "fragment-playground"
-apply from: "../playground-common/playground-include-settings.gradle"
-setupPlayground(this, "..")
-selectProjectsFromAndroidX({ name ->
- if (name.startsWith(":fragment")) return true
- if (name == ":internal-testutils-runtime") return true
- if (name == ":internal-testutils-truth") return true
- return false
-})
+
+playground {
+ setupPlayground("..")
+ selectProjectsFromAndroidX({ name ->
+ if (name.startsWith(":fragment")) return true
+ if (name == ":internal-testutils-runtime") return true
+ if (name == ":internal-testutils-truth") return true
+ return false
+ })
+}