Dependency Bump
This commit is contained in:
parent
7825853810
commit
33c60bb5c7
3 changed files with 48 additions and 8 deletions
47
build.gradle
47
build.gradle
|
@ -27,7 +27,7 @@ repositories {
|
|||
maven { url 'https://jitpack.io' }
|
||||
maven { url 'https://maven.terraformersmc.com/releases' }
|
||||
maven { url = "https://maven.terraformersmc.com/" }
|
||||
maven { url "https://ladysnake.jfrog.io/artifactory/mods" }
|
||||
maven { url "https://maven.ladysnake.org/releases" }
|
||||
maven { url = "https://dvs1.progwml6.com/files/maven/" }
|
||||
maven { url = "https://modmaven.dev" }
|
||||
exclusiveContent {
|
||||
|
@ -97,8 +97,8 @@ dependencies {
|
|||
//needed for trinkets, otherwise BetterEnd would require users to install trinkets
|
||||
modApi "dev.onyxstudios.cardinal-components-api:cardinal-components-base:${project.cca_version}"
|
||||
modCompileOnly "dev.emi:trinkets:${project.trinkets_version}"
|
||||
modCompileOnly "dev.emi:emi:${emi_version}"
|
||||
//modRuntimeOnly "dev.emi:emi:${emi_version}"
|
||||
modCompileOnly "dev.emi:emi-fabric:${emi_version}:api"
|
||||
modLocalRuntime "dev.emi:emi-fabric:${emi_version}"
|
||||
}
|
||||
|
||||
processResources {
|
||||
|
@ -345,4 +345,43 @@ 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.modrinth_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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue