-
Notifications
You must be signed in to change notification settings - Fork 15
/
build.gradle.kts
134 lines (114 loc) · 3.65 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
128
129
130
131
132
133
134
plugins {
java
idea
id("net.neoforged.moddev") version "1.0.14" // https://projects.neoforged.net/neoforged/ModDevGradle
id("maven-publish")
}
val minecraftVersion: String by project
val neoforgeVersion: String by project
val modId: String by project
val version: String by project
val resourcefulLibVersion: String by project
val resourcefulConfigVersion: String by project
val geckolibVersion: String by project
val mekanismVersion: String by project
base {
archivesName.set("$modId-neoforge-$minecraftVersion")
}
repositories {
mavenLocal()
maven("https://maven.teamresourceful.com/repository/maven-public/")
}
dependencies {
implementation("com.teamresourceful.resourcefullib:resourcefullib-neoforge-$minecraftVersion:$resourcefulLibVersion")
implementation("com.teamresourceful.resourcefulconfig:resourcefulconfig-neoforge-$minecraftVersion:$resourcefulConfigVersion")
implementation("software.bernie.geckolib:geckolib-neoforge-$minecraftVersion:$geckolibVersion")
implementation("mekanism:Mekanism:$minecraftVersion-$mekanismVersion")
implementation("mekanism:Mekanism:$minecraftVersion-$mekanismVersion:additions")
}
neoForge {
version = neoforgeVersion
validateAccessTransformers = true
runs {
register("client") {
client()
}
register("server") {
server()
}
register("data") {
data()
programArguments.addAll(
"--mod", modId,
"--all",
"--output", file("src/generated/resources/").absolutePath,
"--existing", file("src/main/resources/").absolutePath
)
}
}
mods.register(modId) {
sourceSet(sourceSets.main.get())
}
}
sourceSets.main.get().resources.srcDir("src/generated/resources")
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
withSourcesJar()
}
idea {
module {
excludeDirs.add(file("run"))
}
}
tasks {
withType<JavaCompile> {
options.encoding = "UTF-8"
}
processResources {
exclude(".cache")
val properties = mapOf(
"minecraftVersion" to minecraftVersion,
"neoforgeVersion" to neoforgeVersion.split(".")[0],
"version" to version,
"modId" to modId,
"resourcefulLibVersion" to resourcefulLibVersion,
"resourcefulConfigVersion" to resourcefulConfigVersion,
"geckolibVersion" to geckolibVersion
)
inputs.properties(properties)
filesMatching("META-INF/neoforge.mods.toml") {
expand(properties)
}
}
}
publishing {
publications {
create<MavenPublication>("maven") {
artifactId = "$modId-neoforge-$minecraftVersion"
from(components["java"])
pom {
name.set("Enderman Overhaul NeoForge")
url.set("https://github.com/bonsaistudi0s/$modId")
scm {
connection.set("git:https://github.com/bonsaistudi0s/$modId.git")
developerConnection.set("git:https://github.com/bonsaistudi0s/$modId.git")
url.set("https://github.com/bonsaistudi0s/$modId")
}
licenses {
license {
name.set("ARR")
}
}
}
}
}
repositories {
maven {
setUrl("https://maven.teamresourceful.com/repository/alexnijjar/")
credentials {
username = System.getenv("MAVEN_USER")
password = System.getenv("MAVEN_PASS")
}
}
}
}