forked from TeamAmeriFrance/Guide-API
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
81 lines (67 loc) · 2.55 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 'net.neoforged.gradle.userdev' version '7.0.109'
id 'com.matthewprenger.cursegradle' version '1.4.0'
id "com.modrinth.minotaur" version "2.4.5"
id 'de.undercouch.download' version '3.3.0'
id 'idea'
id 'eclipse'
id "me.modmuss50.mod-publish-plugin" version "0.4.2"
}
group = mod_group_id
version = mod_version
base {
archivesName = mod_name
}
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
apply from: 'gradle/forge.gradle'
apply from: 'gradle/versioning.gradle'
apply from: 'gradle/artifacts.gradle'
apply from: 'gradle/deploy.gradle'
idea {
module {
for (String excludeDirName in ["run", "out", "logs", "runs"]) {
File excludeDir = new File(projectDir, excludeDirName)
excludeDirs.add(excludeDir)
}
downloadSources = true
}
}
tasks.named('processResources', ProcessResources).configure {
var replaceProperties = [
minecraft_version: minecraft_version, minecraft_version_range: minecraft_version_range,
forge_version: forge_version, forge_version_range: forge_version_range,
loader_version_range: loader_version_range,
mod_id: mod_id, mod_name: mod_name, mod_license: mod_license, mod_version: mod_version,
mod_authors: mod_authors, mod_description: mod_description,
mod_url: mod_url,
mod_issue_tracker: mod_issue_tracker,
pack_format_number: pack_format_number,
]
inputs.properties replaceProperties
filesMatching(['META-INF/neoforge.mods.toml', 'pack.mcmeta']) {
expand replaceProperties + [project: project]
}
}
tasks.named('jar', Jar).configure {
from sourceSets.main.output.classesDirs
from sourceSets.main.output.resourcesDir
exclude 'de/maxanier/guideapi/test/**/*'
manifest {
attributes([
'Specification-Title' : mod_id,
'Specification-Vendor' : mod_authors,
'Specification-Version' : '1', // We are version 1 of ourselves
'Implementation-Title' : project.name,
'Implementation-Version' : project.jar.archiveVersion,
'Implementation-Vendor' : mod_authors,
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"FMLAT" : "accesstransformer.cfg",
])
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}
configurations.configureEach {
print(it.name + "\n")
}