-
Notifications
You must be signed in to change notification settings - Fork 79
/
stonecutter.gradle.kts
110 lines (101 loc) · 2.88 KB
/
stonecutter.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
import org.gradle.kotlin.dsl.support.uppercaseFirstChar
plugins {
`maven-publish`
id("dev.kikugie.stonecutter")
id("dev.architectury.loom") version "1.7.+" apply false
id("architectury-plugin") version "3.4-SNAPSHOT" apply false
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
}
stonecutter active "1.20.1" /* [SC] DO NOT EDIT */
stonecutter.automaticPlatformConstants = true
stonecutter registerChiseled tasks.register("chiseledBuild", stonecutter.chiseled) {
group = "project"
ofTask("buildAndCollect")
}
stonecutter registerChiseled tasks.register("chiseledPublish", stonecutter.chiseled) {
group = "project"
ofTask("publish")
}
for (it in stonecutter.tree.branches) {
if (it.id.isEmpty()) continue
val loader = it.id.upperCaseFirst()
// Builds loader-specific versions into `build/libs/{mod.version}/{loader}`
stonecutter registerChiseled tasks.register("chiseledBuild$loader", stonecutter.chiseled) {
group = "project"
versions { branch, _ -> branch == it.id }
ofTask("buildAndCollect")
}
// Publishes loader-specific versions
stonecutter registerChiseled tasks.register("chiseledPublish$loader", stonecutter.chiseled) {
group = "project"
versions { branch, _ -> branch == it.id }
ofTask("publish")
}
}
// Runs active versions for each loader
for (it in stonecutter.tree.nodes) {
if (it.metadata != stonecutter.current || it.branch.id.isEmpty()) continue
val types = listOf("Client", "Server")
val loader = it.branch.id.uppercaseFirstChar()
for (type in types) it.tasks.register("runActive$type$loader") {
group = "project"
dependsOn("run$type")
}
}
subprojects {
apply(plugin = "maven-publish")
repositories {
mavenCentral()
// mappings
maven("https://maven.parchmentmc.org")
maven("https://maven.quiltmc.org/repository/release")
// our repo
maven("https://maven.realrobotix.me/master/")
//maven("https://maven.shedaniel.me/")
maven("https://maven.blamejared.com/")
maven("https://maven.tterrag.com/")
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = uri("https://api.modrinth.com/maven")
}
}
filter {
includeGroup("maven.modrinth")
}
}
exclusiveContent {
forRepository {
maven {
name = "CurseMaven"
url = uri("https://cursemaven.com")
}
}
filter {
includeGroup("curse.maven")
}
}
flatDir{
dir("libs")
}
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/cannoneers-of-create/createbigcannons")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("GITHUB_ACTOR")
password = project.findProperty("gpr.key") as String? ?: System.getenv("GITHUB_TOKEN")
}
}
maven {
name = "realRobotixMaven"
url = uri("https://maven.realrobotix.me/createbigcannons")
credentials(PasswordCredentials::class)
}
mavenLocal()
}
}
}