-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathbuild.gradle
188 lines (159 loc) · 4.98 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
plugins {
id 'java-library'
id 'eclipse'
id 'idea'
id 'maven-publish'
id 'net.neoforged.moddev' version '2.0.63-beta'
}
version = "2.4.0"
group = "dev.gigaherz.toolbelt"
var minecraftVersionResolver = project.neoForge.version.map { "1." + (it =~ /^(\d+(?:\.[1-9]\d*|))\./)[0][1] }
base {
archivesName = minecraftVersionResolver.map { "ToolBelt-${it}" }
}
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
java.withSourcesJar()
sourceSets {
main.resources.srcDirs += 'src/main/generated_resources'
}
repositories {
maven {
// location of the maven that hosts JEI files since January 2023
name = "Jared's maven"
url = "https://maven.blamejared.com/"
}
maven {
name = "Tterrag maven"
url "https://maven.tterrag.com/"
}
maven { // CURIOS
name = "C4 maven"
url "https://maven.theillusivec4.top/"
}
maven {
name = "Dogforce Games maven"
url 'https://www.dogforce-games.com/maven/'
}
maven {
name = "Cursemaven"
url "https://cursemaven.com"
content {
includeGroup "curse.maven"
}
}
maven {
// Accessories
name = "Wispforest maven"
url 'https://maven.wispforest.io/releases'
}
//maven { url 'https://maven.su5ed.dev/releases' }
//maven { url 'https://maven.fabricmc.net' }
maven { url 'https://maven.shedaniel.me/' }
maven {
url "$projectDir/../CommonMaven"
}
mavenLocal()
}
neoForge {
version = "21.4.47-beta"
runs {
// applies to all the run configs below
configureEach {
gameDirectory = project.file('run')
logLevel = org.slf4j.event.Level.DEBUG
//jvmArgument "-Dmixin.debug.export=true"
//jvmArgument "-Dmixin.debug.verbose=true"
}
client {
client()
}
client2 {
client()
programArguments.addAll '--username', 'Dev2'
}
server {
server()
}
clientData {
clientData()
programArguments.addAll '--mod', 'toolbelt', '--all', '--output', file('src/main/generated_resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()
}
}
mods {
thismod {
sourceSet(sourceSets.main)
}
}
parchment {
minecraftVersion = "1.21.4"
mappingsVersion = "2024.12.29"
}
}
dependencies {
compileOnly "dev.gigaherz.sewingkit:SewingKit-1.21.4:2.2.1"
runtimeOnly "dev.gigaherz.sewingkit:SewingKit-1.21.4:2.2.1"
//compileOnly "mezz.jei:jei-1.21-common-api:19.5.0.56"
//runtimeOnly "mezz.jei:jei-1.21-common:19.5.0.56"
//compileOnly "mezz.jei:jei-1.21-neoforge-api:19.5.0.56"
//runtimeOnly "mezz.jei:jei-1.21-neoforge:19.5.0.56"
//implementation("io.wispforest:accessories-neoforge:1.0.0-beta.9+1.21")
//compileOnly "top.theillusivec4.curios:curios-neoforge:8.0.0-beta.4+1.20.6"
//runtimeOnly "top.theillusivec4.curios:curios-neoforge:8.0.0-beta.4+1.20.6"
//runtimeOnly fg.deobf("curse.maven:corail-tombstone-243707:3836552")
}
jar {
from(files('LICENSE.txt'))
manifest {
attributes([
"Specification-Title": "toolbelt",
"Specification-Vendor": "gigaherz",
"Specification-Version": "1", // We are version 1 of ourselves
"Implementation-Title": "toolbelt",
"Implementation-Version": project.version,
"Implementation-Vendor" :"gigaherz",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}
tasks.named('sourcesJar') {
from(files('LICENSE.txt'))
}
project.afterEvaluate {
publish.dependsOn('build')
publishing {
publications {
mavenJava(MavenPublication) {
artifactId project.archivesBaseName
from components.java
}
}
repositories {
if (findProperty("RELEASE") && System.env.giga_maven_host != null) {
System.out.println("Remote publish enabled on " + System.env.giga_maven_host)
maven {
url System.env.giga_maven_host
credentials {
username System.env.giga_maven_user
password System.env.giga_maven_password
}
}
}
else {
System.out.println("Remote publish disabled.")
maven {
url "$projectDir/../CommonMaven"
}
}
}
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}
// IDEA no longer automatically downloads sources/javadoc jars for dependencies, so we need to explicitly enable the behavior.
idea {
module {
downloadSources = true
downloadJavadoc = true
}
}