2021-01-08 03:38:43 +01:00
|
|
|
plugins {
|
2021-06-09 00:40:18 +02:00
|
|
|
id "fabric-loom" version "0.8-SNAPSHOT"
|
2021-01-28 06:57:36 +01:00
|
|
|
id "maven-publish"
|
2021-02-13 07:20:55 +01:00
|
|
|
id 'com.matthewprenger.cursegradle' version "1.4.0"
|
2021-01-08 03:38:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
apply plugin: "java"
|
|
|
|
|
2021-06-13 07:07:16 +02:00
|
|
|
sourceCompatibility = JavaVersion.VERSION_16
|
|
|
|
targetCompatibility = JavaVersion.VERSION_16
|
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 {
|
|
|
|
url 'https://maven.legacyfabric.net/'
|
|
|
|
}
|
|
|
|
|
2021-01-28 06:57:36 +01:00
|
|
|
maven {
|
|
|
|
name = "Fabric maven"
|
|
|
|
url = "https://maven.fabricmc.net/"
|
|
|
|
}
|
|
|
|
|
2021-02-11 19:31:15 +01:00
|
|
|
maven {
|
|
|
|
name = "Haven's Maven"
|
|
|
|
url = "https://hephaestus.dev/release"
|
|
|
|
}
|
|
|
|
|
2021-01-28 06:57:36 +01:00
|
|
|
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-01-15 17:19:12 +01:00
|
|
|
maven {
|
|
|
|
name = "Ladysnake Libs"
|
|
|
|
url = "https://dl.bintray.com/ladysnake/libs"
|
|
|
|
}
|
2021-02-16 10:02:49 +01:00
|
|
|
|
2021-04-13 11:19:21 +02:00
|
|
|
maven {
|
|
|
|
name = 'Ladysnake Mods'
|
|
|
|
url = 'https://ladysnake.jfrog.io/artifactory/mods'
|
|
|
|
}
|
|
|
|
|
2021-02-16 10:02:49 +01:00
|
|
|
maven {
|
|
|
|
url = "https://maven.shedaniel.me/"
|
|
|
|
}
|
2021-03-22 11:41:09 +01:00
|
|
|
|
2021-06-06 20:57:07 +02:00
|
|
|
// maven {
|
|
|
|
// url = "https://bai.jfrog.io/artifactory/maven"
|
|
|
|
// }
|
2021-03-22 11:41:09 +01:00
|
|
|
|
|
|
|
maven {
|
|
|
|
url = "https://jitpack.io"
|
|
|
|
}
|
2021-03-22 18:39:32 +01:00
|
|
|
|
|
|
|
maven {
|
|
|
|
name = 'TerraformersMC'
|
|
|
|
url = 'https://maven.terraformersmc.com/'
|
|
|
|
}
|
2021-03-31 13:07:19 +02:00
|
|
|
|
|
|
|
maven {
|
|
|
|
name = "Libs"
|
|
|
|
url = "./libs"
|
|
|
|
metadataSources {
|
|
|
|
artifact()
|
|
|
|
}
|
|
|
|
}
|
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"
|
|
|
|
}
|
|
|
|
modRuntime("$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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
datagen
|
|
|
|
}
|
|
|
|
|
2021-03-23 03:44:08 +01:00
|
|
|
minecraft {
|
|
|
|
accessWidener = file('src/main/resources/dimdoors.accesswidener')
|
|
|
|
}
|
|
|
|
|
2021-01-08 03:38:43 +01:00
|
|
|
dependencies {
|
2021-06-09 01:53:48 +02:00
|
|
|
minecraft "com.mojang:minecraft:1.17"
|
|
|
|
mappings "net.fabricmc:yarn:1.17+build.5:v2"
|
2021-03-30 16:41:02 +02:00
|
|
|
modImplementation "net.fabricmc:fabric-loader:0.11.3"
|
2021-06-09 01:53:48 +02:00
|
|
|
modImplementation "net.fabricmc.fabric-api:fabric-api:0.34.9+1.17"
|
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")
|
2021-03-22 11:41:09 +01:00
|
|
|
// includeCompile("io.github.BoogieMonster1O1", "OpenWorlds", "c57e3ef")
|
2021-06-04 05:34:54 +02:00
|
|
|
// includeCompile("io.github.cottonmc", "LibGui", "4.0.0-alpha.1+21w11a")
|
2021-06-06 20:57:07 +02:00
|
|
|
includeCompile("me.shedaniel.cloth", "cloth-config-fabric", "5.0.34")
|
|
|
|
includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-base", "3.0.0-nightly.1.17-pre2")
|
|
|
|
includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-item", "3.0.0-nightly.1.17-pre2")
|
|
|
|
includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-entity", "3.0.0-nightly.1.17-pre2")
|
|
|
|
includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-level", "3.0.0-nightly.1.17-pre2")
|
|
|
|
includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-util", "3.0.0-nightly.1.17-pre2")
|
|
|
|
includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-world", "3.0.0-nightly.1.17-pre2")
|
|
|
|
includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-chunk", "3.0.0-nightly.1.17-pre2")
|
2021-06-04 05:34:54 +02:00
|
|
|
// includeCompile("me.sargunvohra.mcmods", "autoconfig1u", "3.3.1")
|
2021-02-11 19:31:15 +01:00
|
|
|
includeCompile("dev.hephaestus", "seedy-behavior", "1.0.1")
|
2021-01-28 06:57:36 +01:00
|
|
|
|
2021-06-06 20:57:07 +02:00
|
|
|
modCompileOnly("com.terraformersmc:modmenu:2.0.0-beta.7") {
|
2021-02-11 16:10:28 +01:00
|
|
|
exclude module: "fabric-api"
|
|
|
|
}
|
2021-06-06 20:57:07 +02:00
|
|
|
modRuntime("com.terraformersmc:modmenu:2.0.0-beta.7") {
|
2021-03-22 18:39:32 +01:00
|
|
|
exclude module: "fabric-api"
|
|
|
|
}
|
|
|
|
|
2021-06-06 20:57:07 +02:00
|
|
|
modCompileOnly('mcp.mobius.waila:wthit-fabric:3.5.1') {
|
2021-03-22 11:41:09 +01:00
|
|
|
exclude module: "modmenu"
|
|
|
|
exclude module: "fabric-api"
|
|
|
|
}
|
2021-06-06 20:57:07 +02:00
|
|
|
modRuntime('mcp.mobius.waila:wthit-fabric:3.5.1') {
|
2021-03-22 11:41:09 +01:00
|
|
|
exclude module: "modmenu"
|
2021-02-11 16:10:28 +01:00
|
|
|
exclude module: "fabric-api"
|
|
|
|
}
|
2021-02-17 04:03:11 +01:00
|
|
|
modCompileOnly "me.shedaniel.cloth.api:cloth-datagen-api-v1:2.0.0"
|
|
|
|
modRuntime "me.shedaniel.cloth.api:cloth-datagen-api-v1:2.0.0"
|
2021-06-06 22:02:29 +02:00
|
|
|
modCompileOnly "worldedit:worldedit:7.2.6"
|
|
|
|
modRuntime "worldedit:worldedit:7.2.6"
|
2021-02-16 03:44:44 +01:00
|
|
|
|
2021-06-04 05:34:54 +02:00
|
|
|
// modImplementation "geckolib:geckolib:3.0.31"
|
2021-05-26 09:09:56 +02:00
|
|
|
|
2021-02-16 08:43:11 +01:00
|
|
|
datagenImplementation sourceSets.main.output
|
2021-02-16 10:02:49 +01:00
|
|
|
datagenImplementation sourceSets.main.compileClasspath
|
2021-02-17 04:03:11 +01:00
|
|
|
datagenRuntimeOnly sourceSets.main.runtimeClasspath
|
2021-02-16 10:02:49 +01:00
|
|
|
|
2021-03-30 16:41:02 +02:00
|
|
|
testImplementation('junit:junit:4.13.2')
|
|
|
|
//testImplementation('net.devtech:PotatoUnit-fabric:1.0.0')
|
|
|
|
testImplementation('net.devtech:PotatoUnit:1.0.2')
|
2021-01-08 03:38:43 +01:00
|
|
|
}
|
|
|
|
|
2021-02-13 07:20:55 +01:00
|
|
|
version = computeVersion(project.mod_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") {
|
|
|
|
expand "version": project.version
|
|
|
|
}
|
2021-01-08 03:38:43 +01:00
|
|
|
|
2021-02-11 16:10:28 +01:00
|
|
|
inputs.property "version", project.version
|
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 {
|
|
|
|
if (project.hasProperty('curse_api_key')) {
|
|
|
|
apiKey = project.getProperty('curse_api_key')
|
|
|
|
}
|
|
|
|
project {
|
|
|
|
id = '284876'
|
2021-03-23 11:57:28 +01:00
|
|
|
changelog = file('changelog.txt').text
|
2021-03-08 17:32:28 +01:00
|
|
|
releaseType = 'beta'
|
2021-02-13 07:20:55 +01:00
|
|
|
addGameVersion '1.17'
|
|
|
|
mainArtifact(file("${project.buildDir}/libs/${archivesBaseName}-${version}.jar")) {
|
2021-03-22 18:39:32 +01:00
|
|
|
displayName = "[21w11a] 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
|
|
|
|
|
|
|
test {
|
2021-03-30 18:40:21 +02:00
|
|
|
workingDir = file('test')
|
2021-03-30 16:41:02 +02:00
|
|
|
|
2021-03-30 19:31:08 +02:00
|
|
|
systemProperty('fabric.dli.config', file('.gradle/loom-cache/launch.cfg').getAbsolutePath())
|
2021-03-30 16:41:02 +02:00
|
|
|
//useJUnitPlatform()
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.test.doFirst {Test test ->
|
|
|
|
if (!test.workingDir.exists()) {
|
|
|
|
test.workingDir.mkdirs();
|
|
|
|
}
|
2021-02-16 03:44:44 +01:00
|
|
|
}
|