-
-
Notifications
You must be signed in to change notification settings - Fork 198
/
root.gradle.kts
66 lines (63 loc) · 2.61 KB
/
root.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
import at.skyhanni.sharedvariables.ProjectTarget
import com.replaymod.gradle.preprocess.Node
plugins {
id("dev.deftu.gradle.preprocess") version "0.7.1"
id("net.kyori.blossom") version "1.3.2" apply false
id("gg.essential.loom") version "1.6.+" apply false
kotlin("jvm") version "2.0.0" apply false
kotlin("plugin.power-assert") version "2.0.0" apply false
id("com.google.devtools.ksp") version "2.0.0-1.0.24" apply false
id("dev.architectury.architectury-pack200") version "0.1.3"
id("io.gitlab.arturbosch.detekt") version "1.23.7" apply false
}
allprojects {
group = "at.hannibal2.skyhanni"
version = "0.28.Beta.14"
repositories {
mavenCentral()
mavenLocal()
maven("https://maven.minecraftforge.net") {
metadataSources {
artifact() // We love missing POMs
}
}
maven("https://repo.spongepowered.org/maven/") // mixin
maven("https://pkgs.dev.azure.com/djtheredstoner/DevAuth/_packaging/public/maven/v1") // DevAuth
maven("https://jitpack.io") {
// NotEnoughUpdates (compiled against)
content {
includeGroupByRegex("(com|io)\\.github\\..*")
}
}
maven("https://repo.nea.moe/releases") // libautoupdate
maven("https://maven.notenoughupdates.org/releases") // NotEnoughUpdates (dev env)
maven("https://repo.hypixel.net/repository/Hypixel/") // mod-api
maven("https://maven.teamresourceful.com/repository/thatgravyboat/") // DiscordIPC
}
}
preprocess {
val nodes = mutableMapOf<ProjectTarget, Node>()
ProjectTarget.activeVersions().forEach { target ->
nodes[target] = createNode(target.projectName, target.minecraftVersion.versionNumber, target.mappingStyle.identifier)
val p = project(target.projectPath)
if (target.isForge) {
p.extra.set("loom.platform", "forge")
}
}
ProjectTarget.activeVersions().forEach { child ->
val parent = child.linkTo ?: return@forEach
val pNode = nodes[parent]
if (pNode == null) {
println("Parent target to ${child.projectName} not available in this multi version stage. Not setting parent.")
return@forEach
}
val mappingFile = file("versions/mapping-${parent.projectName}-${child.projectName}.txt")
if (mappingFile.exists()) {
pNode.link(nodes[child]!!, mappingFile)
println("Loading mappings from $mappingFile")
} else {
pNode.link(nodes[child]!!)
println("Skipped loading mappings from $mappingFile")
}
}
}