mirror of
https://github.com/TeamMidnightDust/CullLeaves.git
synced 2025-12-13 05:15:10 +01:00
- Support Sodium 0.6+ - Allow resourcepacks to force culling and hide fully-encircled leaf blocks - Force leaf culling when the smart leaves pack is enabled - Reload world when the config changes - Only apply Sodium mixins when Sodium is actually installed (Removes log spam)
118 lines
3.6 KiB
Groovy
118 lines
3.6 KiB
Groovy
plugins {
|
|
id "com.github.johnrengelman.shadow" version "7.1.2"
|
|
id "me.shedaniel.unified-publishing"
|
|
}
|
|
|
|
architectury {
|
|
injectInjectables = false
|
|
platformSetupLoomIde()
|
|
neoForge()
|
|
}
|
|
|
|
loom {}
|
|
repositories {
|
|
maven { url "https://api.modrinth.com/maven" }
|
|
maven { url "https://maven.neoforged.net/releases" }
|
|
maven { url "https://maven.pkg.github.com/ims212/ForgifiedFabricAPI"
|
|
credentials {
|
|
username = "IMS212"
|
|
// Read only token
|
|
password = "ghp_" + "DEuGv0Z56vnSOYKLCXdsS9svK4nb9K39C1Hn"
|
|
}
|
|
}
|
|
maven{ url "https://maven.su5ed.dev/releases" }
|
|
}
|
|
|
|
configurations {
|
|
common
|
|
shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this.
|
|
compileClasspath.extendsFrom common
|
|
runtimeClasspath.extendsFrom common
|
|
developmentForge.extendsFrom common
|
|
archivesBaseName = rootProject.archives_base_name + "-neoforge"
|
|
}
|
|
|
|
dependencies {
|
|
neoForge "net.neoforged:neoforge:${rootProject.neoforge_version}"
|
|
// Remove the next line if you don't want to depend on the API
|
|
//modApi "dev.architectury:architectury-forge:${rootProject.architectury_version}"
|
|
modImplementation "maven.modrinth:midnightlib:${rootProject.midnightlib_version}-neoforge"
|
|
modImplementation "maven.modrinth:sodium:${rootProject.sodium_version}-neoforge"
|
|
//include "maven.modrinth:midnightlib:${rootProject.midnightlib_version}-forge"
|
|
|
|
common(project(path: ":common", configuration: "namedElements")) { transitive false }
|
|
shadowCommon(project(path: ":common", configuration: "transformProductionNeoForge")) { transitive = false }
|
|
}
|
|
|
|
processResources {
|
|
inputs.property "version", project.version
|
|
|
|
filesMatching("META-INF/neoforge.mods.toml") {
|
|
expand "version": project.version
|
|
}
|
|
}
|
|
|
|
shadowJar {
|
|
exclude "fabric.mod.json"
|
|
exclude "architectury.common.json"
|
|
|
|
configurations = [project.configurations.shadowCommon]
|
|
archiveClassifier = "dev-shadow"
|
|
}
|
|
|
|
remapJar {
|
|
input.set shadowJar.archiveFile
|
|
dependsOn shadowJar
|
|
}
|
|
|
|
sourcesJar {
|
|
def commonSources = project(":common").sourcesJar
|
|
dependsOn commonSources
|
|
from commonSources.archiveFile.map { zipTree(it) }
|
|
}
|
|
|
|
components.java {
|
|
withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) {
|
|
skip()
|
|
}
|
|
}
|
|
|
|
unifiedPublishing {
|
|
project {
|
|
displayName = "CullLeaves v$project.version - NeoForge $project.minecraft_version"
|
|
releaseType = "$project.release_type"
|
|
changelog = releaseChangelog()
|
|
gameVersions = []
|
|
gameLoaders = ["neoforge"]
|
|
|
|
mainPublication remapJar
|
|
|
|
relations {
|
|
depends {
|
|
curseforge = "midnightlib"
|
|
modrinth = "midnightlib"
|
|
}
|
|
includes {}
|
|
}
|
|
|
|
var CURSEFORGE_TOKEN = project.findProperty("CURSEFORGE_TOKEN") ?: System.getenv("CURSEFORGE_TOKEN")
|
|
if (CURSEFORGE_TOKEN != null) {
|
|
curseforge {
|
|
token = CURSEFORGE_TOKEN
|
|
id = rootProject.curseforge_id
|
|
gameVersions.addAll "Java 17", project.minecraft_version
|
|
releaseType = "alpha"
|
|
}
|
|
}
|
|
|
|
var MODRINTH_TOKEN = project.findProperty("MODRINTH_TOKEN") ?: System.getenv("MODRINTH_TOKEN")
|
|
if (MODRINTH_TOKEN != null) {
|
|
modrinth {
|
|
token = MODRINTH_TOKEN
|
|
id = rootProject.modrinth_id
|
|
version = "$project.version-$project.name"
|
|
gameVersions.addAll project.minecraft_version
|
|
}
|
|
}
|
|
}
|
|
} |