diff --git a/.gitignore b/.gitignore index e240c6d..bea13a1 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ .gradle build -**/run*/ \ No newline at end of file +**/run*/ +.kotlin \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 41f1295..990fd79 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -15,7 +15,7 @@ * along with UnifiedMetrics. If not, see . */ -import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension +import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { @@ -23,12 +23,15 @@ plugins { kotlin("kapt") version "2.0.0" apply false kotlin("plugin.serialization") version "2.0.0" apply false id("com.github.johnrengelman.shadow") version "8.1.1" apply false + + // The fabric-loom plugin must be defined in the root project for it to function properly. + id("fabric-loom") version "1.7.1" apply false } allprojects { group = "dev.cubxity.plugins" description = "Fully featured metrics collector agent for Minecraft servers." - version = "0.3.9-SNAPSHOT" + version = "0.3.10-SNAPSHOT" repositories { mavenCentral() @@ -42,8 +45,8 @@ subprojects { apply(plugin = "maven-publish") tasks.withType { - kotlinOptions { - kotlinOptions.jvmTarget = "1.8" + compilerOptions { + jvmTarget.set(JvmTarget.JVM_1_8) freeCompilerArgs = listOf("-opt-in=kotlin.RequiresOptIn") } } diff --git a/platforms/bungee/build.gradle.kts b/platforms/bungee/build.gradle.kts index 86b0977..5d22ff8 100644 --- a/platforms/bungee/build.gradle.kts +++ b/platforms/bungee/build.gradle.kts @@ -21,12 +21,13 @@ plugins { repositories { maven("https://oss.sonatype.org/content/repositories/snapshots/") + maven("https://libraries.minecraft.net") } dependencies { api(project(":unifiedmetrics-core")) - compileOnly("net.md-5", "bungeecord-api", "1.20-R0.2") + compileOnly("net.md-5", "bungeecord-api", "1.21-R0.1-SNAPSHOT") } tasks { diff --git a/platforms/fabric/build.gradle.kts b/platforms/fabric/build.gradle.kts index bc902c1..1dbfd06 100644 --- a/platforms/fabric/build.gradle.kts +++ b/platforms/fabric/build.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.gradle.dsl.JvmTarget + /* * This file is part of UnifiedMetrics. * @@ -16,7 +18,7 @@ */ plugins { - id("fabric-loom") version "1.7.1" + id("fabric-loom") } val transitiveInclude: Configuration by configurations.creating { @@ -54,11 +56,12 @@ loom { isIdeConfigGenerated = true } } + serverOnlyMinecraftJar() } tasks { compileKotlin { - kotlinOptions.jvmTarget = "16" + compilerOptions.jvmTarget.set(JvmTarget.JVM_16) } processResources { filesMatching("fabric.mod.json") {