Skip to content

Commit

Permalink
Merge pull request #6 from Flamarine/trunk
Browse files Browse the repository at this point in the history
Update to Kotlin 2.0
  • Loading branch information
MartinSVK12 authored Jul 6, 2024
2 parents c4f6487 + 1b7457e commit 014e89b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 17 deletions.
7 changes: 3 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'babric-loom' version '1.1.+'
id 'fabric-loom'
id 'org.jetbrains.kotlin.jvm'
}

Expand All @@ -8,9 +8,9 @@ archivesBaseName = project.mod_name
version = project.mod_version

loom {
gluedMinecraftJar()
// gluedMinecraftJar()
noIntermediateMappings()
customMinecraftManifest.set("https://github.com/Turnip-Labs/bta-manifest-repo/releases/download/v${project.bta_version}/${project.bta_version}.json")
setCustomMinecraftManifest("https://github.com/Turnip-Labs/bta-manifest-repo/releases/download/v${project.bta_version}/${project.bta_version}.json")
}

repositories {
Expand Down Expand Up @@ -98,7 +98,6 @@ dependencies {
implementation("org.apache.logging.log4j:log4j-1.2-api:${log4jVersion}")
include(implementation("org.apache.commons:commons-lang3:3.12.0"))


modImplementation("net.fabricmc:fabric-language-kotlin:${project.flk_version}+kotlin.${project.kotlin_version}") {
exclude(group: "net.fabricmc", module: "fabric-loader")
}
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ mod_menu_version=2.0.6
halplibe_version=4.1.3

# Fabric Language Kotlin
flk_version=1.9.4
kotlin_version=1.8.21
flk_version=1.11.0
kotlin_version=2.0.0

# Mod
mod_version=1.0.0
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 2 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pluginManagement {
}

plugins {
id 'babric-loom' version '1.1.+'
id 'fabric-loom' version '1.7-SNAPSHOT'
id "org.jetbrains.kotlin.jvm" version kotlin_version
}
}
}
14 changes: 6 additions & 8 deletions src/main/kotlin/turniplabs/examplemod/ExampleMod.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,18 @@ import turniplabs.halplibe.util.GameStartEntrypoint
import turniplabs.halplibe.util.RecipeEntrypoint

object ExampleMod: ModInitializer, GameStartEntrypoint, RecipeEntrypoint {
@JvmField
val MODID: String = "examplemod"
const val MODID: String = "examplemod"

@JvmField
val LOGGER: Logger = LoggerFactory.getLogger(MODID)
@JvmField
val LOGGER: Logger = LoggerFactory.getLogger(MODID)

override fun onInitialize() {
override fun onInitialize() {
// This code runs as soon as Minecraft is in a mod-load-ready state.
// However, some things (like resources) may still be uninitialized.
// Proceed with mild caution.

LOGGER.info("Hello Fabric world!")
}
LOGGER.info("Hello Fabric world!")
}

override fun beforeGameStart() {

Expand All @@ -36,5 +35,4 @@ object ExampleMod: ModInitializer, GameStartEntrypoint, RecipeEntrypoint {
override fun initNamespaces() {

}

}

0 comments on commit 014e89b

Please sign in to comment.