mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 14:38:48 +00:00
Use resource-factory instead of processResources for fabric & velocity meta
This commit is contained in:
7 files changed
+51
-84
No files matched your search
@@ -1,6 +1,9 @@
|
|||||||
# Compiled class file
|
# Compiled class file
|
||||||
*.class
|
*.class
|
||||||
|
|
||||||
|
# Kotlin temp files
|
||||||
|
.kotlin/
|
||||||
|
|
||||||
# Log file
|
# Log file
|
||||||
*.log
|
*.log
|
||||||
|
|
||||||
|
|||||||
+27
-9
@@ -1,9 +1,11 @@
|
|||||||
|
import xyz.jpenilla.resourcefactory.fabric.Environment
|
||||||
import java.util.function.Predicate
|
import java.util.function.Predicate
|
||||||
import kotlin.io.path.invariantSeparatorsPathString
|
import kotlin.io.path.invariantSeparatorsPathString
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("carbon.shadow-platform")
|
id("carbon.shadow-platform")
|
||||||
id("quiet-fabric-loom")
|
id("quiet-fabric-loom")
|
||||||
|
alias(libs.plugins.resource.factory.fabric.convention)
|
||||||
}
|
}
|
||||||
|
|
||||||
val shade: Configuration by configurations.creating
|
val shade: Configuration by configurations.creating
|
||||||
@@ -56,6 +58,31 @@ dependencies {
|
|||||||
runtimeDownload(libs.checkerQual)
|
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 {
|
carbonPlatform {
|
||||||
productionJar = tasks.remapJar.flatMap { it.archiveFile }
|
productionJar = tasks.remapJar.flatMap { it.archiveFile }
|
||||||
}
|
}
|
||||||
@@ -73,15 +100,6 @@ tasks {
|
|||||||
relocateGuice()
|
relocateGuice()
|
||||||
relocateDependency("org.checkerframework")
|
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 {
|
runServer {
|
||||||
dependsOn(shadowJar)
|
dependsOn(shadowJar)
|
||||||
|
|||||||
@@ -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": "*"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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" }
|
hangar-publish = { id = "io.papermc.hangar-publish-plugin", version = "0.1.3" }
|
||||||
indra-publishing-sonatype = { id = "net.kyori.indra.publishing.sonatype", version.ref = "indra" }
|
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" }
|
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]
|
[versions]
|
||||||
indra = "3.1.3"
|
indra = "3.1.3"
|
||||||
@@ -11,6 +15,7 @@ pluginYml = "0.5.3"
|
|||||||
mod-publish-plugin = "0.8.4"
|
mod-publish-plugin = "0.8.4"
|
||||||
gremlin = "0.0.7"
|
gremlin = "0.0.7"
|
||||||
runTask = "2.3.1"
|
runTask = "2.3.1"
|
||||||
|
resource-factory = "1.2.1"
|
||||||
|
|
||||||
adventure = "4.17.0"
|
adventure = "4.17.0"
|
||||||
cloud = "2.0.0"
|
cloud = "2.0.0"
|
||||||
|
|||||||
@@ -3,9 +3,8 @@ import xyz.jpenilla.runpaper.task.RunServer
|
|||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("carbon.shadow-platform")
|
id("carbon.shadow-platform")
|
||||||
id("xyz.jpenilla.resource-factory") version "1.2.1"
|
alias(libs.plugins.resource.factory.paper.convention)
|
||||||
id("xyz.jpenilla.resource-factory-paper-convention") version "1.2.1"
|
alias(libs.plugins.resource.factory.bukkit.convention)
|
||||||
id("xyz.jpenilla.resource-factory-bukkit-convention") version "1.2.1"
|
|
||||||
id("xyz.jpenilla.run-paper")
|
id("xyz.jpenilla.run-paper")
|
||||||
id("carbon.permissions")
|
id("carbon.permissions")
|
||||||
id("carbon.configurable-plugins")
|
id("carbon.configurable-plugins")
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
|||||||
plugins {
|
plugins {
|
||||||
id("carbon.shadow-platform")
|
id("carbon.shadow-platform")
|
||||||
id("xyz.jpenilla.run-velocity")
|
id("xyz.jpenilla.run-velocity")
|
||||||
|
alias(libs.plugins.resource.factory.velocity.convention)
|
||||||
}
|
}
|
||||||
|
|
||||||
val bstats: Configuration by configurations.creating
|
val bstats: Configuration by configurations.creating
|
||||||
@@ -24,6 +25,19 @@ dependencies {
|
|||||||
compileOnly("javax.inject:javax.inject:1")
|
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 {
|
gremlin {
|
||||||
defaultJarRelocatorDependencies.set(true)
|
defaultJarRelocatorDependencies.set(true)
|
||||||
}
|
}
|
||||||
@@ -65,15 +79,6 @@ tasks {
|
|||||||
github("MiniPlaceholders", "MiniPlaceholders", libs.versions.miniplaceholders.get(), "MiniPlaceholders-Velocity-${libs.versions.miniplaceholders.get()}.jar")
|
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 {
|
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"
|
|
||||||
}
|
|
||||||
Reference in new issue
Block a user