generated from FabricMC/fabric-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.gradle.kts
127 lines (112 loc) · 3.24 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
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
import java.util.*
plugins {
id("maven-publish")
id("fabric-loom") version "1.7-SNAPSHOT"
}
// Common Mod Properties
val mavenGroup: String by project
// Fabric Properties
val minecraftVersion: String by project
val yarnMappings: String by project
val loaderVersion: String by project
// Common Dependencies
val cobalt: String by project
val tinyParser: String by project
val enhancedReflections: String by project
// Bouquet Dependencies
val nettyHttp: String by project
val placeholderApi: String by project
dependencies {
minecraft("com.mojang", "minecraft", minecraftVersion)
mappings("net.fabricmc", "yarn", yarnMappings, null, "v2")
}
subprojects {
apply(plugin = "maven-publish")
apply(plugin = "fabric-loom")
repositories {
maven("https://maven.hugeblank.dev/releases") {
content {
includeGroup("dev.hugeblank")
}
}
maven("https://squiddev.cc/maven") {
content {
includeGroup("cc.tweaked")
}
}
maven("https://maven.nucleoid.xyz") {
content {
includeGroup("eu.pb4")
}
}
maven("https://basique.top/maven/releases") {
content {
includeGroup("me.basiqueevangelist")
}
}
}
dependencies {
minecraft("com.mojang", "minecraft", minecraftVersion)
mappings("net.fabricmc", "yarn", yarnMappings, null, "v2")
modImplementation("net.fabricmc", "fabric-loader", loaderVersion)
}
tasks {
processResources {
inputs.property("version", project.version)
filesMatching("fabric.mod.json") {
expand(mutableMapOf("version" to project.version))
}
}
jar {
from("LICENSE") {
rename { "${it}_${project.base.archivesName.get()}" }
}
}
loom {
val moduleName = project.name.replaceFirstChar {
if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString()
}
runs {
named("client") {
configName = "$moduleName Client"
ideConfigGenerated(true)
runDir("../run")
programArgs("-username", "GradleDev")
}
named("server") {
configName = "$moduleName Server"
ideConfigGenerated(true)
runDir("../run")
}
}
}
}
publishing {
repositories {
maven {
name = "hugeblankRepo"
url = uri("https://maven.hugeblank.dev/releases")
credentials(PasswordCredentials::class)
authentication {
create<BasicAuthentication>("basic")
}
}
}
}
}
tasks {
register<GradleBuild>("buildAll") {
group = "build"
tasks = subprojects.map { ":${it.name}:build" }
}
loom {
runs {
named("client") {
ideConfigGenerated(false)
}
named("server") {
ideConfigGenerated(false)
}
}
}
}