Files
Speedometer/neoforge/build.gradle
Zacharias 481993b2e2 Updated to 1.21
Removed support for Forge
Added support for NeoForge

Added a new location for Visual Speed Type (WIP) slight bug

Made Cloth Config an optional dependency (as of version 6.2)
2024-07-09 08:40:43 +02:00

86 lines
2.2 KiB
Groovy

plugins {
id "com.github.johnrengelman.shadow" version "8.1.1"
}
architectury {
platformSetupLoomIde()
neoForge()
}
repositories{
maven {
name = 'NeoForged'
url = 'https://maven.neoforged.net/releases'
}
maven { url "https://maven.shedaniel.me/" }
}
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
developmentNeoForge.extendsFrom common
}
dependencies {
neoForge "net.neoforged:neoforge:$rootProject.neoforge_version"
// Remove the next line if you don't want to depend on the API
modImplementation "dev.architectury:architectury-neoforge:$rootProject.architectury_version"
modImplementation "me.shedaniel.cloth:cloth-config-neoforge:$rootProject.cloth_config_version"
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"
configurations = [project.configurations.shadowCommon]
archiveClassifier.set("dev-shadow")
}
remapJar {
inputFile.set shadowJar.archiveFile
dependsOn shadowJar
archiveClassifier.set(null)
}
jar {
archiveClassifier.set("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.
}
}