-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
122 lines (99 loc) · 2.52 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
val sarVersion: String by properties
val minecraftVersion: String by properties
val yarnVersion: String by properties
val fabricLoaderVersion: String by properties
val javaVersion: String by properties
val fabricApiVersion: String by properties
val divineInterventionVersion: String by properties
plugins {
id("fabric-loom") version "0.12-SNAPSHOT"
`maven-publish`
}
group = "net.immortaldevs"
version = sarVersion
repositories {
maven {
name = "Jitpack"
url = uri("https://jitpack.io")
}
}
sourceSets {
create("testmod") {
compileClasspath += main.get().compileClasspath
runtimeClasspath += main.get().runtimeClasspath
}
}
dependencies {
minecraft(
group = "com.mojang",
name = "minecraft",
version = minecraftVersion,
)
mappings(
group = "net.fabricmc",
name = "yarn",
version = yarnVersion,
classifier = "v2",
)
modImplementation(
group = "net.fabricmc",
name = "fabric-loader",
version = fabricLoaderVersion,
)
modImplementation(
group = "net.fabricmc.fabric-api",
name = "fabric-api",
version = fabricApiVersion,
)
modImplementation(
group = "com.github.devs-immortal",
name = "Divine-Intervention",
version = divineInterventionVersion,
).also(::annotationProcessor)
"testmodImplementation"(sourceSets.main.get().output)
}
tasks {
processResources {
inputs.property("version", sarVersion)
filesMatching("fabric.mod.json") {
expand("version" to sarVersion)
}
}
test {
dependsOn("runGametest")
}
}
java {
sourceCompatibility = JavaVersion.toVersion(javaVersion)
withSourcesJar()
}
@Suppress("UnstableApiUsage")
loom {
splitEnvironmentSourceSets()
mods {
create("sar") {
sourceSet(sourceSets.main.get())
sourceSet(sourceSets["client"])
}
register("sar_test") {
sourceSet(sourceSets["testmod"])
}
}
runs {
create("gametest") {
server()
configName = "Gametest"
vmArgs.add("-Dfabric-api.gametest")
runDir = "build/gametest"
setSource(sourceSets["testmod"])
}
}
accessWidenerPath.set(file("src/main/resources/sar.accesswidener"))
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
}
}
}