-
Notifications
You must be signed in to change notification settings - Fork 86
/
Copy pathbuild.gradle
137 lines (117 loc) · 3.53 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
129
130
131
132
133
134
135
136
137
plugins {
id 'java-library'
id 'eclipse'
id 'idea'
id 'net.neoforged.moddev' version '2.0.76'
}
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
version = '1.9.12'
group = 'net.geforcemods.securitycraft'
base {
archivesName = 'securitycraft'
}
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
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
}
neoForge {
version = "21.3.58"
validateAccessTransformers = true
runs {
configureEach {
logLevel = org.slf4j.event.Level.DEBUG
ideName = "SC ${project.mc_version} " + ideName.get()
}
client {
client()
gameDirectory = project.file('run/client')
}
client2 {
client()
gameDirectory = project.file('run/client')
programArguments.addAll('--username', 'Dev2')
}
server {
server()
gameDirectory = project.file('run/server')
programArgument('-nogui')
}
data {
data()
gameDirectory = project.file('run/data')
programArguments.addAll('--mod', 'securitycraft', '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath())
}
}
mods {
securitycraft {
sourceSet(sourceSets.main)
}
}
}
repositories {
maven {
url = "https://cursemaven.com/"
content {
includeGroup "curse.maven"
}
}
exclusiveContent {
forRepository {
maven {
url = "https://api.modrinth.com/maven"
}
}
filter {
includeGroup "maven.modrinth"
}
}
}
dependencies {
// implementation "curse.maven:architectury-api-419699:5553800" //ftb teams dependency
// implementation "curse.maven:ftb-library-forge-404465:5557408" //ftb teams dependency
// implementation "curse.maven:ftb-teams-forge-404468:5448371"
// implementation "curse.maven:jei-238222:5567933"
// implementation "curse.maven:the-one-probe-245211:5502323"
implementation "curse.maven:jade-324717:5846076"
implementation "curse.maven:betterf3-401648:5873289"
implementation "curse.maven:cloth-config-348521:5834708" //betterf3 dependency
implementation "curse.maven:wthit-forge-455982:5897178"
implementation "curse.maven:badpackets-615134:5430629" //wthit dependency
// implementation "curse.maven:projecte-226410:3955047"
// implementation "curse.maven:embeddium-908741:5556146"
implementation "maven.modrinth:sodium:mc1.21.3-0.6.5-neoforge" //incompatible with embeddium
}
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
archiveFileName = "[${project.mc_version}] SecurityCraft v${version}.jar"
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"],)
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
options.release = 21
}
idea {
module {
downloadSources = true
downloadJavadoc = true
}
}