Fix buildscript for Modrinth publishing.

This commit is contained in:
LambdAurora
2021-06-23 14:32:20 +02:00
parent a1773cc0d9
commit 666a9dd112

View File

@@ -41,6 +41,16 @@ String getMCVersionString() {
return version[0] + '.' + version[1]
}
String parseReadme() {
def excludeRegex = /(?m)<!-- modrinth_exclude\.start -->(.|\n)*?<!-- modrinth_exclude\.end -->/
def linkRegex = /!\[([A-z_ ]+)]\((images\/[A-z.\/_]+)\)/
def readme = (String) file('README.md').text
readme = readme.replaceAll(excludeRegex, '')
readme = readme.replaceAll(linkRegex, '![$1](https://raw.githubusercontent.com/LambdAurora/LambdaControls/1.17/$2)')
return readme
}
minecraft {
accessWidener file('src/main/resources/lambdacontrols.accesswidener')
}