diff --git a/README.md b/README.md index b85931a..e3c4d63 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,12 @@ -# Cicada +# CICADA -Cicada is a simple library for making Minecraft mods, primarily focused on inter-mod interactions. \ No newline at end of file +CICADA (proper backronym pending) is a library mod containing +general utilities and common abstractions I use in many of my mod projects. + +Some of its features include: + +- An api to facilitate inter-mod conversations in the game log. +- Other logging tomfoolery. +- A custom cloak renderer. +- A GSON based self-managed mod config template class. +- An abstract mixin plugin to facilitate compatibility mixins. diff --git a/build.gradle b/build.gradle index b18e364..685bc18 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,7 @@ plugins { id 'fabric-loom' version '1.4-SNAPSHOT' id 'maven-publish' + id "me.modmuss50.mod-publish-plugin" version "0.4.4" } sourceCompatibility = JavaVersion.VERSION_17 @@ -135,4 +136,72 @@ if (stonecutter.current().isActiveVersion()) { dependsOn tasks.getByName('build') } +} + +publishMods { + file = remapJar.archiveFile + displayName = "${property('mod.version')} for ${property('mod.target_nice')}" + version = project.version +// changelog = getRootProject().file("CHANGELOG.md").text + type = STABLE + modLoaders.add("fabric") + + def min = property('mod.target_min') + def max = property('mod.target_max') + + if (providers.gradleProperty('enjaraiModrinthToken').present) { + modrinth { + projectId = property('mod.modrinth') + accessToken = providers.gradleProperty('enjaraiModrinthToken').get() + + if (min == max) { + minecraftVersions.add(min) + } else { + minecraftVersionRange { + start = min + end = max + } + } + + requires { + slug = "fabric-api" + } + } + } + + if (providers.gradleProperty('enjaraiCurseforgeToken').present) { + curseforge { + projectId = property('mod.curseforge') + accessToken = providers.gradleProperty('enjaraiCurseforgeToken').get() + + if (min == max) { + minecraftVersions.add(min) + } else { + minecraftVersionRange { + start = min + end = max + } + } + + requires { + slug = "fabric-api" + } + } + } + + if (providers.gradleProperty('enjaraiGithubToken').present) { + github { + repository = property('mod.github') + accessToken = providers.gradleProperty('enjaraiGithubToken').get() + + commitish = "master" // property('git_branch') + tagName = project.version + } + } +} + +tasks.register('publishAll') { + group 'publishing' + dependsOn 'publish' + dependsOn 'publishMods' } \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 4e76cf9..65ecc07 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,8 +7,15 @@ mod.version=0.6.1 mod.name=cicada-lib mod.maven_group = nl.enjarai mod.target=[VERSIONED] +mod.target_min=[VERSIONED] +mod.target_max=[VERSIONED] +mod.target_nice=[VERSIONED] mod.jarname_target=[VERSIONED] +mod.modrinth=IwCkru1D +mod.curseforge=989574 +mod.github=enjarai/cicada-lib + # Dependencies # https://fabricmc.net/develop deps.yarn=[VERSIONED] diff --git a/img/icon-512x.png b/img/icon-512x.png new file mode 100644 index 0000000..e1eb341 Binary files /dev/null and b/img/icon-512x.png differ diff --git a/stonecutter.gradle b/stonecutter.gradle index 903b3c8..938174c 100644 --- a/stonecutter.gradle +++ b/stonecutter.gradle @@ -13,3 +13,9 @@ stonecutter.registerChiseled tasks.register("chiseledPublish", stonecutter.chise ofTask "publish" } + +stonecutter.registerChiseled tasks.register("chiseledPublishAll", stonecutter.chiseled) { + setGroup "project" + + ofTask "publishAll" +} diff --git a/versions/1.20.1/gradle.properties b/versions/1.20.1/gradle.properties index 60e7db7..e61fbfa 100644 --- a/versions/1.20.1/gradle.properties +++ b/versions/1.20.1/gradle.properties @@ -1,4 +1,7 @@ mod.target=<=1.20.1 -mod.jarname_target=1.20.1-minus +mod.target_min=1.16.5 +mod.target_max=1.20.1 +mod.target_nice=1.20.1 and below +mod.jarname_target=1.20.1-and-below deps.yarn=1.20.1+build.10 deps.fabric_api=0.87.0+1.20.1 diff --git a/versions/1.20.2/gradle.properties b/versions/1.20.2/gradle.properties index 9662ff1..082107d 100644 --- a/versions/1.20.2/gradle.properties +++ b/versions/1.20.2/gradle.properties @@ -1,4 +1,7 @@ mod.target=>=1.20.2 -mod.jarname_target=1.20.2-plus +mod.target_min=1.20.2 +mod.target_max=1.20.4 +mod.target_nice=1.20.2 and above +mod.jarname_target=1.20.2-and-above deps.yarn=1.20.2+build.4 deps.fabric_api=0.90.7+1.20.2