Use resource-factory instead of processResources for fabric & velocity meta

This commit is contained in:
Jason Penilla committed 2025-04-30 14:42:21 -07:00
1 parent 4c731090e0
commit d516736d21
7 files changed
+51 -84

No files matched your search

+3
View File
@@ -1,6 +1,9 @@
# Compiled class file
*.class
# Kotlin temp files
.kotlin/
# Log file
*.log
+27 -9
View File
@@ -1,9 +1,11 @@
import xyz.jpenilla.resourcefactory.fabric.Environment
import java.util.function.Predicate
import kotlin.io.path.invariantSeparatorsPathString
plugins {
id("carbon.shadow-platform")
id("quiet-fabric-loom")
alias(libs.plugins.resource.factory.fabric.convention)
}
val shade: Configuration by configurations.creating
@@ -56,6 +58,31 @@ dependencies {
runtimeDownload(libs.checkerQual)
}
fabricModJson {
id = rootProject.name.lowercase()
name = rootProject.name
version = project.version.toString()
description = project.description
author("Draycia")
author("jmp")
contact {
homepage = GITHUB_REPO_URL
sources = GITHUB_REPO_URL
issues = "$GITHUB_REPO_URL/issues"
}
license("GPLv3")
environment = Environment.ANY
mainEntrypoint("net.draycia.carbon.fabric.CarbonFabricBootstrap")
mixin("carbonchat.mixins.json")
depends("fabricloader", ">=" + libs.versions.fabricLoader.get())
depends("fabric-api", "*")
depends("cloud", "*")
depends("adventure-platform-fabric", "*")
depends("minecraft", libs.versions.minecraft.get())
depends("luckperms", ">=5.0.0")
suggests("miniplaceholders", "*")
}
carbonPlatform {
productionJar = tasks.remapJar.flatMap { it.archiveFile }
}
@@ -73,15 +100,6 @@ tasks {
relocateGuice()
relocateDependency("org.checkerframework")
}
processResources {
replace("fabric.mod.json", mapOf(
"modId" to rootProject.name.lowercase(),
"name" to rootProject.name,
"version" to project.version,
"description" to project.description,
"github_url" to GITHUB_REPO_URL
))
}
runServer {
dependsOn(shadowJar)
-37
View File
@@ -1,37 +0,0 @@
{
"schemaVersion": 1,
"id": "${modId}",
"version": "${version}",
"name": "${name}",
"description": "${description}",
"authors": [
"Draycia",
"jmp"
],
"contact": {
"homepage": "${github_url}",
"sources": "${github_url}",
"issues": "${github_url}/issues"
},
"license": "GPLv3",
"environment": "*",
"entrypoints": {
"main": [
"net.draycia.carbon.fabric.CarbonFabricBootstrap"
]
},
"mixins": [
"carbonchat.mixins.json"
],
"depends": {
"fabricloader": ">=0.16.5",
"fabric": "*",
"cloud": "*",
"adventure-platform-fabric": "*",
"minecraft": ">=1.21 <=1.21.1",
"luckperms": ">=5.0.0"
},
"suggests": {
"miniplaceholders": "*"
}
}
+5
View File
@@ -3,6 +3,10 @@ sponge-gradle = { id = "org.spongepowered.gradle.plugin", version = "2.3.0" }
hangar-publish = { id = "io.papermc.hangar-publish-plugin", version = "0.1.3" }
indra-publishing-sonatype = { id = "net.kyori.indra.publishing.sonatype", version.ref = "indra" }
javadoc-links = { id = "org.incendo.cloud-build-logic.javadoc-links", version = "0.0.16" }
resource-factory-paper-convention = { id = "xyz.jpenilla.resource-factory-paper-convention", version.ref = "resource-factory" }
resource-factory-bukkit-convention = { id = "xyz.jpenilla.resource-factory-bukkit-convention", version.ref = "resource-factory" }
resource-factory-velocity-convention = { id = "xyz.jpenilla.resource-factory-velocity-convention", version.ref = "resource-factory" }
resource-factory-fabric-convention = { id = "xyz.jpenilla.resource-factory-fabric-convention", version.ref = "resource-factory" }
[versions]
indra = "3.1.3"
@@ -11,6 +15,7 @@ pluginYml = "0.5.3"
mod-publish-plugin = "0.8.4"
gremlin = "0.0.7"
runTask = "2.3.1"
resource-factory = "1.2.1"
adventure = "4.17.0"
cloud = "2.0.0"
+2 -3
View File
@@ -3,9 +3,8 @@ import xyz.jpenilla.runpaper.task.RunServer
plugins {
id("carbon.shadow-platform")
id("xyz.jpenilla.resource-factory") version "1.2.1"
id("xyz.jpenilla.resource-factory-paper-convention") version "1.2.1"
id("xyz.jpenilla.resource-factory-bukkit-convention") version "1.2.1"
alias(libs.plugins.resource.factory.paper.convention)
alias(libs.plugins.resource.factory.bukkit.convention)
id("xyz.jpenilla.run-paper")
id("carbon.permissions")
id("carbon.configurable-plugins")
+14 -9
View File
@@ -3,6 +3,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
id("carbon.shadow-platform")
id("xyz.jpenilla.run-velocity")
alias(libs.plugins.resource.factory.velocity.convention)
}
val bstats: Configuration by configurations.creating
@@ -24,6 +25,19 @@ dependencies {
compileOnly("javax.inject:javax.inject:1")
}
velocityPluginJson {
id = rootProject.name.lowercase()
main = "net.draycia.carbon.velocity.CarbonVelocityBootstrap"
name = rootProject.name
version = project.version.toString()
description = project.description
url = GITHUB_REPO_URL
authors = listOf("Draycia", "jmp")
dependency("luckperms", false)
dependency("miniplaceholders", true)
dependency("signedvelocity", true)
}
gremlin {
defaultJarRelocatorDependencies.set(true)
}
@@ -65,15 +79,6 @@ tasks {
github("MiniPlaceholders", "MiniPlaceholders", libs.versions.miniplaceholders.get(), "MiniPlaceholders-Velocity-${libs.versions.miniplaceholders.get()}.jar")
}
}
processResources {
replace("velocity-plugin.json", mapOf(
"id" to rootProject.name.lowercase(),
"name" to rootProject.name,
"version" to project.version,
"description" to project.description,
"url" to GITHUB_REPO_URL
))
}
}
publishMods.modrinth {
@@ -1,26 +0,0 @@
{
"id": "${id}",
"name": "${name}",
"version": "${version}",
"description": "${description}",
"url": "${url}",
"authors": [
"Draycia",
"jmp"
],
"dependencies": [
{
"id": "luckperms",
"optional": false
},
{
"id": "miniplaceholders",
"optional": true
},
{
"id": "signedvelocity",
"optional": true
}
],
"main": "net.draycia.carbon.velocity.CarbonVelocityBootstrap"
}