DimDoors/fabric/build.gradle

153 lines
4.5 KiB
Groovy
Raw Normal View History

2023-05-03 09:53:43 +02:00
plugins {
id "com.github.johnrengelman.shadow" version "7.1.2"
}
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://cursemaven.com"
}
2023-05-12 16:13:06 +02:00
maven { url "https://maven.bai.lol" }
maven { url "https://maven.enginehub.org/repo/" }
mavenCentral()
maven {
url = "https://jitpack.io"
}
maven {
url = "https://maven.shedaniel.me/"
}
2023-05-08 15:16:31 +02:00
}
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}"
modApi "me.shedaniel.cloth:cloth-config-fabric:9.0.94"
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-entity-${project.project.cardinal_components}:${project.cardinal_components_entity}")
includeCompile("curse.maven:cardinal-components-level-${project.project.cardinal_components}:${project.cardinal_components_level}")
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-05-12 16:13:06 +02:00
modApi "mcp.mobius.waila:wthit:fabric-${wthitVersion}"
modApi "lol.bai:badpackets:fabric-0.2.0"
modApi "com.sk89q.worldedit:worldedit-fabric-mc${rootProject.minecraft_version}:${rootProject.worldedit}"
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]
classifier "dev-shadow"
}
remapJar {
injectAccessWidener = true
input.set shadowJar.archiveFile
dependsOn shadowJar
classifier "fabric"
2023-05-03 09:53:43 +02:00
}
jar {
classifier "dev"
}
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")
]
}
}
}
2023-05-03 09:53:43 +02:00
publishing {
publications {
mavenFabric(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.
}
}