TheWildBackport/forge/build.gradle

92 lines
2.1 KiB
Groovy
Raw Normal View History

2022-07-17 09:33:52 +02:00
buildscript {
repositories {
2022-08-25 23:53:18 +02:00
maven { url = 'https://maven.minecraftforge.net/' }
2022-07-17 09:33:52 +02:00
}
}
2022-07-10 06:16:25 +02:00
plugins {
id "com.github.johnrengelman.shadow" version "7.1.2"
}
2022-08-25 23:53:18 +02:00
architectury {
platformSetupLoomIde()
forge()
}
2022-07-10 06:16:25 +02:00
loom {
accessWidenerPath = project(":common").loom.accessWidenerPath
forge {
2022-08-25 23:53:18 +02:00
mixinConfig "wildbackport-common.mixins.json"
mixinConfig "wildbackport.mixins.json"
2022-07-10 06:16:25 +02:00
convertAccessWideners = true
extraAccessWideners.add loom.accessWidenerPath.get().asFile.name
}
}
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
}
dependencies {
forge "net.minecraftforge:forge:${rootProject.forge_version}"
2022-08-25 23:53:18 +02:00
modApi "com.github.glitchfiend:TerraBlender-forge:${minecraft_version}-${terrablender_version}"
2022-07-10 06:16:25 +02:00
2023-11-26 12:42:36 +01:00
modImplementation("net.anvilcraft:anvillib-18-forge:1.1.0") {transitive = false}
2023-11-15 18:35:02 +01:00
2022-07-10 06:16:25 +02:00
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
}
}
}