Skip to content

Commit c80dd70

Browse files
committed
Merge branch 'beta' into backend/graph-editor-refactor
# Conflicts: # src/main/java/at/hannibal2/skyhanni/test/graph/GraphEditor.kt
2 parents fec3a24 + 501f994 commit c80dd70

File tree

851 files changed

+16331
-9982
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

851 files changed

+16331
-9982
lines changed

.github/workflows/detekt.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,6 @@ jobs:
142142
repo: context.repo.repo,
143143
body: commentBody
144144
})
145+
146+
- name: Try to fail
147+
run: exit 1

.github/workflows/generate-constants.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
name: Upload generated repo regexes
3939
with:
4040
name: Repo Regexes
41-
path: versions/1.21.5/build/regexes/constants.json
41+
path: versions/1.21.10/build/regexes/constants.json
4242
publish-regexes:
4343
runs-on: ubuntu-latest
4444
needs: regexes

.github/workflows/illegal-imports.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@
55

66
at/hannibal2/skyhanni/ scala.
77
at/hannibal2/skyhanni/ jline.
8-
at/hannibal2/skyhanni/ io.github.moulberry.notenoughupdates.core.GlScissorStack
9-
at/hannibal2/skyhanni/ io.github.moulberry.notenoughupdates.events.SlotClickEvent
10-
at/hannibal2/skyhanni/ io.github.moulberry.notenoughupdates.events.ReplaceItemEvent
11-
at/hannibal2/skyhanni/ io.github.moulberry.notenoughupdates.util.Constants
12-
at/hannibal2/skyhanni/ io.github.moulberry.notenoughupdates.util.Utils
13-
at/hannibal2/skyhanni/ java.util.function.Supplier
148
at/hannibal2/skyhanni/ com.mojang.realmsclient.
159
at/hannibal2/skyhanni/ com.ibm.icu.
1610
at/hannibal2/skyhanni/ io.netty.util.internal.

.github/workflows/modrinth-version-upload.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ jobs:
2929

3030
- name: Grant execute permission for gradlew
3131
run: chmod +x gradlew
32-
32+
- name: Disable preprocessor
33+
run: |
34+
mkdir -p .gradle
35+
echo skyhanni.multi-version=off > .gradle/private.properties
3336
- name: Download release file
3437
env:
3538
GITHUB_TOKEN: ${{ github.token }}

.github/workflows/pr-check.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ jobs:
2323
- name: Grant execute permission for gradlew
2424
run: chmod +x gradlew
2525

26+
- name: Disable preprocessor
27+
run: |
28+
mkdir -p .gradle
29+
echo skyhanni.multi-version=off > .gradle/private.properties
30+
2631
- name: Run ChangeLog verification w/retry
2732
env:
2833
PR_TITLE: ${{ github.event.pull_request.title }}
@@ -52,7 +57,7 @@ jobs:
5257
github-token: ${{ secrets.GITHUB_TOKEN }}
5358
script: |
5459
const fs = require('fs');
55-
const test = fs.readFileSync('build/changelog_errors.txt', 'utf8');
60+
const test = fs.readFileSync('versions/1.21.10/build/changelog_errors.txt', 'utf8');
5661
const commentBody = `${test}`
5762
5863
github.rest.issues.createComment({

CONTRIBUTING.md

Lines changed: 49 additions & 337 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
## What it does
1616

17-
SkyHanni is a Fabric 1.21 and Forge 1.8.9 Minecraft mod that adds many useful features to [Hypixel SkyBlock](https://wiki.hypixel.net/Main_Page). With SkyHanni you have access to:
17+
SkyHanni is a Fabric Minecraft mod that adds many useful features to [Hypixel SkyBlock](https://wiki.hypixel.net/Main_Page). With SkyHanni you have access to:
1818

1919
* **Helpful GUIs:** View important information at a glance.
2020
* **Extra Chat Messages:** Receive reminders and tips at the right moment.

annotation-processors/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repositories {
1313

1414
dependencies {
1515
implementation(kotlin("stdlib-jdk8"))
16-
implementation("com.google.devtools.ksp:symbol-processing-api:1.8.0-1.0.8")
16+
implementation("com.google.devtools.ksp:symbol-processing-api:2.3.4")
1717
}
1818

1919
tasks.withType<JavaCompile> {

build.gradle.kts

Lines changed: 43 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,20 @@ import at.skyhanni.sharedvariables.MultiVersionStage
22
import at.skyhanni.sharedvariables.ProjectTarget
33
import at.skyhanni.sharedvariables.SHVersionInfo
44
import at.skyhanni.sharedvariables.versionString
5-
import com.google.devtools.ksp.gradle.KspTaskJvm
65
import io.gitlab.arturbosch.detekt.Detekt
76
import io.gitlab.arturbosch.detekt.DetektCreateBaselineTask
87
import net.fabricmc.loom.task.prod.ClientProductionRunTask
98
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
10-
import org.jetbrains.kotlin.gradle.plugin.SubpluginOption
119
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
1210
import skyhannibuildsystem.ChangelogVerification
13-
import skyhannibuildsystem.CleanupMappingFiles
1411
import skyhannibuildsystem.DownloadBackupRepo
1512
import skyhannibuildsystem.PublishToModrinth
1613

1714
plugins {
1815
idea
1916
java
20-
id("com.gradleup.shadow") version "8.3.4"
21-
id("fabric-loom")
22-
id("com.github.SkyHanniStudios.SkyHanni-Preprocessor")
17+
id("com.gradleup.shadow") version "9.3.1"
18+
id("net.fabricmc.fabric-loom-remap")
2319
kotlin("jvm")
2420
id("com.google.devtools.ksp")
2521
kotlin("plugin.power-assert")
@@ -43,18 +39,18 @@ runDirectory.mkdirs()
4339

4440
// Minecraft configuration:
4541
loom {
46-
val accessWidenerFile = when (target) {
47-
ProjectTarget.MODERN_12105 -> rootProject.file("src/main/resources/skyhanni.accesswidener")
48-
else -> file("src/main/resources/skyhanni.accesswidener")
49-
}
50-
if (accessWidenerFile.exists()) {
51-
accessWidenerPath = accessWidenerFile
52-
}
53-
@Suppress("UnstableApiUsage")
54-
mixin {
55-
useLegacyMixinAp.set(true)
56-
defaultRefmapName.set("mixins.skyhanni.refmap.json")
42+
val classTweakerFile = sc.process(
43+
rootProject.file("src/main/resources/skyhanni.classtweaker"),
44+
"build/skyhanni.classtweaker",
45+
)
46+
if (classTweakerFile.exists()) {
47+
accessWidenerPath = classTweakerFile
48+
} else {
49+
println("No classTweaker file for ${target.minecraftVersion}")
5750
}
51+
52+
fabricModJsonPath = rootProject.file("src/main/resources/fabric.mod.json")
53+
5854
runs {
5955
named("client") {
6056
isIdeConfigGenerated = true
@@ -96,10 +92,6 @@ val includeBackupNeuRepo by tasks.registering(DownloadBackupRepo::class) {
9692
this.outputDirectory.set(layout.buildDirectory.dir("downloadedNeuRepo"))
9793
}
9894

99-
val cleanupMappingFiles by tasks.registering(CleanupMappingFiles::class) {
100-
this.mappingsDirectory.set(layout.projectDirectory.asFile.parentFile)
101-
}
102-
10395
val publishToModrinth by tasks.registering(PublishToModrinth::class)
10496

10597
tasks.runClient {
@@ -120,7 +112,12 @@ dependencies {
120112
val versionName = target.minecraftVersion.versionNameOverride ?: target.minecraftVersion.versionName
121113
minecraft("com.mojang:minecraft:$versionName")
122114
if (target.mappingDependency == "official") {
123-
mappings(loom.officialMojangMappings())
115+
mappings(loom.layered {
116+
officialMojangMappings()
117+
if (versionName == "1.21.10") {
118+
mappings("dev.lambdaurora:yalmm-mojbackward:1.21.10+build.3")
119+
}
120+
})
124121
} else {
125122
mappings(target.mappingDependency)
126123
}
@@ -153,6 +150,7 @@ dependencies {
153150
}
154151

155152
testImplementation("org.junit.jupiter:junit-jupiter:5.11.0")
153+
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
156154
testImplementation("io.mockk:mockk:1.12.5")
157155

158156
modImplementation(libs.hypixelmodapi)
@@ -173,6 +171,8 @@ dependencies {
173171
detektPlugins("org.notenoughupdates:detektrules:1.0.0")
174172
detektPlugins(project(":detekt"))
175173
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.23.7")
174+
175+
if (target != ProjectTarget.MODERN_12110) shadowImpl("org.apache.httpcomponents:httpclient:4.5.14")
176176
}
177177

178178
fun DependencyHandler.includeImplementation(dep: Any) {
@@ -184,10 +184,11 @@ afterEvaluate {
184184
loom.runs.named("client") {
185185
programArgs("--quickPlayMultiplayer", "hypixel.net")
186186
}
187-
tasks.named("kspKotlin", KspTaskJvm::class) {
188-
this.options.add(SubpluginOption("apoption", "skyhanni.modver=$version"))
189-
this.options.add(SubpluginOption("apoption", "skyhanni.mcver=${target.minecraftVersion.versionName}"))
190-
this.options.add(SubpluginOption("apoption", "skyhanni.buildpaths=${project.file("buildpaths-excluded.txt").absolutePath}"))
187+
188+
ksp {
189+
arg("skyhanni.modver", version.toString())
190+
arg("skyhanni.mcver", target.minecraftVersion.versionName)
191+
arg("skyhanni.buildpaths", project.file("buildpaths-excluded.txt").absolutePath)
191192
}
192193
}
193194

@@ -211,13 +212,21 @@ kotlin {
211212
tasks.processResources {
212213
from(includeBackupRepo)
213214
from(includeBackupNeuRepo)
214-
inputs.property("version", version)
215+
val fapiVersion = target.fabricApiVersion?.split(":")?.last() ?: ""
216+
val props = buildMap {
217+
put("version", version)
218+
put("minecraft", target.minecraftVersion.versionName)
219+
put("fapi", fapiVersion)
220+
}
221+
222+
props.forEach(inputs::property)
223+
215224
filesMatching("fabric.mod.json") {
216-
expand("version" to version)
225+
expand(props)
217226
}
218227
}
219228

220-
if (target == ProjectTarget.MODERN_12105) {
229+
if (target == ProjectTarget.MODERN_12110) {
221230
fabricApi {
222231
configureTests {
223232
modId = "skyhanni"
@@ -259,16 +268,6 @@ tasks.withType<KotlinCompile> {
259268
compilerOptions.jvmTarget.set(JvmTarget.fromTarget(target.minecraftVersion.formattedJavaLanguageVersion))
260269
}
261270

262-
if (target.parent == ProjectTarget.MODERN_12105) {
263-
val mainRes = project(ProjectTarget.MODERN_12105.projectPath).tasks.getAt("processResources")
264-
tasks.named("processResources") {
265-
dependsOn(mainRes)
266-
}
267-
tasks.named("preprocessCode") {
268-
dependsOn(mainRes)
269-
}
270-
}
271-
272271
tasks.withType(JavaCompile::class) {
273272
options.encoding = "UTF-8"
274273
}
@@ -277,9 +276,6 @@ tasks.withType(org.gradle.jvm.tasks.Jar::class) {
277276
archiveBaseName.set("SkyHanni")
278277
archiveVersion.set("$version-mc${target.minecraftVersion.versionName}")
279278
duplicatesStrategy = DuplicatesStrategy.EXCLUDE // Why do we have this here? This only *hides* errors.
280-
manifest.attributes.run {
281-
this["Main-Class"] = "SkyHanniInstallerFrame"
282-
}
283279
}
284280

285281
val remapJar by tasks.named<net.fabricmc.loom.task.RemapJarTask>("remapJar") {
@@ -293,11 +289,6 @@ tasks.shadowJar {
293289
destinationDirectory.set(layout.buildDirectory.dir("badjars"))
294290
archiveClassifier.set("all-dev")
295291
configurations = listOf(shadowImpl, shadowModImpl)
296-
doLast {
297-
configurations.forEach {
298-
println("Config: ${it.files}")
299-
}
300-
}
301292
exclude("META-INF/versions/**")
302293
mergeServiceFiles()
303294
relocate("io.github.notenoughupdates.moulconfig", "at.hannibal2.skyhanni.deps.moulconfig")
@@ -331,12 +322,6 @@ if (!MultiVersionStage.activeState.shouldCompile(target)) {
331322
}
332323
}
333324

334-
preprocess {
335-
vars.put("MC", target.minecraftVersion.versionNumber)
336-
vars.put("JAVA", target.minecraftVersion.javaVersion)
337-
vars.put("TODO", 0)
338-
}
339-
340325
val sourcesJar by tasks.registering(Jar::class) {
341326
destinationDirectory.set(layout.buildDirectory.dir("badjars"))
342327
archiveClassifier.set("src")
@@ -372,7 +357,7 @@ detekt {
372357

373358
tasks.withType<Detekt>().configureEach {
374359
onlyIf {
375-
target == ProjectTarget.MODERN_12105 && project.findProperty("skipDetekt") != "true"
360+
target == ProjectTarget.MODERN_12110 && project.findProperty("skipDetekt") != "true"
376361
}
377362
jvmTarget = target.minecraftVersion.formattedJavaLanguageVersion
378363
outputs.cacheIf { false } // Custom rules won't work if cached
@@ -399,10 +384,13 @@ tasks.withType<DetektCreateBaselineTask>().configureEach {
399384
outputs.cacheIf { false } // Custom rules won't work if cached
400385
onlyIf {
401386
// We only need one baseline for the main source set
402-
target == ProjectTarget.MODERN_12105
387+
target == ProjectTarget.MODERN_12110
403388
}
404389

405390
val isMainBaseline = (this.name == "detektBaselineMain")
406391
val outputFileName = if (isMainBaseline) "baseline-main" else "baseline"
407392
baseline.set(file(rootProject.layout.projectDirectory.file("detekt/$outputFileName.xml")))
408393
}
394+
repositories {
395+
mavenCentral()
396+
}

buildTools/PROJECT_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.5.0
1+
6.17.0

0 commit comments

Comments
 (0)