From f25a4051081743967019eb4fa131feaa28f177ad Mon Sep 17 00:00:00 2001 From: Red <25087116+AbdullahM0hamed@users.noreply.github.com> Date: Tue, 16 Aug 2022 16:18:12 +0200 Subject: [PATCH 1/2] A slight convenience Co-authored-by: Cloudburst <18114966+C10udburst@users.noreply.github.com> --- settings.gradle.kts | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/settings.gradle.kts b/settings.gradle.kts index 43f715c..7ba61b2 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -3,7 +3,18 @@ rootProject.name = "CloudstreamPlugins" // This file sets what projects are included. Every time you add a new project, you must add it // to the includes below. -// Plugins are included like this -include( - "ExampleProvider" -) +val disabled = listOf() + +File(rootDir, ".").eachDir { dir -> + if (!disabled.contains(dir.name) && File(dir, "build.gradle.kts").exists()) { + include(dir.name) + } +} + +fun File.eachDir(block: (File) -> Unit) { + listFiles()?.filter { it.isDirectory }?.forEach { block(it) } +} + + +// To only include a single project, comment out the previous lines (except the first one), and include your plugin like so: +// include("PluginName") \ No newline at end of file From 674522b919d7612dc11a714b339d1eccd70ad2eb Mon Sep 17 00:00:00 2001 From: Cloudburst <18114966+C10udburst@users.noreply.github.com> Date: Tue, 16 Aug 2022 16:20:40 +0200 Subject: [PATCH 2/2] Update settings.gradle.kts --- settings.gradle.kts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/settings.gradle.kts b/settings.gradle.kts index 7ba61b2..9252ccd 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,7 +1,6 @@ rootProject.name = "CloudstreamPlugins" -// This file sets what projects are included. Every time you add a new project, you must add it -// to the includes below. +// This file sets what projects are included. All new projects should get automatically included unless specified in "disabled" variable. val disabled = listOf() @@ -17,4 +16,4 @@ fun File.eachDir(block: (File) -> Unit) { // To only include a single project, comment out the previous lines (except the first one), and include your plugin like so: -// include("PluginName") \ No newline at end of file +// include("PluginName")