-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle
194 lines (164 loc) · 5.28 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
189
190
191
192
193
194
plugins {
id 'java-library'
id 'maven-publish'
id 'net.neoforged.moddev' version '2.0.9-beta'
}
version = "0.16.3-alpha"
group = "dev.gigaherz.elementsofpower"
var minecraftVersionResolver = project.neoForge.version.map { "1." + (it =~ /^(\d+(?:\.[1-9]\d*|))\./)[0][1] }
base {
archivesName = minecraftVersionResolver.map { "ElementsOfPower-${it}" }
}
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
repositories {
maven {
url "$projectDir/../CommonMaven"
}
maven { // Patchouli + JEI
// location of the maven that hosts JEI files since January 2023
name = "Jared's maven"
url = "https://maven.blamejared.com/"
}
maven {
name "gigaherz's things"
url 'https://dogforce-games.com/maven'
}
maven {
name = "thiakil"
url = "https://maven.thiakil.com/"
}
maven {
url = "https://maven.theillusivec4.top/"
}
maven {
name 'LDTTeam for Aequivaleo'
url 'https://ldtteam.jfrog.io/ldtteam/modding'
}
maven { // TOP
name 'tterrag maven'
url "https://maven.tterrag.com/"
}
maven {
name = "OctoStudios"
url = uri("https://maven.octo-studios.com/releases")
}
flatDir {
dirs 'debugmods'
}
mavenLocal()
}
sourceSets {
main.resources.srcDirs += 'src/main/generated_resources'
}
neoForge {
version = "21.1.47"
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()
}
clientNoCache {
client()
systemProperty 'elementsOfPower.disableCaches', 'true'
}
server {
server()
}
data {
data()
programArguments.addAll '--mod', 'elementsofpower', '--all', '--output', file('src/main/generated_resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()
}
}
mods {
thismod {
sourceSet(sourceSets.main)
}
}
parchment {
minecraftVersion = "1.21"
mappingsVersion = "2024.07.28"
}
}
dependencies {
//compileOnly fg.deobf("mezz.jei:jei-1.20.1-common-api:15.2.0.22")
//runtimeOnly fg.deobf("mezz.jei:jei-1.20.1-common:15.2.0.22")
//compileOnly fg.deobf("mezz.jei:jei-1.20.1-forge-api:15.2.0.22")
//runtimeOnly fg.deobf("mezz.jei:jei-1.20.1-forge:15.2.0.22")
// https://www.curseforge.com/minecraft/mc-mods/curios/files/4921744
compileOnly "top.theillusivec4.curios:curios-neoforge:9.0.5+1.21"
runtimeOnly "top.theillusivec4.curios:curios-neoforge:9.0.5+1.21"
//compileOnly "com.ldtteam:aequivaleo:1.20.4-0.1.137-ALPHA:api"
//runtimeOnly "com.ldtteam:aequivaleo:1.20.4-0.1.137-ALPHA"
//runtimeOnly fg.deobf("mcjty.theoneprobe:TheOneProbe-1.16:1.16-3.1.4-22")
//implementation fg.deobf("dev.gigaherz.guidebook:Guidebook-1.20.1:3.8.0")
//runtimeOnly fg.deobf("vazkii.patchouli:Patchouli:1.16.2-47")
//runtimeOnly fg.deobf("deps:Botania-1.16.3:409")
//runtimeOnly "deps:trenzalore-neo:4.0.1+mc1.20.4"
//runtimeOnly "deps:jamd-neo:4.2.2+mc1.20.4"
//runtimeOnly "deps:architectury:11.1.13-neoforge"
//runtimeOnly "deps:ToolKit-neoforge:84.0.1"
}
jar {
from('/') {
include 'LICENSE.txt'
}
manifest {
attributes([
"Specification-Title": "elementsofpower",
"Specification-Vendor": "gigaherz",
"Specification-Version": "1", // We are version 1 of ourselves
"Implementation-Title": project.name,
"Implementation-Version": project.version,
"Implementation-Vendor" :"gigaherz",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}
tasks.withType(GenerateModuleMetadata) {
enabled = false
}
project.afterEvaluate {
publish.dependsOn('reobfJar')
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
}
}