Skip to content

Commit

Permalink
Add authors filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
Protonull authored and Gjum committed Apr 22, 2024
1 parent 407d7a6 commit 0b69262
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
8 changes: 8 additions & 0 deletions mod/fabric/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import groovy.json.JsonBuilder

plugins {
id "com.github.johnrengelman.shadow" version "7.1.2"
}
Expand Down Expand Up @@ -29,6 +31,12 @@ dependencies {
processResources {
filesMatching("fabric.mod.json") {
expand(rootProject.properties)
filter {
(it as String).replace(
"\"%FABRIC_AUTHORS_ARRAY%\"",
new JsonBuilder((rootProject.properties["mod_authors"] as String).tokenize(",")).toString()
)
}
}
}

Expand Down
5 changes: 1 addition & 4 deletions mod/fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
"version": "${mod_version}",
"name": "${mod_display_name}",
"description": "${mod_description}",
"authors": [
"Gjum",
"Protonull"
],
"authors": "%FABRIC_AUTHORS_ARRAY%",
"contact": {
"homepage": "${mod_home_url}",
"sources": "${mod_source_url}",
Expand Down
2 changes: 1 addition & 1 deletion mod/forge/src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ version = "${mod_version}"
displayName = "${mod_display_name}"
description = "${mod_description}"
displayURL = "${mod_home_url}"
authors = "Gjum,Protonull"
authors = "${mod_authors}"
#logoFile = ""

[[dependencies.mapsync]]
Expand Down
1 change: 1 addition & 0 deletions mod/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ maven_group=gjum.minecraft.mapsync
mod_version=2.0.1-1.18.2
mod_display_name=MapSync
mod_description=Share map data with your friends, live, and privately.
mod_authors=Gjum,Protonull,okx,Huskydog9988,specificlanguage,SirAlador,klaribot
copyright_licence=GPLv3
mod_home_url=https://github.com/CivPlatform/map-sync
mod_source_url=https://github.com/CivPlatform/map-sync
Expand Down

0 comments on commit 0b69262

Please sign in to comment.