Files
CullLeaves/forge/build.gradle
Motschen 24f654fd67 CullLeaves 3.0.0 - Forge support & better Sodium compatibility
- Now utilizes the Architectury build system to provide support for Fabric, native Quilt and even Forge (No Architectury API needed!)
- Update to MidnightLib 1.0.0
- Better Sodium/Rubidium support:
   - Fix resourcepacks utilizing leaf culling flickering when using Sodium (Fixes #15)
   - Integrate Leaf Culling toggle into Sodium options screen
2022-11-12 18:38:52 +01:00

91 lines
2.3 KiB
Groovy

plugins {
id "com.github.johnrengelman.shadow" version "7.1.2"
}
architectury {
injectInjectables = false
platformSetupLoomIde()
forge()
}
loom {
forge {
mixinConfig "cullleaves.mixins.json"
}
}
repositories {
maven { url "https://api.modrinth.com/maven" }
}
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 + "-forge"
}
dependencies {
forge "net.minecraftforge:forge:${rootProject.forge_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}-forge"
include "maven.modrinth:midnightlib:${rootProject.midnightlib_version}-forge"
common(project(path: ":common", configuration: "namedElements")) { transitive false }
shadowCommon(project(path: ":common", configuration: "transformProductionForge")) { transitive = false }
}
processResources {
inputs.property "version", project.version
filesMatching("META-INF/mods.toml") {
expand "version": project.version
}
}
shadowJar {
exclude "fabric.mod.json"
exclude "architectury.common.json"
configurations = [project.configurations.shadowCommon]
classifier "dev-shadow"
}
remapJar {
input.set shadowJar.archiveFile
dependsOn shadowJar
classifier null
}
jar {
classifier "dev"
}
sourcesJar {
def commonSources = project(":common").sourcesJar
dependsOn commonSources
from commonSources.archiveFile.map { zipTree(it) }
}
components.java {
withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) {
skip()
}
}
publishing {
publications {
mavenForge(MavenPublication) {
artifactId = rootProject.archives_base_name + "-" + project.name
from components.java
}
}
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
}
}