Skip to content

Commit

Permalink
refactor!: convert codebase to kotlin
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Remove disable projectile randomness & disable bow boost modules
  • Loading branch information
kernitus committed Dec 26, 2024
1 parent 6c338fd commit 0ee22a5
Show file tree
Hide file tree
Showing 137 changed files with 6,994 additions and 7,666 deletions.
25 changes: 9 additions & 16 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ val paperVersion: List<String> = (property("gameVersions") as String)


plugins {
`java-library`
id("org.jetbrains.kotlin.jvm") version "1.9.10"
id("org.jetbrains.kotlin.jvm") version "2.1.0"
id("com.github.johnrengelman.shadow") version "8.1.1"
// For ingametesting
//id("io.papermc.paperweight.userdev") version "1.5.10"
Expand Down Expand Up @@ -76,25 +75,23 @@ version = "2.0.5-beta" // x-release-please-version
description = "OldCombatMechanics"


java {
toolchain {
// We can build with Java 17 but still support MC >=1.9
// This is because MC >=1.9 server can be run with higher Java versions
languageVersion.set(JavaLanguageVersion.of(17))
}
}

sourceSets {
main {
java {
kotlin {
exclude("kernitus/plugin/OldCombatMechanics/tester/**")
}
}
}

kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = "17" // Ensure compatibility with Java 17
jvmTarget = "17"
}
}

Expand All @@ -106,10 +103,6 @@ tasks.named<Copy>("processResources") {
}
}

tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}

tasks.named<ShadowJar>("shadowJar") {
dependsOn("jar")
archiveFileName.set("${project.name}.jar")
Expand Down
47 changes: 0 additions & 47 deletions src/main/java/kernitus/plugin/OldCombatMechanics/ModuleLoader.java

This file was deleted.

This file was deleted.

Loading

0 comments on commit 0ee22a5

Please sign in to comment.