207 lines
5.2 KiB
Groovy
207 lines
5.2 KiB
Groovy
plugins {
|
|
id "java"
|
|
id "fabric-loom" version "0.10-SNAPSHOT"
|
|
id "maven-publish"
|
|
id "com.matthewprenger.cursegradle" version "1.4.0"
|
|
}
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_16
|
|
targetCompatibility = JavaVersion.VERSION_16
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
|
|
maven {
|
|
url "https://maven.legacyfabric.net/"
|
|
}
|
|
|
|
maven {
|
|
name = "Fabric maven"
|
|
url = "https://maven.fabricmc.net/"
|
|
}
|
|
|
|
maven {
|
|
url = "https://www.cursemaven.com"
|
|
content {
|
|
includeGroup "curse.maven"
|
|
}
|
|
}
|
|
|
|
maven {
|
|
url = "https://server.bbkr.space/artifactory/libs-release"
|
|
content {
|
|
includeGroup "io.github.cottonmc"
|
|
}
|
|
}
|
|
|
|
maven {
|
|
name = "Ladysnake Mods"
|
|
url = "https://ladysnake.jfrog.io/artifactory/mods"
|
|
}
|
|
|
|
maven {
|
|
url = "https://maven.shedaniel.me/"
|
|
}
|
|
|
|
maven {
|
|
url = "https://maven.bai.lol"
|
|
content {
|
|
includeGroup "mcp.mobius.waila"
|
|
}
|
|
}
|
|
|
|
maven {
|
|
url = "https://jitpack.io"
|
|
}
|
|
|
|
maven {
|
|
name = "TerraformersMC"
|
|
url = "https://maven.terraformersmc.com/"
|
|
}
|
|
|
|
maven { url "https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/" }
|
|
}
|
|
|
|
def includeCompile(group, artifact, version) {
|
|
project.dependencies {
|
|
modCompileOnly("$group:$artifact:$version") {
|
|
exclude module: "fabric-api"
|
|
}
|
|
modRuntimeOnly("$group:$artifact:$version") {
|
|
exclude module: "fabric-api"
|
|
}
|
|
include("$group:$artifact:$version")
|
|
}
|
|
project.publishing {
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
pom.withXml {
|
|
def depsNode = asNode().appendNode("dependencies")
|
|
def depNode = depsNode.appendNode("dependency")
|
|
depNode.appendNode("groupId", group)
|
|
depNode.appendNode("artifactId", artifact)
|
|
depNode.appendNode("version", version)
|
|
depNode.appendNode("scope", "compile")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
java {
|
|
srcDir "src/main/schematics"
|
|
srcDir "src/main/config"
|
|
}
|
|
}
|
|
datagen
|
|
}
|
|
|
|
loom {
|
|
accessWidenerPath = file("src/main/resources/dimdoors.accesswidener")
|
|
}
|
|
|
|
dependencies {
|
|
minecraft "com.mojang:minecraft:1.18.1"
|
|
mappings "net.fabricmc:yarn:1.18.1+build.1:v2"
|
|
modImplementation "net.fabricmc:fabric-loader:0.12.12"
|
|
modImplementation "net.fabricmc.fabric-api:fabric-api:0.44.0+1.18"
|
|
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")
|
|
includeCompile("com.github.DimensionalDevelopment", "Matrix", "1.0.0")
|
|
includeCompile("me.shedaniel.cloth", "cloth-config-fabric", "6.1.48")
|
|
includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-base", "4.0.1")
|
|
includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-item", "4.0.1")
|
|
includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-entity", "4.0.1")
|
|
includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-level", "4.0.1")
|
|
includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-world", "4.0.1")
|
|
includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-chunk", "4.0.1")
|
|
|
|
modCompileOnly("com.terraformersmc:modmenu:3.0.1") {
|
|
exclude module: "fabric-api"
|
|
}
|
|
modRuntimeOnly("com.terraformersmc:modmenu:3.0.1") {
|
|
exclude module: "fabric-api"
|
|
}
|
|
|
|
modCompileOnly("mcp.mobius.waila:wthit:fabric-4.4.1") {
|
|
exclude module: "modmenu"
|
|
exclude module: "fabric-api"
|
|
}
|
|
modRuntimeOnly("mcp.mobius.waila:wthit:fabric-4.4.1") {
|
|
exclude module: "modmenu"
|
|
exclude module: "fabric-api"
|
|
}
|
|
modCompileOnly "me.shedaniel.cloth.api:cloth-datagen-api-v1:3.0.55"
|
|
modRuntimeOnly "me.shedaniel.cloth.api:cloth-datagen-api-v1:3.0.55"
|
|
modCompileOnly "curse.maven:worldedit-225608:3559499"
|
|
modRuntimeOnly "curse.maven:worldedit-225608:3559499"
|
|
|
|
// modImplementation "software.bernie.geckolib:geckolib-fabric-1.17:3.0.13:dev"
|
|
|
|
datagenImplementation sourceSets.main.output
|
|
datagenImplementation sourceSets.main.compileClasspath
|
|
datagenRuntimeOnly sourceSets.main.runtimeClasspath
|
|
|
|
testImplementation("junit:junit:4.13.2")
|
|
testImplementation("net.devtech:PotatoUnit:1.0.2")
|
|
}
|
|
|
|
version = computeVersion(project.mod_version)
|
|
archivesBaseName = "DimensionalDoors"
|
|
|
|
static def computeVersion(String version) {
|
|
if (version.contains("alpha") || version.contains("beta")) {
|
|
return version + "-" + Calendar.getInstance().getTime().format("dd.MM.yyyy")
|
|
}
|
|
return version
|
|
}
|
|
|
|
processResources {
|
|
filesMatching("fabric.mod.json") {
|
|
expand "version": project.version
|
|
}
|
|
|
|
inputs.property "version", project.version
|
|
}
|
|
|
|
artifacts {
|
|
archives jar
|
|
}
|
|
|
|
curseforge {
|
|
if (project.hasProperty("curse_api_key")) {
|
|
apiKey = project.getProperty("curse_api_key")
|
|
}
|
|
project {
|
|
id = "284876"
|
|
changelog = file("changelog.txt").text
|
|
releaseType = "beta"
|
|
addGameVersion "1.18.1"
|
|
addGameVersion "Fabric"
|
|
mainArtifact(file("${project.buildDir}/libs/${archivesBaseName}-${version}.jar")) {
|
|
displayName = "[1.18.1] Dimensional Doors ${version}"
|
|
}
|
|
afterEvaluate {
|
|
uploadTask.dependsOn("remapJar")
|
|
}
|
|
}
|
|
options {
|
|
forgeGradleIntegration = false
|
|
}
|
|
}
|
|
|
|
test {
|
|
workingDir = file("test")
|
|
|
|
systemProperty("fabric.dli.config", file(".gradle/loom-cache/launch.cfg").getAbsolutePath())
|
|
//useJUnitPlatform()
|
|
}
|
|
|
|
tasks.test.doFirst {test ->
|
|
if (!test.workingDir.exists()) {
|
|
test.workingDir.mkdirs();
|
|
}
|
|
}
|