Skip to content

Commit

Permalink
Merge pull request #5 from LostLuma/fix/convention-plugin-version-cat…
Browse files Browse the repository at this point in the history
…alog

Fix version catalog not being used in convention plugins
  • Loading branch information
Pixaurora authored Aug 9, 2024
2 parents e51c4c1 + 62e7ff7 commit 105dd0c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ dependencies {
implementation(libs.quilt.loom)

implementation(libs.gson)

// Enable using version catalog in local plugins
// https://github.com/gradle/gradle/issues/15383
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
}

kotlin {
Expand Down
4 changes: 3 additions & 1 deletion build-logic/src/main/kotlin/kit_tunes.module.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import org.gradle.accessors.dm.LibrariesForLibs
import net.pixaurora.kit_tunes.build_logic.ProjectMetadata

plugins {
Expand All @@ -6,6 +7,7 @@ plugins {
id("org.quiltmc.loom")
}

val libs = the<LibrariesForLibs>()
val metadata = extra.get("metadata") as ProjectMetadata

loom {
Expand All @@ -15,7 +17,7 @@ loom {
}

dependencies {
modImplementation("org.quiltmc:quilt-loader:0.26.0")
modImplementation(libs.quilt.loader)

mappings(loom.officialMojangMappings())
minecraft("com.mojang:minecraft:${project.property("minecraft_version")}")
Expand Down
6 changes: 3 additions & 3 deletions build-logic/src/main/kotlin/kit_tunes.submodule.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ plugins {
id("kit_tunes.module")
}

val minecraft_version_min = project.property("minecraft_version_min") as String
val minecraft_version_max = project.property("minecraft_version_max") as String
val minecraftVersionMin = project.property("minecraft_version_min") as String
val minecraftVersionMax = project.property("minecraft_version_max") as String

configure<ModResourcesExtension>{
metadata {
Expand All @@ -14,6 +14,6 @@ configure<ModResourcesExtension>{
}

dependencies {
required("minecraft").version(minecraft_version_min, minecraft_version_max)
required("minecraft").version(minecraftVersionMin, minecraftVersionMax)
}
}

0 comments on commit 105dd0c

Please sign in to comment.