-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
100 lines (79 loc) · 2.53 KB
/
build.gradle
File metadata and controls
100 lines (79 loc) · 2.53 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
buildscript {
repositories {
maven { url = 'https://maven.minecraftforge.net' }
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '[6.0,6.2)', changing: true
}
}
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
version = project.mod_version
group = project.mod_group_id
archivesBaseName = project.mod_id
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
minecraft {
mappings channel: project.mapping_channel, version: project.mapping_version
runs {
client {
workingDirectory project.file('run')
property 'forge.logging.console.level', 'info'
mods {
"${project.mod_id}" {
source sourceSets.main
}
}
}
server {
workingDirectory project.file('run')
property 'forge.logging.console.level', 'info'
mods {
"${project.mod_id}" {
source sourceSets.main
}
}
}
data {
workingDirectory project.file('run')
property 'forge.logging.console.level', 'info'
args '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
mods {
"${project.mod_id}" {
source sourceSets.main
}
}
}
}
}
processResources {
filesMatching('META-INF/mods.toml') {
expand 'mod_version': project.mod_version
}
}
sourceSets.main.resources { srcDir 'src/generated/resources' }
dependencies {
minecraft "net.minecraftforge:forge:${project.minecraft_version}-${project.forge_version}"
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.1'
}
test {
useJUnitPlatform()
}
jar {
manifest {
attributes([
"Specification-Title" : project.mod_id,
"Specification-Vendor" : project.mod_authors,
"Specification-Version" : project.mod_version,
"Implementation-Title" : project.mod_id,
"Implementation-Version" : project.mod_version,
"Implementation-Vendor" : project.mod_authors,
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}
tasks.withType(JavaCompile).configureEach {
options.compilerArgs << '-Xlint:deprecation'
}
jar.finalizedBy('reobfJar')