Skip to content

Commit 51f554a

Browse files
committed
Merge branch 'main' into 1.19
2 parents c34159f + 5980811 commit 51f554a

File tree

13 files changed

+198
-146
lines changed

13 files changed

+198
-146
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -24,36 +24,6 @@ jobs:
2424
- name: Print message so the workflow isn't invalid
2525
run: 'echo "HexDebug <3 HexBug"'
2626

27-
build-mod:
28-
needs: setup
29-
runs-on: ubuntu-latest
30-
steps:
31-
- uses: actions/checkout@v4
32-
- uses: actions/setup-java@v4
33-
with:
34-
distribution: temurin
35-
java-version: 17
36-
- uses: gradle/actions/setup-gradle@v3
37-
38-
- name: Build mod
39-
run: ./gradlew build exportPrerelease
40-
41-
# literally no idea why the mkdir is needed, but the workflow fails without it :/
42-
- name: Check if datagen needs to be run
43-
timeout-minutes: 3
44-
run: |
45-
mkdir -p /home/runner/.gradle/caches/fabric-loom/assets
46-
./gradlew runAllDatagen
47-
git add --intent-to-add .
48-
git diff --name-only --exit-code -- ":!:*/src/generated/resources/.cache/*"
49-
50-
- name: Upload prerelease artifact
51-
uses: actions/upload-artifact@v4
52-
with:
53-
name: mod-prerelease
54-
path: dist/
55-
if-no-files-found: error
56-
5727
build-docs:
5828
needs: setup
5929
uses: hexdoc-dev/hexdoc/.github/workflows/hexdoc.yml@v1!0.1.dev

.github/workflows/release.yml

Lines changed: 2 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,10 @@
11
name: Release
22

3+
# TODO: trigger this via Jenkins somehow?
4+
35
on:
46
workflow_dispatch:
57
inputs:
6-
publish-curseforge:
7-
description: Publish to CurseForge
8-
type: boolean
9-
default: false
10-
publish-modrinth:
11-
description: Publish to Modrinth
12-
type: boolean
13-
default: false
14-
publish-github:
15-
description: Publish to GitHub
16-
type: boolean
17-
default: false
188
publish-docs:
199
description: Publish the web book
2010
type: boolean
@@ -43,56 +33,6 @@ jobs:
4333
deploy-pages: ${{ inputs.publish-docs && !inputs.dry-run }}
4434
release: true
4535

46-
publish-mod:
47-
needs: build-docs
48-
if: inputs.publish-curseforge || inputs.publish-modrinth || inputs.publish-github
49-
runs-on: ubuntu-latest
50-
environment:
51-
name: curseforge-modrinth
52-
permissions:
53-
contents: write
54-
steps:
55-
- uses: actions/checkout@v4
56-
- uses: actions/setup-java@v4
57-
with:
58-
distribution: temurin
59-
java-version: 17
60-
- uses: gradle/actions/setup-gradle@v3
61-
62-
- name: Build mod
63-
run: ./gradlew build
64-
65-
# do this first so we fail if we've already published this version
66-
# because CurseForge and Modrinth apparently don't care!
67-
- name: Publish to GitHub
68-
if: inputs.publish-github
69-
env:
70-
DRY_RUN: ${{ inputs.dry-run && 'true' || '' }}
71-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72-
run: ./gradlew publishGithub
73-
74-
- name: Publish to CurseForge
75-
if: inputs.publish-curseforge
76-
env:
77-
DRY_RUN: ${{ inputs.dry-run && 'true' || '' }}
78-
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}
79-
run: ./gradlew publishCurseforge
80-
81-
- name: Publish to Modrinth
82-
if: inputs.publish-modrinth
83-
env:
84-
DRY_RUN: ${{ inputs.dry-run && 'true' || '' }}
85-
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
86-
run: ./gradlew publishModrinth
87-
88-
- name: Upload dry run artifact
89-
if: inputs.dry-run
90-
uses: actions/upload-artifact@v4
91-
with:
92-
name: mod-publish
93-
path: '*/build/publishMods'
94-
if-no-files-found: error
95-
9636
publish-docs:
9737
needs: build-docs
9838
if: inputs.publish-docs && !inputs.dry-run

Common/build.gradle.kts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,13 @@ dependencies {
2121
modImplementation(libs.fabric.loader)
2222
modApi(libs.architectury)
2323

24-
modImplementation(libs.hexcasting.common)
25-
modImplementation(libs.paucal.common)
26-
modImplementation(libs.patchouli.xplat)
24+
modApi(libs.hexcasting.common)
2725

28-
modImplementation(libs.clothConfig.common)
26+
modApi(libs.clothConfig.common)
2927

3028
implementation(libs.mixinExtras)
3129

32-
implementation(libs.bundles.lsp4j)
30+
api(libs.bundles.lsp4j)
31+
3332
implementation(libs.ktor.network)
3433
}

Common/src/main/resources/icon.png

5.33 KB
Loading

Fabric/build.gradle.kts

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import hexdebug.libs
2-
31
plugins {
42
id("hexdebug.conventions.platform")
53
}
@@ -45,33 +43,37 @@ dependencies {
4543
exclude(group = "net.fabricmc", module = "fabric-loader")
4644
}
4745

48-
modImplementation(libs.hexcasting.fabric) {
46+
modApi(libs.hexcasting.fabric) {
4947
// If not excluded here, calls a nonexistent method and crashes the dev client
5048
exclude(module = "phosphor")
5149
exclude(module = "pehkui")
5250
}
53-
modImplementation(libs.paucal.fabric)
54-
modImplementation(libs.patchouli.fabric)
55-
modImplementation(libs.cardinalComponents)
56-
modImplementation(libs.serializationHooks)
57-
modImplementation(libs.entityReach)
58-
modImplementation(libs.trinkets)
59-
60-
implementation(libs.mixinExtras)
51+
modLocalRuntime(libs.paucal.fabric)
52+
modLocalRuntime(libs.patchouli.fabric)
53+
modLocalRuntime(libs.cardinalComponents)
54+
modLocalRuntime(libs.serializationHooks)
55+
modLocalRuntime(libs.entityReach)
56+
modLocalRuntime(libs.trinkets)
57+
58+
libs.mixinExtras.also {
59+
localRuntime(it)
60+
include(it)
61+
}
6162

6263
modApi(libs.clothConfig.fabric) {
6364
exclude(group = "net.fabricmc.fabric-api")
6465
}
65-
modApi(libs.modMenu)
66+
modImplementation(libs.modMenu)
6667

67-
implementation(libs.bundles.lsp4j)
68-
implementation(libs.ktor.network)
68+
libs.bundles.lsp4j.also {
69+
api(it)
70+
include(it)
71+
}
6972

70-
include(libs.serializationHooks)
71-
include(libs.entityReach)
72-
include(libs.mixinExtras)
73-
include(libs.bundles.lsp4j)
74-
include(libs.bundles.ktor)
73+
libs.ktor.network.also {
74+
implementation(it)
75+
include(it)
76+
}
7577
}
7678

7779
// this fails if we do it for all projects, since the tag already exists :/

Forge/build.gradle.kts

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,23 +59,28 @@ dependencies {
5959

6060
implementation(libs.kotlin.forge)
6161

62-
modImplementation(libs.hexcasting.forge) { isTransitive = false }
62+
modApi(libs.hexcasting.forge) { isTransitive = false }
6363
modImplementation(libs.paucal.forge)
64-
modImplementation(libs.patchouli.forge)
64+
modLocalRuntime(libs.patchouli.forge)
6565

6666
modApi(libs.clothConfig.forge)
6767

68-
implementation(libs.mixinExtras)
69-
implementation(libs.bundles.lsp4j)
70-
implementation(libs.bundles.ktor)
68+
libs.mixinExtras.also {
69+
localRuntime(it)
70+
include(it)
71+
}
7172

72-
include(libs.mixinExtras)
73-
include(libs.bundles.lsp4j)
74-
include(libs.bundles.ktor)
73+
libs.bundles.lsp4j.also {
74+
api(it)
75+
include(it)
76+
forgeRuntimeLibrary(it)
77+
}
7578

76-
// GOD I HATE FORGE
77-
forgeRuntimeLibrary(libs.bundles.lsp4j)
78-
kotlinForgeRuntimeLibrary(libs.bundles.ktor)
79+
libs.bundles.ktor.also {
80+
implementation(it)
81+
include(it)
82+
kotlinForgeRuntimeLibrary(it)
83+
}
7984
}
8085

8186
tasks {

Jenkinsfile

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
#!/usr/bin/env groovy
2+
// noinspection GroovyAssignabilityCheck
3+
4+
pipeline {
5+
agent any
6+
tools {
7+
jdk "jdk-17"
8+
}
9+
parameters {
10+
booleanParam(
11+
name: "PUBLISH_MAVEN_RELEASE",
12+
description: "Publish release to Maven (default: publish snapshot)",
13+
defaultValue: false,
14+
)
15+
booleanParam(
16+
name: "PUBLISH_CURSEFORGE",
17+
description: "Publish to CurseForge",
18+
defaultValue: false,
19+
)
20+
booleanParam(
21+
name: "PUBLISH_MODRINTH",
22+
description: "Publish to Modrinth",
23+
defaultValue: false,
24+
)
25+
booleanParam(
26+
name: "PUBLISH_GITHUB",
27+
description: "Publish to GitHub",
28+
defaultValue: false,
29+
)
30+
}
31+
stages {
32+
stage("Clean") {
33+
steps {
34+
sh "chmod +x gradlew"
35+
sh "./gradlew clean"
36+
}
37+
}
38+
stage("Build") {
39+
steps {
40+
sh "./gradlew build"
41+
}
42+
}
43+
stage("Publish: Maven") {
44+
steps {
45+
sh "./gradlew publish"
46+
}
47+
}
48+
stage("Publish: GitHub") {
49+
when {
50+
expression { return params.PUBLISH_GITHUB }
51+
}
52+
steps {
53+
sh "./gradlew publishGithub"
54+
}
55+
}
56+
stage("Publish: CurseForge") {
57+
when {
58+
expression { return params.PUBLISH_CURSEFORGE }
59+
}
60+
steps {
61+
sh "./gradlew publishCurseforge"
62+
}
63+
}
64+
stage("Publish: Modrinth") {
65+
when {
66+
expression { return params.PUBLISH_MODRINTH }
67+
}
68+
steps {
69+
sh "./gradlew publishModrinth"
70+
}
71+
}
72+
}
73+
post {
74+
always {
75+
archiveArtifacts "build/jenkinsArtifacts/*"
76+
}
77+
}
78+
}

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,37 @@ A [Hex Casting](https://github.com/FallingColors/HexMod) addon that runs a debug
1717
- **Breakpoints**: Set breakpoints on specific patterns, or use the Uncaught Mishaps option to pause the debugger when a mishap occurs and see what went wrong.
1818
- **Multiplayer**: Debug your hexes in multiplayer! The debug client connects to a port opened by the game client (configurable, defaults to 4444), and each player can have up to one active debugger instance at a time.
1919

20+
## Maven
21+
22+
Build artifacts are published to the [BlameJared repository](https://maven.blamejared.com/gay/object/hexdebug/) via [Jenkins](https://ci.blamejared.com/job/object-Object/job/HexDebug/).
23+
24+
To depend on HexDebug, add something like this to your build script:
25+
26+
```groovy
27+
repositories {
28+
maven { url = uri("https://maven.blamejared.com") }
29+
}
30+
dependencies {
31+
modImplementation("gay.object.hexdebug:hexdebug-$platform:$hexdebugVersion")
32+
}
33+
```
34+
35+
Full examples:
36+
37+
```groovy
38+
// released versions
39+
modImplementation("gay.object.hexdebug:hexdebug-common:0.1.2+1.20.1")
40+
modImplementation("gay.object.hexdebug:hexdebug-fabric:0.1.2+1.20.1")
41+
modImplementation("gay.object.hexdebug:hexdebug-forge:0.1.2+1.20.1")
42+
43+
// bleeding edge builds
44+
modImplementation("gay.object.hexdebug:hexdebug-common:0.1.2+1.20.1-SNAPSHOT")
45+
modImplementation("gay.object.hexdebug:hexdebug-fabric:0.1.2+1.20.1-SNAPSHOT")
46+
modImplementation("gay.object.hexdebug:hexdebug-forge:0.1.2+1.20.1-SNAPSHOT")
47+
```
48+
49+
Try to avoid using things outside of the `gay.object.hexdebug.api` package, since they may change at any time.
50+
2051
## Attribution
2152

2253
* Textures: SamsTheNerd! ([GitHub](https://github.com/SamsTheNerd), [Modrinth](https://modrinth.com/user/SamsTheNerd))

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ kotlin.stdlib.default.dependency=false
77

88
# mod info
99
modId=hexdebug
10-
modVersion=0.1.1
10+
modVersion=0.1.2
1111
minecraftVersion=1.19.2
1212
mavenGroup=gay.object.hexdebug
1313

media/social_preview.png

35.6 KB
Loading

0 commit comments

Comments
 (0)