Skip to content

Commit

Permalink
build: switch from NeoForge userdev to moddev
Browse files Browse the repository at this point in the history
  • Loading branch information
JustPyrrha committed Oct 9, 2024
1 parent eb4d3ed commit fd6f098
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Kotlinx Serialization for Minecraft Payloads.
### Features
- Kotlinx Serialization encoder/decoder for Minecraft's FriendlyByteBuf/PacketByteBuf.
- Abstract `SerializedPayload` for easy packet creation.
- Support for both Fabric and NeoForge loaders.

### Developer Usage
This project is intended to be included via Jar-in-Jar.\
Expand All @@ -22,8 +23,11 @@ dependencies {
modImplementation("dev.wanderia:netlib-fabric:$version")

// NeoForge
jarJar("dev.wanderia:netlib-neoforge:$version") {
jarJar.pin(it, "[$version,)")
jarJar(implementation("dev.wanderia:netlib-neoforge")) {
version {
strictly("[$version,)")
prefer("$version")
}
}
}
```
Expand Down
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import org.jetbrains.changelog.date
plugins {
alias(libs.plugins.kotlin) apply false
alias(libs.plugins.loom) apply false
alias(libs.plugins.neogradle) apply false
alias(libs.plugins.kotlin.serialization) apply false
alias(libs.plugins.spotless) apply false
alias(libs.plugins.changelog)
Expand All @@ -19,7 +20,7 @@ plugins {
}

group = "dev.wanderia"
version = "1.3.0"
version = "1.3.1"

repositories { mavenCentral() }

Expand Down
4 changes: 2 additions & 2 deletions libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ kotlinx-kover = "0.8.3" # https://github.com/Kotlin/kotlinx-kover/releases
kotlinxSerialization = "1.7.3" # https://github.com/Kotlin/kotlinx.serialization/releases
minecraft = "1.21.1"
neoForge = "21.1.66" # https://projects.neoforged.net/neoforged/neoforge
neoGradle = "7.0.165" # https://projects.neoforged.net/neoforged/neogradle
neoGradle = "2.0.34-beta" # https://projects.neoforged.net/neoforged/moddevgradle
minotaur = "2.8.7" # https://github.com/modrinth/minotaur/releases
parchment = "2024.07.28" # https://parchmentmc.org/docs/getting-started
spotless = "7.0.0.BETA2" # https://github.com/diffplug/spotless/blob/main/plugin-gradle/CHANGES.md
Expand Down Expand Up @@ -41,7 +41,7 @@ kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", versi
kotlinx-kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kotlinx-kover" }
loom = { id = "fabric-loom", version.ref = "fabricLoom" }
minotaur = { id = "com.modrinth.minotaur", version.ref = "minotaur" }
neogradle = { id = "net.neoforged.gradle.userdev", version.ref = "neoGradle" }
neogradle = { id = "net.neoforged.moddev", version.ref = "neoGradle" }
spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }

# custom plugins, in buildLogic/
Expand Down
16 changes: 11 additions & 5 deletions mod/neoforge/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,18 @@ repositories {
maven("https://thedarkcolour.github.io/KotlinForForge/") { name = "KotlinForForge" }
}

dependencies {
implementation(libs.neoforge)
implementation(libs.kotlinforforge)
}
dependencies { implementation(libs.kotlinforforge) }

neoForge {
version = libs.versions.neoForge.get()

subsystems { parchment { mappingsVersion = libs.versions.parchment.get() } }
parchment {
minecraftVersion = "1.21"
mappingsVersion = libs.versions.parchment.get()
}

unitTest { enable() }
}

tasks {
processResources {
Expand Down

0 comments on commit fd6f098

Please sign in to comment.