DimDoors/fabric/build.gradle

135 lines
4.1 KiB
Groovy
Raw Normal View History

2023-05-03 09:53:43 +02:00
plugins {
id "com.github.johnrengelman.shadow" version "8.1.1"
2023-05-03 09:53:43 +02:00
}
architectury {
platformSetupLoomIde()
fabric()
}
loom {
runs {
data {
inherit client
name "Data Generation"
vmArg "-Dfabric-api.datagen"
2023-07-16 02:28:38 +02:00
vmArg "-Dfabric-api.datagen.output-dir=${project(":common").file("src/main/generated")}"
vmArg "-Dfabric-api.datagen.modid=dimdoors"
runDir "build/datagen"
}
}
2023-05-03 09:53:43 +02:00
accessWidenerPath = project(":common").loom.accessWidenerPath
}
configurations {
common
shadowCommon // Don't use shadow from the shadow plugin since it *excludes* files.
compileClasspath.extendsFrom common
runtimeClasspath.extendsFrom common
developmentFabric.extendsFrom common
}
2023-05-08 15:16:31 +02:00
def includeCompile(entry) {
project.dependencies {
modApi(entry)
include(entry)
}
}
repositories {
maven {
url = "https://maven.terraformersmc.com/releases/"
}
}
2023-05-03 09:53:43 +02:00
dependencies {
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
modApi "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_api_version}"
// Remove the next line if you don't want to depend on the API
modApi "dev.architectury:architectury-fabric:${rootProject.architectury_version}"
2023-10-02 03:16:48 +02:00
modApi "me.shedaniel.cloth:cloth-config-fabric:${rootProject.cloth_config}"
2023-05-03 09:53:43 +02:00
2023-05-08 15:16:31 +02:00
includeCompile("curse.maven:cardinal-components-base-${project.project.cardinal_components}:${project.cardinal_components_base}")
includeCompile("curse.maven:cardinal-components-item-${project.project.cardinal_components}:${project.cardinal_components_item}")
includeCompile("curse.maven:cardinal-components-world-${project.project.cardinal_components}:${project.cardinal_components_world}")
includeCompile("curse.maven:cardinal-components-chunk-${project.project.cardinal_components}:${project.cardinal_components_chunk}")
2023-05-03 09:53:43 +02:00
common(project(path: ":common", configuration: "namedElements")) { transitive false }
shadowCommon(project(path: ":common", configuration: "transformProductionFabric")) { transitive false }
2023-05-12 16:13:06 +02:00
includeCompile "com.flowpowered:flow-math:1.0.3"
includeCompile "org.jgrapht:jgrapht-core:1.1.0"
includeCompile "com.github.DimensionalDevelopment:poly2tri.java:0.1.1"
2023-08-19 14:07:06 +02:00
includeCompile "com.github.Chocohead:Fabric-ASM:v2.3"
2023-05-12 16:13:06 +02:00
modApi "mcp.mobius.waila:wthit:fabric-${wthitVersion}"
2023-10-02 03:16:48 +02:00
// modApi "lol.bai:badpackets:fabric-4.2.0"
modApi "com.sk89q.worldedit:worldedit-fabric-mc${rootProject.world_edit_minecraft_version}:${rootProject.worldedit}"
modApi "mcp.mobius.waila:wthit:fabric-${wthitVersion}"
2023-10-02 03:16:48 +02:00
modApi "com.terraformersmc:modmenu:7.2.2"
// modRuntimeOnly "me.shedaniel:RoughlyEnoughItems-fabric:$rei_version"
// modCompileOnly "me.shedaniel:RoughlyEnoughItems-api-fabric:$rei_version"
// modCompileOnly "me.shedaniel:RoughlyEnoughItems-default-plugin-fabric:$rei_version"
2023-05-03 09:53:43 +02:00
}
processResources {
inputs.property "version", project.version
filesMatching("fabric.mod.json") {
expand "version": project.version
}
from(rootProject.file("common/src/main/resources")) {
include("**/**")
duplicatesStrategy = DuplicatesStrategy.WARN
}
2023-05-03 09:53:43 +02:00
}
shadowJar {
exclude "architectury.common.json"
configurations = [project.configurations.shadowCommon]
archiveClassifier = "dev-shadow"
2023-05-03 09:53:43 +02:00
}
remapJar {
injectAccessWidener = true
inputFile.set(shadowJar.archiveFile)
2023-05-03 09:53:43 +02:00
dependsOn shadowJar
archiveClassifier = "fabric"
2023-05-03 09:53:43 +02:00
}
jar {
archiveClassifier = "dev"
2023-05-03 09:53:43 +02:00
}
sourcesJar {
def commonSources = project(":common").sourcesJar
dependsOn commonSources
from commonSources.archiveFile.map { zipTree(it) }
2023-07-16 02:28:38 +02:00
duplicatesStrategy = DuplicatesStrategy.WARN
2023-05-03 09:53:43 +02:00
}
components.java {
withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) {
skip()
}
}
sourceSets {
main {
java {
srcDir "src/main/datagen"
}
resources {
srcDirs += [
2023-07-16 02:28:38 +02:00
project(":common").file("src/main/generated")
]
}
}
}