-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.gradle.kts
41 lines (33 loc) · 1.26 KB
/
settings.gradle.kts
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
35
36
37
38
39
40
41
@file:Suppress("UnstableApiUsage")
import java.nio.file.Files
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
}
dependencyResolutionManagement {
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/") { name = "PaperMC" }
maven("https://repo.activmine.ru/public") { name = "ActivMine" }
}
}
rootProject.name = "crystal"
library("paper")
library("shared")
fun library(library: String) {
include(library)
val libraryProject = project(":$library")
libraryProject.projectDir = file("library/$library")
rootProject.projectDir.toPath().resolve("library/$library/").toFile().listFiles()?.forEach {
// Is the module disabled?
if (it.isDirectory
&& it.name != "src" // Ignore sources
&& it.name != "build" // Ignore build artifacts
&& !it.name.startsWith(".") // Ignore anything hidden on unix-like OSes
) {
// Libraries can be disabled by adding a file named DISABLE at the root of its directory
if (Files.exists(it.toPath().resolve("build.gradle.kts")) && Files.notExists(it.toPath().resolve("DISABLE"))) {
include("$library:${it.name}")
}
}
}
}