2021-01-08 03:38:43 +01:00
|
|
|
plugins {
|
2022-01-14 06:21:44 +01:00
|
|
|
id "java"
|
2021-11-19 11:14:20 +01:00
|
|
|
id "fabric-loom" version "0.10-SNAPSHOT"
|
2021-01-28 06:57:36 +01:00
|
|
|
id "maven-publish"
|
2022-01-14 06:21:44 +01:00
|
|
|
id "com.matthewprenger.cursegradle" version "1.4.0"
|
2021-01-08 03:38:43 +01:00
|
|
|
}
|
|
|
|
|
2022-01-15 06:11:56 +01:00
|
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
|
|
targetCompatibility = JavaVersion.VERSION_17
|
2021-01-08 03:38:43 +01:00
|
|
|
|
|
|
|
repositories {
|
2021-01-28 06:57:36 +01:00
|
|
|
mavenCentral()
|
|
|
|
|
2021-03-30 16:41:02 +02:00
|
|
|
maven {
|
2022-01-14 06:21:44 +01:00
|
|
|
url "https://maven.legacyfabric.net/"
|
2021-03-30 16:41:02 +02:00
|
|
|
}
|
|
|
|
|
2021-01-28 06:57:36 +01:00
|
|
|
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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-13 11:19:21 +02:00
|
|
|
maven {
|
2022-01-14 06:21:44 +01:00
|
|
|
name = "Ladysnake Mods"
|
|
|
|
url = "https://ladysnake.jfrog.io/artifactory/mods"
|
2021-04-13 11:19:21 +02:00
|
|
|
}
|
|
|
|
|
2022-03-14 11:31:16 +01:00
|
|
|
maven {
|
|
|
|
url = "https://ladysnake.jfrog.io/ui/native/mods"
|
|
|
|
}
|
|
|
|
|
2021-02-16 10:02:49 +01:00
|
|
|
maven {
|
|
|
|
url = "https://maven.shedaniel.me/"
|
|
|
|
}
|
2021-03-22 11:41:09 +01:00
|
|
|
|
2021-11-19 11:38:52 +01:00
|
|
|
maven {
|
|
|
|
url = "https://maven.bai.lol"
|
|
|
|
content {
|
|
|
|
includeGroup "mcp.mobius.waila"
|
|
|
|
}
|
|
|
|
}
|
2021-03-22 11:41:09 +01:00
|
|
|
|
|
|
|
maven {
|
|
|
|
url = "https://jitpack.io"
|
|
|
|
}
|
2021-03-22 18:39:32 +01:00
|
|
|
|
|
|
|
maven {
|
2022-01-14 06:21:44 +01:00
|
|
|
name = "TerraformersMC"
|
|
|
|
url = "https://maven.terraformersmc.com/"
|
2021-03-22 18:39:32 +01:00
|
|
|
}
|
2021-03-31 13:07:19 +02:00
|
|
|
|
2022-01-14 06:21:44 +01:00
|
|
|
maven { url "https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/" }
|
2021-01-08 03:38:43 +01:00
|
|
|
}
|
|
|
|
|
2021-01-28 06:57:36 +01:00
|
|
|
def includeCompile(group, artifact, version) {
|
2021-01-11 03:46:22 +01:00
|
|
|
project.dependencies {
|
2021-01-28 06:57:36 +01:00
|
|
|
modCompileOnly("$group:$artifact:$version") {
|
|
|
|
exclude module: "fabric-api"
|
|
|
|
}
|
2021-11-19 11:38:52 +01:00
|
|
|
modRuntimeOnly("$group:$artifact:$version") {
|
2021-01-11 03:46:22 +01:00
|
|
|
exclude module: "fabric-api"
|
|
|
|
}
|
2021-01-28 06:57:36 +01:00
|
|
|
include("$group:$artifact:$version")
|
2021-01-11 03:46:22 +01:00
|
|
|
}
|
2021-01-25 03:54:24 +01:00
|
|
|
project.publishing {
|
|
|
|
publications {
|
|
|
|
mavenJava(MavenPublication) {
|
|
|
|
pom.withXml {
|
|
|
|
def depsNode = asNode().appendNode("dependencies")
|
|
|
|
def depNode = depsNode.appendNode("dependency")
|
2021-01-28 06:57:36 +01:00
|
|
|
depNode.appendNode("groupId", group)
|
|
|
|
depNode.appendNode("artifactId", artifact)
|
|
|
|
depNode.appendNode("version", version)
|
2021-01-25 03:54:24 +01:00
|
|
|
depNode.appendNode("scope", "compile")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-01-11 03:46:22 +01:00
|
|
|
}
|
|
|
|
|
2021-02-16 10:02:49 +01:00
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
java {
|
|
|
|
srcDir "src/main/schematics"
|
|
|
|
srcDir "src/main/config"
|
2022-03-14 23:11:01 +01:00
|
|
|
srcDirs "src/main/datagen" }
|
|
|
|
resources {
|
|
|
|
srcDirs "src/main/generated"
|
2021-02-16 10:02:49 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-09-27 06:28:28 +02:00
|
|
|
loom {
|
2022-01-14 06:21:44 +01:00
|
|
|
accessWidenerPath = file("src/main/resources/dimdoors.accesswidener")
|
2022-03-14 23:11:01 +01:00
|
|
|
|
|
|
|
runs {
|
|
|
|
datagen {
|
|
|
|
server()
|
|
|
|
|
|
|
|
name "Minecraft Data"
|
|
|
|
vmArg "-Dfabric-api.datagen"
|
|
|
|
vmArg "-Dfabric-api.datagen.output-dir=${file("src/main/generated")}"
|
|
|
|
|
|
|
|
runDir "build/datagen"
|
|
|
|
}
|
|
|
|
}
|
2021-03-23 03:44:08 +01:00
|
|
|
}
|
|
|
|
|
2022-03-14 23:11:01 +01:00
|
|
|
assemble.dependsOn runDatagen
|
|
|
|
|
2021-01-08 03:38:43 +01:00
|
|
|
dependencies {
|
2022-03-14 11:31:16 +01:00
|
|
|
minecraft "com.mojang:minecraft:1.18.2"
|
|
|
|
mappings "net.fabricmc:yarn:1.18.2+build.2:v2"
|
|
|
|
modImplementation "net.fabricmc:fabric-loader:0.13.3"
|
|
|
|
modImplementation "net.fabricmc.fabric-api:fabric-api:0.48.0+1.18.2"
|
2021-01-28 06:57:36 +01: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")
|
2021-03-03 17:55:16 +01:00
|
|
|
includeCompile("com.github.DimensionalDevelopment", "Matrix", "1.0.0")
|
2022-03-14 11:31:16 +01:00
|
|
|
includeCompile("me.shedaniel.cloth", "cloth-config-fabric", "6.2.57")
|
|
|
|
|
|
|
|
includeCompile("curse.maven", "cardinal_base-318449", "${project.cardinal_components_base}")
|
|
|
|
includeCompile("curse.maven", "cardinal_item-318449", "${project.cardinal_components_item}")
|
|
|
|
includeCompile("curse.maven", "cardinal_entity-318449", "${project.cardinal_components_entity}")
|
|
|
|
includeCompile("curse.maven", "cardinal_level-318449", "${project.cardinal_components_level}")
|
|
|
|
includeCompile("curse.maven", "cardinal_world-318449", "${project.cardinal_components_world}")
|
|
|
|
includeCompile("curse.maven", "cardinal_chunk-318449", "${project.cardinal_components_chunk}")
|
|
|
|
|
2022-03-22 11:38:23 +01:00
|
|
|
includeCompile("curse.maven", "wthit-3707010", "${project.wthit}")
|
|
|
|
|
2022-03-14 11:31:16 +01:00
|
|
|
modCompileOnly("com.terraformersmc:modmenu:3.1.0") {
|
2021-02-11 16:10:28 +01:00
|
|
|
exclude module: "fabric-api"
|
|
|
|
}
|
2021-03-22 18:39:32 +01:00
|
|
|
|
2022-03-22 11:38:23 +01:00
|
|
|
// modCompileOnly("mcp.mobius.waila:wthit:fabric-4.7.3") {
|
|
|
|
// exclude module: "modmenu"
|
|
|
|
// exclude module: "fabric-api"
|
|
|
|
// }
|
2021-02-16 03:44:44 +01:00
|
|
|
|
2022-04-03 13:03:08 +02:00
|
|
|
modCompileOnly "curse.maven:worldedit-225608:3697298"
|
|
|
|
modCompileOnly "curse.maven:wthit-440979:3707010"
|
2021-10-08 23:42:08 +02:00
|
|
|
|
2022-03-15 06:10:29 +01:00
|
|
|
// testImplementation("junit:junit:4.13.2")
|
|
|
|
// testImplementation("net.devtech:PotatoUnit:1.0.2")
|
2021-01-08 03:38:43 +01:00
|
|
|
}
|
|
|
|
|
2022-03-20 11:18:15 +01:00
|
|
|
version = computeVersion(project.mod_version) + "-" + project.minecraft_version
|
2021-01-28 06:57:36 +01:00
|
|
|
archivesBaseName = "DimensionalDoors"
|
2021-01-08 03:38:43 +01:00
|
|
|
|
2021-02-13 07:20:55 +01:00
|
|
|
static def computeVersion(String version) {
|
2021-03-23 08:29:09 +01:00
|
|
|
if (version.contains("alpha") || version.contains("beta")) {
|
2021-02-15 11:34:05 +01:00
|
|
|
return version + "-" + Calendar.getInstance().getTime().format("dd.MM.yyyy")
|
2021-02-13 07:20:55 +01:00
|
|
|
}
|
|
|
|
return version
|
|
|
|
}
|
|
|
|
|
2021-01-08 03:38:43 +01:00
|
|
|
processResources {
|
2021-02-11 16:10:28 +01:00
|
|
|
filesMatching("fabric.mod.json") {
|
2022-03-20 11:29:23 +01:00
|
|
|
expand "version": project.mod_version
|
2021-02-11 16:10:28 +01:00
|
|
|
}
|
2021-01-08 03:38:43 +01:00
|
|
|
|
2022-03-20 11:29:23 +01:00
|
|
|
inputs.property "version", project.mod_version
|
2021-01-08 03:38:43 +01:00
|
|
|
}
|
|
|
|
|
2022-01-15 06:11:56 +01:00
|
|
|
tasks.withType(JavaCompile).configureEach {
|
|
|
|
it.options.release = 17
|
|
|
|
}
|
|
|
|
|
|
|
|
java {
|
|
|
|
withSourcesJar()
|
|
|
|
}
|
|
|
|
|
|
|
|
jar {
|
|
|
|
from("LICENSE") {
|
|
|
|
rename { "${it}_${project.archivesBaseName}"}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-01-08 03:38:43 +01:00
|
|
|
artifacts {
|
2021-02-11 16:10:28 +01:00
|
|
|
archives jar
|
2021-01-08 03:38:43 +01:00
|
|
|
}
|
2021-02-13 07:20:55 +01:00
|
|
|
|
|
|
|
curseforge {
|
2022-01-14 06:21:44 +01:00
|
|
|
if (project.hasProperty("curse_api_key")) {
|
|
|
|
apiKey = project.getProperty("curse_api_key")
|
2021-02-13 07:20:55 +01:00
|
|
|
}
|
|
|
|
project {
|
2022-01-14 06:21:44 +01:00
|
|
|
id = "284876"
|
|
|
|
changelog = file("changelog.txt").text
|
|
|
|
releaseType = "beta"
|
2022-03-15 11:20:09 +01:00
|
|
|
addGameVersion "1.18.2"
|
2022-01-14 06:21:44 +01:00
|
|
|
addGameVersion "Fabric"
|
2021-02-13 07:20:55 +01:00
|
|
|
mainArtifact(file("${project.buildDir}/libs/${archivesBaseName}-${version}.jar")) {
|
2022-03-15 11:20:09 +01:00
|
|
|
displayName = "[1.18.2] Dimensional Doors ${version}"
|
2021-02-13 07:20:55 +01:00
|
|
|
}
|
|
|
|
afterEvaluate {
|
|
|
|
uploadTask.dependsOn("remapJar")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
options {
|
|
|
|
forgeGradleIntegration = false
|
|
|
|
}
|
|
|
|
}
|
2021-02-16 03:44:44 +01:00
|
|
|
|
2022-03-15 03:13:35 +01:00
|
|
|
//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();
|
|
|
|
// }
|
|
|
|
//}
|