forked from fastluca/JRis
-
Notifications
You must be signed in to change notification settings - Fork 1
/
settings.gradle.kts
55 lines (44 loc) · 1.49 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
@file:Suppress("UnstableApiUsage")
import org.ajoberstar.reckon.gradle.ReckonExtension
pluginManagement {
repositories {
gradlePluginPortal()
}
}
plugins {
id("org.ajoberstar.reckon.settings") version "0.18.3"
id("org.gradle.toolchains.foojay-resolver-convention") version ("0.8.0")
}
configure<ReckonExtension> {
setDefaultInferredScope("patch")
stages("beta", "rc", "final")
setScopeCalc(calcScopeFromProp().or(calcScopeFromCommitMessages()))
setStageCalc(calcStageFromProp())
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
}
}
rootProject.name = "KRis"
fun includeProject(projectDirName: String, projectName: String) {
val baseDir = File(settingsDir, projectDirName)
val projectDir = File(baseDir, projectName)
val buildFileName = "${projectName}.gradle.kts"
assert(projectDir.isDirectory)
assert(File(projectDir, buildFileName).isFile)
include(projectName)
project(":$projectName").projectDir = projectDir
project(":$projectName").buildFileName = buildFileName
}
listOf("docs", "subprojects").forEach { containerDir ->
File(rootDir, containerDir)
.walkTopDown().maxDepth(1)
.forEach { projectDir ->
val buildFile = File(projectDir, "${projectDir.name}.gradle.kts")
if (buildFile.exists())
includeProject(containerDir, projectDir.name)
}
}
includeBuild("gradle-plugins")