Skip to content

Commit

Permalink
Make minecraft version in fabric.mod.json a property
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobkmar committed Jun 8, 2021
1 parent fa9e5cc commit 45b2ac8
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion buildSrc/src/main/kotlin/BuildConstants.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
object BuildConstants {
const val fabrikVersion = "0.5.0"
const val fabrikVersion = "1.0.0"
val isSnapshot = fabrikVersion.endsWith("-SNAPSHOT")
val projectState = if (isSnapshot) "beta" else "release"

Expand All @@ -8,6 +8,8 @@ object BuildConstants {

const val author = "bluefireoly"

const val majorMinecraftVersion = "1.17"

// check these values here: https://axay.net/fabric/gradlekts/latest
const val minecraftVersion = "1.17"
const val yarnMappingsVersion = "1.17+build.1:v2"
Expand Down
4 changes: 3 additions & 1 deletion buildSrc/src/main/kotlin/mod-build-script.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import BuildConstants.fabricApiVersion
import BuildConstants.fabricLanguageKotlinVersion
import BuildConstants.fabricLoaderVersion
import BuildConstants.fabrikVersion
import BuildConstants.majorMinecraftVersion
import BuildConstants.minecraftVersion
import BuildConstants.yarnMappingsVersion
import org.gradle.kotlin.dsl.*
Expand Down Expand Up @@ -43,7 +44,8 @@ tasks {
"id" to project.name,
"version" to project.version,
"description" to project.description,
"author" to author
"author" to author,
"minecraftversion" to "${majorMinecraftVersion}.x"
)

inputs.properties(properties)
Expand Down
2 changes: 1 addition & 1 deletion fabrikmc-commands/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"depends": {
"fabric": "*",
"fabric-language-kotlin": "*",
"minecraft": "1.16.x",
"minecraft": "${minecraftversion}",
"fabrikmc-core": "*"
}
}
2 changes: 1 addition & 1 deletion fabrikmc-core/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"depends": {
"fabric": "*",
"fabric-language-kotlin": "*",
"minecraft": "1.16.x"
"minecraft": "${minecraftversion}"
}
}
2 changes: 1 addition & 1 deletion fabrikmc-igui/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"depends": {
"fabric": "*",
"fabric-language-kotlin": "*",
"minecraft": "1.16.x",
"minecraft": "${minecraftversion}",
"fabrikmc-core": "*"
}
}

0 comments on commit 45b2ac8

Please sign in to comment.