mirror of
https://github.com/TeamMidnightDust/MidnightLib.git
synced 2025-12-15 17:05:09 +01:00
fix NeoForge for 1.20.5/6
This commit is contained in:
@@ -1,10 +1,15 @@
|
||||
plugins {
|
||||
id "com.github.johnrengelman.shadow" version "7.1.2"
|
||||
id 'com.github.johnrengelman.shadow'
|
||||
}
|
||||
repositories{
|
||||
maven {url "https://maven.neoforged.net/releases"}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
name = 'NeoForged'
|
||||
url = 'https://maven.neoforged.net/releases'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
architectury {
|
||||
platformSetupLoomIde()
|
||||
neoForge()
|
||||
@@ -15,41 +20,44 @@ loom {
|
||||
}
|
||||
|
||||
configurations {
|
||||
common
|
||||
shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this.
|
||||
common {
|
||||
canBeResolved = true
|
||||
canBeConsumed = false
|
||||
}
|
||||
compileClasspath.extendsFrom common
|
||||
runtimeClasspath.extendsFrom common
|
||||
developmentForge.extendsFrom common
|
||||
archivesBaseName = rootProject.archives_base_name + "-neoforge"
|
||||
developmentNeoForge.extendsFrom common
|
||||
|
||||
// Files in this configuration will be bundled into your mod using the Shadow plugin.
|
||||
// Don't use the `shadow` configuration from the plugin itself as it's meant for excluding files.
|
||||
shadowBundle {
|
||||
canBeResolved = true
|
||||
canBeConsumed = false
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
neoForge "net.neoforged:neoforge:${rootProject.neoforge_version}"
|
||||
neoForge "net.neoforged:neoforge:$rootProject.neoforge_version"
|
||||
|
||||
common(project(path: ":common", configuration: "namedElements")) { transitive false }
|
||||
shadowCommon(project(path: ":common", configuration: "transformProductionNeoForge")) { transitive = false }
|
||||
common(project(path: ':common', configuration: 'namedElements')) { transitive false }
|
||||
shadowBundle project(path: ':common', configuration: 'transformProductionNeoForge')
|
||||
}
|
||||
|
||||
processResources {
|
||||
inputs.property "version", project.version
|
||||
inputs.property 'version', project.version
|
||||
|
||||
filesMatching("META-INF/mods.toml") {
|
||||
expand "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"
|
||||
configurations = [project.configurations.shadowBundle]
|
||||
archiveClassifier = 'dev-shadow'
|
||||
}
|
||||
|
||||
remapJar {
|
||||
atAccessWideners.add('midnightlib.accesswidener')
|
||||
input.set shadowJar.archiveFile
|
||||
dependsOn shadowJar
|
||||
}
|
||||
|
||||
sourcesJar {
|
||||
|
||||
Reference in New Issue
Block a user