Skip to content

Commit

Permalink
move meta to properties
Browse files Browse the repository at this point in the history
  • Loading branch information
sisby-folk committed Jul 26, 2024
1 parent 17b3df5 commit a031fb2
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 34 deletions.
31 changes: 19 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ plugins {
alias libs.plugins.loom
}

version = "$project.baseVersion+$project.branch"
group = "dev.hephaestus"
version = "$baseVersion+$branch"

repositories {
maven { url "https://maven.nucleoid.xyz/" }
Expand All @@ -29,17 +28,25 @@ loom {
}

processResources {
final Map<String, String> map = [
"version" : version.toString(),
"mc" : libs.versions.mc.get(),
"fl" : libs.versions.fl.get(),
"fapi" : libs.versions.fapi.get(),
"placeholder": libs.versions.placeholder.get(),
"polydex" : libs.versions.polydex.get()
final Map<String, String> meta = [
version : version,
id : id,
name : name,
homepage : homepage,
issues : issues,
sources : sources,
license : license,
authors : authors.split(", ").join("\",\n \""),
contributors: contributors.split(", ").join("\",\n \""),
description : description,
mc : libs.versions.mc.get(),
fl : libs.versions.fl.get(),
fapi : libs.versions.fapi.get(),
placeholder : libs.versions.placeholder.get(),
polydex : libs.versions.polydex.get()
]

inputs.properties(map)
filesMatching("*.mod.json") { expand(map) }
inputs.properties meta
filesMatching("fabric.mod.json") { expand meta }
}

tasks.withType(JavaCompile).configureEach {
Expand Down
24 changes: 19 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
# Gradle Properties
# Gradle
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.caching=true
org.gradle.parallel=true
org.gradle.caching.debug=false
org.gradle.configureondemand=true
# Enable advanced multi-module optimizations (share tiny-remaper instance between projects)

# Loom
fabric.loom.multiProjectOptimisation=true
# Mod Properties
baseVersion = 1.3.2
branch = 1.21

# Mod Metadata
group=dev.hephaestus
id=glowcase
name=Glowcase
description=Blocks for showcasing mods!
authors=HavenKing, ModFest
contributors=quaternary, maximumpower55, LemmaEOF, TheEpicBlock, acikek, comp500, Patbox, AmyMialee
homepage=https://modrinth.com/mod/glowcase
issues=https://github.com/modfest/glowcase/issues
sources=https://github.com/modfest/glowcase
license=CC0-1.0

# Mod Version
baseVersion=1.3.2
branch=1.21
26 changes: 9 additions & 17 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,22 @@
{
"schemaVersion": 1,
"id": "glowcase",
"id": "${id}",
"version": "${version}",
"name": "Glowcase",
"description": "Blocks for showcasing mods!",
"name": "${name}",
"description": "${description}",
"authors": [
"HavenKing",
"ModFest"
"${authors}"
],
"contributors": [
"quaternary",
"maximumpower55",
"LemmaEOF",
"TheEpicBlock",
"acikek",
"comp500",
"Patbox",
"AmyMialee"
"${contributors}"
],
"contact": {
"homepage": "https://modrinth.com/mod/glowcase",
"issues": "https://github.com/modfest/glowcase/issues",
"sources": "https://github.com/modfest/glowcase"
"homepage": "${homepage}",
"issues": "${issues}",
"sources": "${sources}"
},
"icon": "assets/glowcase/icon.png",
"license": "CC0-1.0",
"license": "${license}",
"entrypoints": {
"main": [
"dev.hephaestus.glowcase.Glowcase"
Expand Down

0 comments on commit a031fb2

Please sign in to comment.