diff options
| author | Aizistral | 2023-01-02 23:01:18 +0100 |
|---|---|---|
| committer | Aizistral | 2023-01-02 23:01:18 +0100 |
| commit | 8cbf11042c18ee0983b9c8ea6194f81d766a9dd8 (patch) | |
| tree | 5258f73b5aaa1ee8f30da87ce89a499f82d5dbe3 | |
| parent | 5ab383f021154238b3e0432e61dace32b5292a2d (diff) | |
Deduplicate gradle properties
| -rw-r--r-- | build.gradle | 21 | ||||
| -rw-r--r-- | forge/build.gradle | 34 | ||||
| -rw-r--r-- | forge/docs/META-INF/mods.toml | 2 | ||||
| -rw-r--r-- | forge/gradle.properties | 33 | ||||
| -rw-r--r-- | gradle.properties | 25 | ||||
| -rw-r--r-- | src/main/resources/fabric.mod.json | 24 |
6 files changed, 70 insertions, 69 deletions
diff --git a/build.gradle b/build.gradle index 1b12015..754dd09 100644 --- a/build.gradle +++ b/build.gradle @@ -72,7 +72,7 @@ repositories { dependencies { minecraft "com.mojang:minecraft:${project.minecraft_version}" mappings loom.officialMojangMappings() - modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" + modImplementation "net.fabricmc:fabric-loader:${project.fabric_loader_version}" modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" modImplementation "com.terraformersmc:modmenu:${project.mod_menu_version}" modApi("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config_version}") { @@ -92,7 +92,24 @@ processResources { inputs.property "version", project.version filesMatching("fabric.mod.json") { - expand "version": project.version + expand 'mod_license': mod_license, + 'version': version, + 'mod_id' : mod_id, + 'mod_name': mod_name, + 'mod_url': mod_url, + 'mod_author': mod_author, + 'mod_icon': mod_icon, + 'mod_description': mod_description, + 'issue_tracker_url': issue_tracker_url, + 'contributor_0': contributor_0 + } + + from("${rootProject.projectDir}/docs") { + include 'changelog.html' + } + + from("${rootProject.projectDir}") { + include 'LICENSE' } } diff --git a/forge/build.gradle b/forge/build.gradle index ef086c8..220ed09 100644 --- a/forge/build.gradle +++ b/forge/build.gradle @@ -42,8 +42,8 @@ apply from: '../common.gradle' println("Specifying project version/group/archivesBaseName...") version = "${mod_version}" -group = "${mod_group}" -archivesBaseName = "${mod_archives_name}" +group = "${maven_group}" +archivesBaseName = "${archives_base_name}" println("Specifying Java compatibility...") java.toolchain.languageVersion = JavaLanguageVersion.of(17) @@ -66,7 +66,7 @@ mixin { minecraft { println("Specifying MCP mappings...") - mappings channel: 'official', version: project.version_mc + mappings channel: 'official', version: minecraft_version println("Specifying Access Transformer configuration...") accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') @@ -121,7 +121,7 @@ dependencies { println("Processing dependencies...") // Minecraft & Forge - minecraft "net.minecraftforge:forge:${version_forge}" + minecraft "net.minecraftforge:forge:${forge_version}" annotationProcessor 'org.spongepowered:mixin:0.8.5:processor' } @@ -133,9 +133,9 @@ jar { attributes([ "Specification-Title": "${mod_name}", "Specification-Vendor": "${mod_author}", - "Specification-Version": "${mod_version}", + "Specification-Version": "${version}", "Implementation-Title": "${mod_name}", - "Implementation-Version": "${mod_version}", + "Implementation-Version": "${version}", "Implementation-Vendor" :"${mod_author}", "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"), "MixinConfigs": "mixins/common/nochatreports.mixins.json, mixins/forge/nochatreports-forge.mixins.json" @@ -154,25 +154,25 @@ processResources { // Replace properties in mods.toml with ones derived from settings.gradle include 'mods.toml' expand 'mod_license': mod_license, - 'mod_version': project.version, + 'mod_version': version, 'mod_id' : mod_id, 'mod_name': mod_name, 'mod_url': mod_url, 'mod_author': mod_author, - 'mod_description': mod_description, 'mod_icon': mod_icon, - 'issue_tracker_url': issue_tracker_url, - 'mod_credits': mod_credits, + 'mod_description': mod_description, + 'issue_tracker_url': issue_tracker_url, 'dep_forge': dep_forge, - 'dep_minecraft': dep_minecraft + 'dep_minecraft': dep_minecraft, + 'contributor_0': contributor_0 into 'META-INF' } - from("${project.projectDir}/docs") { + from("${rootProject.projectDir}/docs") { include 'changelog.html' } - from("${project.projectDir}") { + from("${rootProject.projectDir}") { include 'LICENSE' } } @@ -186,11 +186,11 @@ curseforge { apiKey = findProperty('curseKey') ?: 'none' id = "${curse_id}" - releaseType = "${curse_release}" + releaseType = "${version_type}" changelogType = 'html' changelog = file('docs/changelog.html') - addGameVersion project.version_mc + addGameVersion project.minecraft_version addGameVersion 'Java 17' addGameVersion 'Forge' @@ -204,10 +204,10 @@ modrinth { projectId = "no-chat-reports" versionNumber = "Forge-" + project.version versionName = "No Chat Reports Forge-" + project.version - versionType = "release" + versionType = "${version_type}" changelog = rootProject.file("docs/changelog.html").text uploadFile = jar - gameVersions = [ project.version_mc ] + gameVersions = [ project.minecraft_version ] //syncBodyFrom = rootProject.file("docs/README.md").text } diff --git a/forge/docs/META-INF/mods.toml b/forge/docs/META-INF/mods.toml index fa54dec..e533f72 100644 --- a/forge/docs/META-INF/mods.toml +++ b/forge/docs/META-INF/mods.toml @@ -8,7 +8,7 @@ version="${mod_version}" displayName="${mod_name}" displayURL="${mod_url}" logoFile="${mod_icon}" -credits="${mod_credits}" +credits="${contributor_0}" authors="${mod_author}" description=''' ${mod_description} diff --git a/forge/gradle.properties b/forge/gradle.properties index 51d7f1d..697a48c 100644 --- a/forge/gradle.properties +++ b/forge/gradle.properties @@ -1,32 +1 @@ -# Gradle -org.gradle.jvmargs=-Xmx4G -org.gradle.daemon=false - -# Mod -mod_version=1.19.3-v2.0.0 -mod_group=com.aizistral.nochatreports -mod_id=nochatreports -mod_name=No Chat Reports -mod_archives_name=NoChatReports-FORGE -mod_url=https://www.curseforge.com/minecraft/mc-mods/no-chat-reports -issue_tracker_url=https://github.com/Aizistral-Studious/No-Chat-Reports/issues -mod_author=Aizistral - -mod_description=Simple mod that disables chat reports. -mod_credits=Me, for making such an amazing mod. - -mod_icon=NCR_logo.png -mod_license=WTFPL - -# Dependency specifications for mods.toml -dep_forge=[37,) -dep_minecraft=[1.19.3,) - -# Dependencies specifications for build.gradle -version_mc=1.19.3 -version_forge=1.19.3-44.0.48 -version_mcp=1.19.3 - -# CurseGradle -curse_id=634062 -curse_release=release
\ No newline at end of file +archives_base_name=NoChatReports-FORGE
\ No newline at end of file diff --git a/gradle.properties b/gradle.properties index d0b820d..014926d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,23 +1,38 @@ -# Done to increase the memory available to gradle. -org.gradle.jvmargs=-Xmx2G +# Gradle +org.gradle.jvmargs=-Xmx4G org.gradle.daemon=false -# Fabric Properties -# check these on https://fabricmc.net/develop +# Toolchain Properties minecraft_version=1.19.3 yarn_mappings=1.19.3+build.1 -loader_version=0.14.11 +fabric_loader_version=0.14.11 +forge_version=1.19.3-44.0.48 # Mod Properties mod_version=1.19.3-v2.0.0 maven_group=com.aizistral.nochatreports archives_base_name=NoChatReports-FABRIC +mod_id=nochatreports +mod_name=No Chat Reports +mod_url=https://www.curseforge.com/minecraft/mc-mods/no-chat-reports +issue_tracker_url=https://github.com/Aizistral-Studious/No-Chat-Reports/issues +mod_author=Aizistral +mod_description=Strips cryptographic signatures from player messages, making it impossible to track and associate them with your Mojang/Microsoft account, as well as use Player Chat Reporting feature. +mod_icon=assets/nochatreports/textures/misc/NCR_logo.png +mod_license=WTFPL # Dependencies fabric_version=0.68.1+1.19.3 mod_menu_version=5.0.0-alpha.4 cloth_config_version=9.0.93 +# Dependencies in mods.toml +dep_forge=[37,) +dep_minecraft=[1.19.3,) + # Publishing curse_id=634062 version_type=release + +#Contributors +contributor_0=Madis0 (aka robotkoer) diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 6bb6423..6205ff2 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -3,22 +3,22 @@ "id": "nochatreports", "version": "${version}", - "name": "No Chat Reports", - "description": "Strips cryptographic signatures from player messages, making it impossible to track and associate them with your Mojang/Microsoft account, as well as use Player Chat Reporting feature.", + "name": "${mod_name}", + "description": "${mod_description}", "authors": [ - "Aizistral" + "${mod_author}" ], "contributors": [ - "Madis0 (aka robotkoer)" + "${contributor_0}" ], "contact": { - "homepage": "https://www.curseforge.com/minecraft/mc-mods/no-chat-reports", - "sources": "https://github.com/Aizistral-Studios/No-Chat-Reports", - "issues": "https://github.com/Aizistral-Studios/No-Chat-Reports/issues" + "homepage": "${mod_url}", + "sources": "${mod_url}", + "issues": "${issue_tracker_url}" }, - "license": "WTFPL", - "icon": "assets/nochatreports/textures/misc/NCR_logo.png", + "license": "${mod_license}", + "icon": "${mod_icon}", "environment": "*", "entrypoints": { @@ -43,7 +43,7 @@ "fabric-screen-api-v1": "*", "fabric-rendering-v1": "*", "fabric-resource-loader-v0": "*", - "minecraft": [ ">=1.19.3-alpha.22.44.a" ], + "minecraft": [ ">=1.19.3" ], "java": ">=17" }, "suggests": {}, @@ -52,8 +52,8 @@ "custom": { "modmenu": { "links": { - "modmenu.modrinth": "https://modrinth.com/mod/no-chat-reports", - "modmenu.curseforge": "https://www.curseforge.com/minecraft/mc-mods/no-chat-reports" + "modmenu.modrinth": "${mod_url}", + "modmenu.curseforge": "${issue_tracker_url}" } } } |
