-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.gradle.kts
More file actions
34 lines (28 loc) · 995 Bytes
/
Copy pathsettings.gradle.kts
File metadata and controls
34 lines (28 loc) · 995 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
}
rootProject.name = "CloudstreamPlugins"
// This file dynamically includes all plugin projects in the repository.
// To exclude a plugin from compilation (e.g. if it's broken or unfinished),
// do NOT edit this file. Instead, open the plugin's `build.gradle.kts` and set `status = 0`.
File(rootDir, ".").eachDir { dir ->
val buildFile = File(dir, "build.gradle.kts")
if (buildFile.exists()) {
val content = buildFile.readText()
// Automatically exclude the plugin if status = 0 is found in its build script
val isInactive = content.contains("status\\s*=\\s*0".toRegex())
if (!isInactive) {
include(dir.name)
}
}
}
fun File.eachDir(block: (File) -> Unit) {
listFiles()?.filter { it.isDirectory }?.forEach { block(it) }
}