diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..03081f0 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1 @@ +Initial release \ No newline at end of file diff --git a/build.gradle b/build.gradle index 66caa54..408a754 100644 --- a/build.gradle +++ b/build.gradle @@ -2,6 +2,8 @@ plugins { id 'fabric-loom' version '1.0-SNAPSHOT' id 'maven-publish' id 'io.github.juuxel.loom-quiltflower' version '1.7.+' + id 'me.hypherionmc.cursegradle' version '2.+' + id "com.modrinth.minotaur" version "2.+" } version = project.mod_version @@ -92,3 +94,59 @@ publishing { // retrieving dependencies. } } + +import com.modrinth.minotaur.dependencies.ModDependency + +curseforge { + if (!file('./CHANGELOG.md').canRead()) { throw new FileNotFoundException("Could not read changelog file") } + apiKey = project.hasProperty("CURSEFORGE_TOKEN") ? project.CURSEFORGE_TOKEN : "" + project { + id = '699839' + changelog = file('./CHANGELOG.md') + changelogType = 'markdown' + releaseType = 'release' + accepted_minecraft_version.split(",").each { + addGameVersion it.trim() + } + + mainArtifact(remapJar) { + displayName = "${mod_version_friendly}" + relations { + requiredDependency 'fabric-api' + requiredDependency 'cloth-config' + optionalDependency 'modmenu' + } + } + } + options { + //debug = true + javaVersionAutoDetect = false + forgeGradleIntegration = false + } +} + +modrinth { + if (!file('./CHANGELOG.md').canRead()) { throw new FileNotFoundException("Could not read changelog file") } + token = project.hasProperty("MODRINTH_TOKEN") ? project.MODRINTH_TOKEN : "" + projectId = '3Ug95SjF' + versionNumber = "${mod_version}" + versionName = "${mod_version_friendly}" + changelog = file('./CHANGELOG.md').text + uploadFile = remapJar + accepted_minecraft_version.split(",").each { + gameVersions.add it.trim() + } + loaders = ['fabric', 'quilt'] + dependencies = [ + // https://modrinth.com/mod/fabric-api + new ModDependency('P7dR8mSH', 'required'), + // https://modrinth.com/mod/cloth-config + new ModDependency('9s6osm5g', 'required'), + ] + //debugMode = true +} + +task publishToModSites { + publishToModSites.dependsOn modrinth + publishToModSites.dependsOn curseforge +} diff --git a/docs/icon.png b/docs/icon.png index 1b9f759..f546fa0 100644 Binary files a/docs/icon.png and b/docs/icon.png differ diff --git a/gradle.properties b/gradle.properties index f1e51c6..8af2535 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,11 +4,13 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/develop minecraft_version=1.18.2 + accepted_minecraft_version=1.18,1.18.1,1.18.2 yarn_mappings=1.18.2+build.4 loader_version=0.14.10 # Mod Properties mod_version = 1.0+1.18 + mod_version_friendly = 1.0 for 1.18.2 maven_group = zone.oat archives_base_name = gmod-title-screen