add froglib dependency to template

This commit is contained in:
moehreag 2024-06-10 23:52:02 +02:00
parent 006bf0222c
commit 2b0bd27b1b
3 changed files with 18 additions and 9 deletions

View file

@ -1,6 +1,3 @@
import dev.frogmc.phytotelma.ext.minecraft
import dev.frogmc.phytotelma.ext.loader
plugins {
id("java")
id("dev.frogmc.phytotelma").version("$phytotelma_version")
@ -19,6 +16,7 @@ dependencies {
phytotelma {
loader(project.libs.versions.frogloader)
froglib(project.libs.versions.froglib)
minecraft(project.libs.versions.minecraft)
}

View file

@ -2,8 +2,10 @@
minecraft = "$game_version"
loader = "$loader_version"
froglib = "$froglib_version"
[libraries]
# technically unused
minecraft = { module = "com.mojang:minecraft", version.ref = "minecraft" }
loader = { module = "dev.frogmc:frogloader", version.ref = "loader" }
loader = { module = "dev.frogmc:frogloader", version.ref = "loader" }
froglib = { module = "dev.frogmc:froglib", version.ref = "froglib" }

View file

@ -26,8 +26,10 @@ outline: false
let versions = []
let latestLoader
let latestPhytotelma
let latestFrogLib
let latestLoaderSnapshot
let latestPhytotelmaSnapshot
let latestFrogLibSnapshot
async function getGameVersions() {
const response = await fetch("https://piston-meta.mojang.com/mc/game/version_manifest_v2.json")
@ -82,12 +84,12 @@ outline: false
}).catch((err) => {
document.getElementById("phytotelmaVersionReleaseBadge").innerHTML = "No version found!"
}),
/*fetchVersionFromMaven("releases", "froglib").then((v) => {
latestPhytotelma = v
fetchVersionFromMaven("releases", "froglib").then((v) => {
latestFrogLib = v
document.getElementById("froglibVersionReleaseBadge").innerHTML = v
}).catch((err) => {
document.getElementById("froglibVersionReleaseBadge").innerHTML = "No version found!"
}),*/
}),
fetchVersionFromMaven("snapshots", "frogloader").then((v) => {
latestLoaderSnapshot = v
document.getElementById("frogLoaderVersionSnapshotBadge").innerHTML = v
@ -95,7 +97,13 @@ outline: false
fetchVersionFromMaven("snapshots", "phytotelma").then((v) => {
latestPhytotelmaSnapshot = v
document.getElementById("phytotelmaVersionSnapshotBadge").innerHTML = v
})
}),
fetchVersionFromMaven("snapshots", "froglib").then((v) => {
latestFrogLibSnapshot = v
document.getElementById("froglibVersionSnapshotBadge").innerHTML = v
}).catch((err) => {
document.getElementById("froglibVersionSnapshotBadge").innerHTML = "No version found!"
}),
])
}
@ -230,6 +238,7 @@ outline: false
data = data.replaceAll("$license", licenseRef.value)
data = data.replaceAll("$loader_version", useSnapshots.value ? latestLoaderSnapshot : latestLoader)
data = data.replaceAll("$phytotelma_version", useSnapshots.value ? latestPhytotelmaSnapshot : latestPhytotelma)
data = data.replaceAll("$froglib_version", useSnapshots.value ? latestFrogLibSnapshot : latestFrogLib)
data = data.replaceAll("$game_version", versionSelector.value.value)
return data
})