Dependency Bump

This commit is contained in:
Frank 2023-12-27 14:30:36 +01:00
parent 3fbebd15c8
commit cc3332fc71
5 changed files with 45 additions and 7 deletions

1
.gitignore vendored
View file

@ -33,3 +33,4 @@ output/
*.log
/CHANGES.md
/src/main/generated/.cache/
/modrinth.json

@ -1 +1 @@
Subproject commit 02ea056d4050c11b1d0f9314baf6da6c08f05f42
Subproject commit 5a105691419c03738a2764e14c886b9efedb6914

View file

@ -64,8 +64,8 @@ dependencies {
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
modCompileOnly "com.terraformersmc:modmenu:${project.modmenu_version}"
modCompileOnly "dev.emi:emi:${emi_version}"
//modImplementation "dev.emi:emi:${emi_version}"
modCompileOnly "dev.emi:emi-fabric:${emi_version}:api"
modLocalRuntime "dev.emi:emi-fabric:${emi_version}"
}
processResources {

View file

@ -146,4 +146,41 @@ curseforge {
debug = false
forgeGradleIntegration = false
}
}
task nextVersion() {
doLast {
def inputFile = new File('modrinth.json')
def gameVersions = java.net.URLEncoder.encode(project.modrinth_versions, "UTF-8")
new URL("https://api.modrinth.com/v2/project/${project.archives_base_name}/version?&game_versions=${gameVersions}").withInputStream { i -> inputFile.withOutputStream { it << i } }
def json = new groovy.json.JsonSlurper().parseText(inputFile.text)
def version = json[0].version_number
//increment patch version
def indexedVersionList = version.split(/\./).toList().withIndex()
indexedVersionList = indexedVersionList.collect { num, idx -> num.toInteger() }
indexedVersionList[2] = indexedVersionList[2].value + 1
def updatedVersion = indexedVersionList.join(".")
println "\n\n"
println "------------- CURRENT VERSION -------------"
println "Last Published Version: " + version
println " Game Versions: " + json[0].game_versions
println " Status: " + json[0].status
println " Featured: " + json[0].featured
println " Downloaded: " + json[0].downloads
println "\n"
println "-------------- NEXT VERSION ---------------"
println "Next Version: " + updatedVersion
println "\n\n"
def propertiesFile = new File("gradle.properties")
def newContents = propertiesFile.text.replaceFirst("mod_version=\\d+.\\d+.\\d+", "mod_version=${updatedVersion}")
propertiesFile.text = newContents
def fabricFile = new File("src/main/resources/fabric.mod.json")
newContents = fabricFile.text.replaceFirst('"version": ".+"', "\"version\": \"${updatedVersion}\"")
fabricFile.text = newContents
}
}

View file

@ -9,12 +9,12 @@ loom_version=1.0-SNAPSHOT
# Fabric Properties
# check these on https://fabricmc.net/versions.html
minecraft_version=1.19.3
loader_version=0.14.11
fabric_version=0.68.1+1.19.3
loader_version=0.15.3
fabric_version=0.76.1+1.19.3
# Mod Properties
mod_version=2.2.5
maven_group=org.betterx.bclib
archives_base_name=bclib
# Dependencies
modmenu_version=5.0.1
emi_version=0.6.2+1.19.3
modmenu_version=5.0.2
emi_version=1.0.29+1.19.3