-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild.gradle.kts
80 lines (69 loc) · 2.03 KB
/
build.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
java
alias(libs.plugins.kotlin.jvm) apply false
id("com.mineinabyss.conventions.autoversion")
alias(libs.plugins.dependencyversions)
alias(libs.plugins.version.catalog.update)
}
subprojects {
repositories {
mavenCentral()
maven("https://repo.mineinabyss.com/releases")
maven("https://repo.mineinabyss.com/snapshots")
maven("https://erethon.de/repo/")
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://repo.spaceio.xyz/repository/maven-snapshots/")
maven("https://jitpack.io")
maven("https://mvn.lumine.io/repository/maven-public/") { metadataSources { artifact() } }// MythicMobs
maven("https://repo.unnamed.team/repository/unnamed-public/")
maven("https://repo.nexomc.com/releases")
maven("https://repo.nexomc.com/snapshots")
}
tasks {
withType<KotlinCompile> {
compilerOptions {
freeCompilerArgs = listOf(
"-opt-in=kotlin.RequiresOptIn",
"-opt-in=kotlinx.serialization.ExperimentalSerializationApi",
)
}
}
}
}
repositories {
mavenCentral()
}
tasks {
register("publish") {
dependsOn(gradle.includedBuilds.map { it.task(":publish") })
}
register("publishToMavenLocal") {
dependsOn(gradle.includedBuilds.map { it.task(":publishToMavenLocal") })
}
build {
dependsOn(gradle.includedBuilds.map { it.task(":build") })
}
}
fun isNonStable(version: String): Boolean {
val unstableKeywords = listOf(
"-beta",
"-rc",
"-alpha",
)
return unstableKeywords.any { version.contains(it, ignoreCase = true) }
}
versionCatalogUpdate {
keep {
keepUnusedPlugins = true
keepUnusedVersions = true
keepUnusedLibraries = true
}
}
tasks {
dependencyUpdates {
rejectVersionIf {
isNonStable(candidate.version)
}
}
}