-
-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathbuild.gradle
More file actions
108 lines (95 loc) · 2.93 KB
/
build.gradle
File metadata and controls
108 lines (95 loc) · 2.93 KB
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
plugins {
id "java-library"
id "idea"
id "maven-publish"
id "net.neoforged.gradle.userdev" version "7.0.182"
}
version = "${project.mc_version}-${project.mod_version}"
group = "com.teamabnormals"
base {
archivesName = project.mod_id
}
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
minecraft.accessTransformers.file rootProject.file("src/main/resources/META-INF/accesstransformer.cfg")
runs {
configureEach {
systemProperty "forge.logging.markers", "REGISTRIES"
systemProperty "forge.logging.console.level", "debug"
}
client {
modSources {
add project.sourceSets.main
}
}
server {
modSources {
add project.sourceSets.main
}
}
data {
modSources {
add project.sourceSets.main
}
arguments.addAll "--mod", project.mod_id, "--all", "--output", file("src/generated/resources/").getAbsolutePath(), "--existing", file("src/main/resources/").getAbsolutePath(), "--existing-mod", "blueprint"
}
}
sourceSets.main.resources {
srcDir "src/generated/resources"
}
dependencies {
implementation "net.neoforged:neoforge:${project.neoforge}"
implementation("com.teamabnormals:blueprint:${project.mc_version}-${project.blueprint}")
compileOnly("mezz.jei:jei-${project.mc_version}-neoforge-api:${project.jei}")
runtimeOnly("mezz.jei:jei-${project.mc_version}-neoforge:${project.jei}")
}
subsystems {
parchment {
minecraftVersion = "${project.mc_version}"
mappingsVersion = "${project.parchment}"
}
}
repositories {
maven { url "https://maven.teamabnormals.com/" }
maven { url = "https://maven.blamejared.com/" }
maven { url = "https://modmaven.dev" }
}
tasks.withType(ProcessResources).configureEach {
var replaceProperties = [mod_version: mod_version, mc_version: mc_version, neoforge: neoforge, blueprint: blueprint]
inputs.properties replaceProperties
filesMatching(["META-INF/neoforge.mods.toml"]) {
expand replaceProperties
}
}
tasks.named("jar", Jar).configure {
manifest {
attributes([
"Specification-Title" : project.mod_name,
"Specification-Vendor" : "Team Abnormals",
"Specification-Version" : "1",
"Implementation-Title" : project.mod_name,
"Implementation-Version" : project.mod_version,
"Implementation-Vendor" : "Team Abnormals",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}
publishing {
publications {
maven(MavenPublication) {
artifact jar
}
}
repositories {
maven {
name = "abnormals"
url = "https://maven.teamabnormals.com"
credentials(PasswordCredentials)
}
}
}
idea {
module {
downloadSources = true
downloadJavadoc = true
}
}