-
Notifications
You must be signed in to change notification settings - Fork 36
/
build-neoforge.gradle
82 lines (68 loc) · 1.82 KB
/
build-neoforge.gradle
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
plugins {
id 'java-library'
id 'eclipse'
id 'idea'
id 'maven-publish'
id 'net.neoforged.gradle.userdev' version '7.0.145'
}
version = project.modVersion
group = "yalter.mousetweaks"
base {
archivesName = "MouseTweaks-neoforge-mc${project.neoMcVersion}"
}
java.toolchain.languageVersion = JavaLanguageVersion.of(project.modJavaVersion)
sourceSets {
main {
java {
exclude 'yalter/mousetweaks/fabric'
exclude 'yalter/mousetweaks/ModMenuApiImpl.java'
exclude 'yalter/mousetweaks/forge'
}
resources {
exclude 'fabric.mod.json'
exclude 'META-INF/mods.toml'
}
}
}
processResources {
inputs.property "version", project.modVersion
filesMatching("META-INF/neoforge.mods.toml") {
expand([
"version": project.modVersion,
"neoLoaderVersion": project.neoLoaderVersion,
"modCredits": project.modCredits,
"modDescription": project.modDescription,
])
}
}
runs {
configureEach {
systemProperty 'forge.logging.markers', 'REGISTRIES'
systemProperty 'forge.logging.console.level', 'debug'
modSource project.sourceSets.main
}
client {
systemProperty 'forge.enabledGameTestNamespaces', "mousetweaks"
}
server {
systemProperty 'forge.enabledGameTestNamespaces', "mousetweaks"
programArgument '--nogui'
}
}
dependencies {
implementation "net.neoforged:neoforge:${project.neoVersion}"
}
task srcJar(type: Jar) {
archiveClassifier.set("src")
from sourceSets.main.allJava
}
task apiJar(type: Jar) {
archiveClassifier.set("api")
from(sourceSets.main.output) {
include 'yalter/mousetweaks/api/**'
}
}
artifacts {
archives srcJar
archives apiJar
}