-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
87 lines (77 loc) · 2.38 KB
/
build.gradle.kts
File metadata and controls
87 lines (77 loc) · 2.38 KB
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
81
82
83
84
85
86
87
import org.jetbrains.kotlin.gradle.internal.ensureParentDirsCreated
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import kotlin.io.path.createFile
import kotlin.io.path.notExists
import kotlin.io.path.writeText
plugins {
java
alias(libs.plugins.kotlin.jvm) apply false
alias(libs.plugins.dependencyversions)
alias(libs.plugins.version.catalog.update)
alias(miaConventions.plugins.mia.docs)
}
subprojects {
repositories {
mavenCentral()
maven("https://repo.mineinabyss.com/releases")
maven("https://repo.mineinabyss.com/snapshots")
mavenLocal()
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.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()
maven("https://repo.mineinabyss.com/releases")
maven("https://repo.mineinabyss.com/snapshots")
}
tasks {
dependencyUpdates {
rejectVersionIf {
isNonStable(candidate.version)
}
}
register("versionInfo") {
file("build/versions.md").apply { ensureParentDirsCreated() }.toPath()
.also { if (it.notExists()) it.createFile() }
.writeText(
"""
### Built for
| Minecraft | `${libs.versions.minecraft.get().substringBefore("-R")}` |
|-----------|--|
| Kotlin | `${libs.versions.kotlin.get()}` |
| Java | `${libs.versions.java.get()}` |
""".trimIndent()
)
}
}
fun isNonStable(version: String): Boolean {
val unstableKeywords = listOf(
"-beta",
"-rc",
"-alpha",
)
return unstableKeywords.any { version.contains(it, ignoreCase = true) }
}
versionCatalogUpdate {
keep {
keepUnusedVersions = true
}
}
idofront {
docsVersion = "0.0.4"
}