forked from Domochevsky/minecraft-quiverbow
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
111 lines (98 loc) · 3.65 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
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
109
110
111
plugins {
id 'maven-publish'
id 'net.minecraftforge.gradle' version '5.1.+'
id 'org.parchmentmc.librarian.forgegradle' version '1.+'
// See hack in settings.gradle for why this works
id 'org.spongepowered.mixin' version '0.7.+'
id 'eclipse'
}
version = "${project.modVersion}+MC${project.minecraftVersion}"
group = 'com.domochevsky.quiverbow' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'QuiverBowRestrung'
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}"
minecraft {
mappings channel: 'parchment', version: "${project.parchmentVersion}-${project.minecraftVersion}"
runs {
client {
taskName "$archivesBaseName Client"
workingDirectory project.file('run')
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
property 'forge.enabledGameTestNamespaces', 'quiverbow_restrung'
mods {
quiverbowRestrung {
source sourceSets.main
}
}
}
server {
taskName "$archivesBaseName Server"
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
property 'forge.enabledGameTestNamespaces', 'quiverbow_restrung'
mods {
quiverbowRestrung {
source sourceSets.main
}
}
}
}
}
mixin {
add sourceSets.main, 'mixins.quiverbow_restrung.refmap.json'
config 'quiverbow_restrung.client.mixins.json'
}
// Include resources generated by data generators.
sourceSets.main.resources {
srcDir 'src/generated/resources'
}
repositories
{
maven
{
name 'JEI'
url 'https://dvs1.progwml6.com/files/maven'
}
maven
{
name 'Patchouli'
url 'https://maven.blamejared.com/'
}
}
dependencies
{
minecraft "net.minecraftforge:forge:${project.minecraftVersion}-${project.forgeVersion}"
// compile against the JEI API but do not include it at runtime
compileOnly fg.deobf("mezz.jei:jei-${minecraftVersion}-common-api:${jeiVersion}")
compileOnly fg.deobf("mezz.jei:jei-${minecraftVersion}-forge-api:${jeiVersion}")
// at runtime, use the full JEI jar for Forge
runtimeOnly fg.deobf("mezz.jei:jei-${minecraftVersion}-forge:${jeiVersion}")
compileOnly fg.deobf("vazkii.patchouli:Patchouli:${project.patchouliVersion}:api")
runtimeOnly fg.deobf("vazkii.patchouli:Patchouli:${project.patchouliVersion}")
// Apply Mixin annotation processor
annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'
}
jar {
//Include project license
from('LICENSE') {
rename { "${it}_${project.archivesBaseName}"}
}
manifest {
attributes([
"Specification-Title": "QuiverBow: Restrung",
"Specification-Vendor": "QuiverBow: Restrung",
"Specification-Version": "1", // We are version 1 of ourselves
"Implementation-Title": project.name,
"Implementation-Version": "${version}",
"Implementation-Vendor": "quiverbow_restrung",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}
jar.finalizedBy('reobfJar')
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}