Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
**/.git/
**/dist/
**/*.sqlite
/mod
/mapsync-mod
/notes
/data
3 changes: 0 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ insert_final_newline = true
indent_style = tab
indent_size = 4

[*.bat]
end_of_line = crlf

[*.{yml,yaml}]
indent_style = space
indent_size = 2
43 changes: 20 additions & 23 deletions .github/workflows/build-mod.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,42 @@
name: Build Mod
name: "Build Mod"

on:
push:
paths:
- "mod/**/*"
- "mapsync-mod/**/*"
pull_request:
paths:
- "mod/**/*"
- "mapsync-mod/**/*"

jobs:
build:
runs-on: ubuntu-latest
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
- uses: "actions/checkout@v6"

- name: "Set up JDK 21"
uses: "actions/setup-java@v5"
with:
java-version: "21"
distribution: "adopt"
- run: ./gradlew build
working-directory: ./mod

- name: Upload Forge Build
uses: actions/upload-artifact@v4
with:
name: Forge
path: mod/dist/*-forge.jar
- name: "Compile mod"
run: "./gradlew build"
working-directory: "./mapsync-mod"

- name: Upload Fabric Build
uses: actions/upload-artifact@v4
- name: "Upload Build"
uses: "actions/upload-artifact@v7"
with:
name: Fabric
path: mod/dist/*-fabric.jar
name: "Fabric"
path: "mapsync-mod/dist/*.jar"

- name: Release Tag
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
- name: "Release Tag"
if: "startsWith(github.ref, 'refs/tags/v')"
uses: "softprops/action-gh-release@v2"
with:
prerelease: true
fail_on_unmatched_files: true
files: |
mod/dist/*.jar
mapsync-mod/dist/*.jar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
10 changes: 5 additions & 5 deletions .github/workflows/build-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Build+Test Server
on:
push:
paths:
- "server/**/*"
- "mapsync-server/**/*"
pull_request:
paths:
- "server/**/*"
- "mapsync-server/**/*"

jobs:
build:
Expand All @@ -18,8 +18,8 @@ jobs:
with:
node-version: "18"
- run: npm install
working-directory: ./server
working-directory: ./mapsync-server
- run: npm run build
working-directory: ./server
working-directory: ./mapsync-server
- run: npm run test
working-directory: ./server
working-directory: ./mapsync-server
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ FROM node:18-alpine AS base
WORKDIR /usr/src/app/

# contains various scripts, so include in all images
COPY ./server/package.json /usr/src/app/package.json
COPY ./mapsync-server/package.json /usr/src/app/package.json

FROM base AS build

COPY ./server/package-lock.json /usr/src/app/package-lock.json
COPY ./mapsync-server/package-lock.json /usr/src/app/package-lock.json
RUN npm install

# copy source as late as possible, to reuse docker cache with node_modules
COPY ./server /usr/src/app
COPY ./mapsync-server /usr/src/app
RUN npm run build

FROM build AS test
Expand Down
3 changes: 3 additions & 0 deletions mod/.editorconfig → mapsync-mod/.editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# https://editorconfig.org

[*.bat]
end_of_line = crlf

[*.const]
insert_final_newline = false
File renamed without changes.
107 changes: 107 additions & 0 deletions mapsync-mod/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
plugins {
alias(libs.plugins.fabricLoom)
}

private val mod_name = project.property("mod_name").toString()
version = "${project.property("mod_version")}-${libs.versions.minecraft.get()}"

base {
archivesName = project.property("archives_base_name").toString()
}

dependencies {
minecraft(libs.minecraft)
loom {
mappings(layered {
officialMojangMappings()
parchment(libs.parchment)
})
}
modImplementation(libs.fabricLoader)
modImplementation(libs.fabricApi)
modLocalRuntime(libs.fixChat)
modImplementation(libs.modmenu)

modImplementation(libs.voxelmap)
modCompileOnly(libs.journeymap)
modCompileOnly(libs.xaerosmap)
}

repositories {
maven(url = "https://maven.parchmentmc.org") {
name = "ParchmentMC"
}
maven(url = "https://api.modrinth.com/maven") {
name = "Modrinth"
content {
includeGroup("maven.modrinth")
}
}
mavenCentral()
}

java {
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}

tasks {
compileJava {
options.encoding = "UTF-8"
options.release = 21
}
jar {
from(file("../LICENSE")) {
rename { "LICENSE_${mod_name}" }
}
}
processResources {
val expansions: Map<String, Any> = buildMap {
put("mod_name", mod_name)
put("mod_version", project.version)
putAll(listOf(
"mod_description",
"copyright_licence",
"mod_home_url",
"mod_source_url",
"mod_issues_url"
).associateWith { project.property(it).toString() })
put("minecraft_version", libs.versions.minecraft.get())
put("fabric_loader_version", libs.versions.fabricLoader.get())
}
inputs.properties(expansions)
filesMatching("fabric.mod.json") {
expand(expansions)
filter {
it.replace(
"\"%FABRIC_AUTHORS_ARRAY%\"",
groovy.json.JsonBuilder(project.property("mod_authors").toString().split(",")).toString()
)
}
}
filesMatching("assets/mapsync/lang/en_us.json") {
expand(expansions)
}
filesMatching("mapsync.version.const") {
expand(expansions)
}
}
val distDir = file("./dist")
val cleanDistDir = register<Delete>("cleanDistDir") {
delete(fileTree(distDir) {
include("*.jar")
})
}
val copyDistJar = register<Copy>("copyDistJar") {
dependsOn(cleanDistDir)
from(remapJar)
into(distDir)
}
build {
dependsOn(copyDistJar)
}
}
20 changes: 2 additions & 18 deletions mod/gradle.properties → mapsync-mod/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,11 @@ org.gradle.jvmargs=-Xmx2048M

archives_base_name=MapSync
maven_group=gjum.minecraft.mapsync
mod_version=2.1.0-1.21.11
mod_display_name=MapSync
mod_version=2.2.0-SNAPSHOT
mod_name=MapSync
mod_description=Real-time terrain synchronization: See exactly what your friends see, as they explore it.
mod_authors=Gjum,Protonull,okx,Huskydog9988,specificlanguage,SirAlador,klaribot,Sheepy_9
copyright_licence=GPLv3
mod_home_url=https://github.com/CivPlatform/map-sync
mod_source_url=https://github.com/CivPlatform/map-sync
mod_issues_url=https://github.com/CivPlatform/map-sync/issues

minecraft_version=1.21.11
# https://parchmentmc.org/docs/getting-started
parchment_name=parchment-1.21.11
parchment_version=2025.12.20
enabled_platforms=fabric

# https://fabricmc.net/versions.html
fabric_loader_version=0.18.4
fabric_api_version=0.141.3+1.21.11

forge_version=1.21.1-61.1.1
forge_major_version=61

# Architectuy Loom 1.14 is not available for JM 6.0.0
loom.ignoreDependencyLoomVersionValidation=true
27 changes: 27 additions & 0 deletions mapsync-mod/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[versions]
minecraft = "1.21.11"
# https://fabricmc.net/versions.html
fabricLoom = "1.15-SNAPSHOT"
fabricLoader = "0.18.4"
fabricApi = "0.141.3+1.21.11"

[libraries]
minecraft = { group = "com.mojang", name = "minecraft", version.ref = "minecraft" }
fabricLoader = { group = "net.fabricmc", name = "fabric-loader", version.ref = "fabricLoader" }
fabricApi = { group = "net.fabricmc.fabric-api", name = "fabric-api", version.ref = "fabricApi" }
# https://parchmentmc.org/docs/getting-started
parchment = { group = "org.parchmentmc.data", name = "parchment-1.21.11", version = "2025.12.20" }
# This is literally only here to make Minecraft SHUT UP about non-signed messages while testing.
# https://modrinth.com/mod/no-chat-reports/versions?l=fabric
fixChat = { group = "maven.modrinth", name = "no-chat-reports", version = "rhykGstm" }
# https://modrinth.com/mod/modmenu/versions?l=fabric
modmenu = { group = "maven.modrinth", name = "modmenu", version = "JWQVh32x" }
# https://modrinth.com/mod/voxelmap-updated/versions?l=fabric
voxelmap = { group = "maven.modrinth", name = "voxelmap-updated", version = "KgOVU4rn" }
# https://modrinth.com/mod/journeymap/versions?l=fabric
journeymap = { group = "maven.modrinth", name = "journeymap", version = "6vu2HyQi" }
# https://modrinth.com/mod/xaeros-world-map/versions?l=fabric
xaerosmap = { group = "maven.modrinth", name = "xaeros-world-map", version = "CkZVhVE0" }

[plugins]
fabricLoom = { id = "fabric-loom", version.ref = "fabricLoom" }
Binary file added mapsync-mod/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
14 changes: 5 additions & 9 deletions mod/gradlew → mapsync-mod/gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading