Skip to content

Commit

Permalink
fix(build): fix build after dependency upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
Cubxity committed Jun 14, 2024
1 parent 495b25b commit 9820182
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@

.gradle
build
**/run*/
**/run*/
.kotlin
11 changes: 7 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,23 @@
* along with UnifiedMetrics. If not, see <https://www.gnu.org/licenses/>.
*/

import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
kotlin("jvm") version "2.0.0" apply false
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()
Expand All @@ -42,8 +45,8 @@ subprojects {
apply(plugin = "maven-publish")

tasks.withType<KotlinCompile> {
kotlinOptions {
kotlinOptions.jvmTarget = "1.8"
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
freeCompilerArgs = listOf("-opt-in=kotlin.RequiresOptIn")
}
}
Expand Down
3 changes: 2 additions & 1 deletion platforms/bungee/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
7 changes: 5 additions & 2 deletions platforms/fabric/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

/*
* This file is part of UnifiedMetrics.
*
Expand All @@ -16,7 +18,7 @@
*/

plugins {
id("fabric-loom") version "1.7.1"
id("fabric-loom")
}

val transitiveInclude: Configuration by configurations.creating {
Expand Down Expand Up @@ -54,11 +56,12 @@ loom {
isIdeConfigGenerated = true
}
}
serverOnlyMinecraftJar()
}

tasks {
compileKotlin {
kotlinOptions.jvmTarget = "16"
compilerOptions.jvmTarget.set(JvmTarget.JVM_16)
}
processResources {
filesMatching("fabric.mod.json") {
Expand Down

0 comments on commit 9820182

Please sign in to comment.