-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
80 lines (65 loc) · 2.4 KB
/
build.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
plugins {
id 'java-library'
id 'eclipse'
id 'idea'
id 'maven-publish'
id 'net.neoforged.gradle.userdev' version '7.0.145'
}
version = project.mc_version + "-" + project.mod_version
group = project.mod_group
repositories {
mavenLocal()
}
base {
archivesName = project.archives_base_name
}
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
runs {
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
//accessTransformer = file('my_at.cfg')
// default run configurations.
// these can be tweaked, removed, or duplicated as needed.
configureEach {
// Recommended logging data for a userdev environment
//property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
// Recommended logging level for the console
//property 'forge.logging.console.level', 'debug'
modSource project.sourceSets.main
}
client {
systemProperty 'forge.enabledGameTesetNamespaces', project.mod_id
}
server {
systemProperty 'forge.enabledGameTesetNamespaces', project.mod_id
programArgument '--nogui'
}
}
dependencies {
implementation "net.neoforged:neoforge:${project.neo_version}"
}
tasks.withType(ProcessResources).configureEach {
var replaceProperties = [
mc_version : mc_version, mc_version_range: mc_version_range,
neo_version : neo_version, neo_version_range: neo_version_range,
loader_version_range: loader_version_range,
mod_id : mod_id, mod_name: mod_name, mod_license: mod_license, mod_version: mod_version
]
inputs.properties replaceProperties
filesMatching(['META-INF/neoforge.mods.toml']) {
expand replaceProperties + [project: project]
}
}
// Example for how to get properties into the manifest for reading by the runtime..
jar {
manifest {
attributes([
"Specification-Title": "badbeacon",
"Specification-Vendor": "Androsa",
"Specification-Version": "1", // We are version 1 of the modlauncher specification
"Implementation-Title": project.name,
"Implementation-Version": project.jar.archiveVersion,
"Implementation-Vendor" :"Androsa",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}