forked from Geforce132/SecurityCraft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
128 lines (107 loc) · 3.58 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
plugins {
id 'eclipse'
id 'idea'
id 'net.minecraftforge.gradle' version '[6.0,6.2)'
id 'org.spongepowered.mixin' version '0.7.+'
id 'org.parchmentmc.librarian.forgegradle' version '1.+'
}
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
version = '1.9.8'
group = 'net.geforcemods.securitycraft'
base {
archivesName = 'securitycraft'
}
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'))
processResources {
exclude ".cache"
duplicatesStrategy = 'include'
//minify json resources
doLast {
fileTree(dir: outputs.files.asPath, include: "**/*.json").each {
File file -> file.text = JsonOutput.toJson(new JsonSlurper().parse(file))
}
}
}
sourceSets.main.resources {
srcDir 'src/generated/resources' //include generated files
}
minecraft {
mappings channel: 'parchment', version: '2023.09.03-1.20.1'
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
copyIdeResources = true
runs {
client {
workingDirectory project.file('run/client')
property 'forge.logging.console.level', 'debug'
args '-mixin.config=securitycraft.mixins.json'
mods {
securitycraft {
source sourceSets.main
}
}
}
server {
workingDirectory project.file('run/server')
property 'forge.logging.console.level', 'debug'
args '-nogui', '-mixin.config=securitycraft.mixins.json'
mods {
securitycraft {
source sourceSets.main
}
}
}
data {
workingDirectory project.file('run/data')
property 'forge.logging.console.level', 'debug'
args '--mod', 'securitycraft', '--all', '--output', file('src/generated/resources/')
mods {
securitycraft {
source sourceSets.main
}
}
}
}
}
repositories {
maven {
url "https://cursemaven.com/"
content {
includeGroup "curse.maven"
}
}
}
dependencies {
minecraft 'net.minecraftforge:forge:1.20.1-47.1.3'
annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'
implementation fg.deobf("curse.maven:architectury-api-419699:4581905") //ftb teams dependency
implementation fg.deobf("curse.maven:ftb-library-forge-404465:4596511") //ftb teams dependency
implementation fg.deobf("curse.maven:ftb-teams-forge-404468:4623116")
implementation fg.deobf("curse.maven:jei-238222:4597711")
implementation fg.deobf("curse.maven:the-one-probe-245211:4579432")
implementation fg.deobf("curse.maven:jade-324717:4573193")
implementation fg.deobf("curse.maven:betterf3-401648:4641169")
implementation fg.deobf("curse.maven:cloth-config-348521:4633444") //betterf3 dependency
implementation fg.deobf("curse.maven:wthit-forge-455982:4596739")
implementation fg.deobf("curse.maven:badpackets-615134:4438956") //wthit dependency
// implementation fg.deobf("curse.maven:projecte-226410:3955047")
}
mixin {
add sourceSets.main, "securitycraft.refmap.json"
}
tasks.named('jar', Jar).configure {
exclude('net/geforcemods/securitycraft/datagen/**') //exclude files from the built jar that are only used to generate the assets & data
manifest {
attributes(["Specification-Title": "SecurityCraft",
"Specification-Vendor": "Geforce, bl4ckscor3, Redstone_Dubstep",
"Specification-Version": "${version}",
"Implementation-Title": "SecurityCraft",
"Implementation-Version": "${version}",
"Implementation-Vendor" :"Geforce, bl4ckscor3, Redstone_Dubstep",
"MixinConfigs": "securitycraft.mixins.json"],)
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}