226 lines
5.8 KiB
Groovy
226 lines
5.8 KiB
Groovy
plugins {
|
|
id "fabric-loom" version "0.7-SNAPSHOT"
|
|
id "maven-publish"
|
|
id 'com.matthewprenger.cursegradle' version "1.4.0"
|
|
}
|
|
|
|
apply plugin: "java"
|
|
|
|
sourceCompatibility = 1.8
|
|
targetCompatibility = 1.8
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
|
|
maven {
|
|
url 'https://maven.legacyfabric.net/'
|
|
}
|
|
|
|
maven {
|
|
name = "Fabric maven"
|
|
url = "https://maven.fabricmc.net/"
|
|
}
|
|
|
|
maven {
|
|
name = "Haven's Maven"
|
|
url = "https://hephaestus.dev/release"
|
|
}
|
|
|
|
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 Libs"
|
|
url = "https://dl.bintray.com/ladysnake/libs"
|
|
}
|
|
|
|
maven {
|
|
name = 'Ladysnake Mods'
|
|
url = 'https://ladysnake.jfrog.io/artifactory/mods'
|
|
}
|
|
|
|
maven {
|
|
url = "https://maven.shedaniel.me/"
|
|
}
|
|
|
|
maven {
|
|
url = "https://bai.jfrog.io/artifactory/maven"
|
|
}
|
|
|
|
maven {
|
|
url = "https://jitpack.io"
|
|
}
|
|
|
|
maven {
|
|
name = 'TerraformersMC'
|
|
url = 'https://maven.terraformersmc.com/'
|
|
}
|
|
|
|
maven {
|
|
name = "Libs"
|
|
url = "./libs"
|
|
metadataSources {
|
|
artifact()
|
|
}
|
|
}
|
|
}
|
|
|
|
def includeCompile(group, artifact, version) {
|
|
project.dependencies {
|
|
modCompileOnly("$group:$artifact:$version") {
|
|
exclude module: "fabric-api"
|
|
}
|
|
modRuntime("$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
|
|
}
|
|
|
|
minecraft {
|
|
accessWidener = file('src/main/resources/dimdoors.accesswidener')
|
|
}
|
|
|
|
dependencies {
|
|
minecraft "com.mojang:minecraft:21w14a"
|
|
mappings "net.fabricmc:yarn:21w14a+build.18:v2"
|
|
modImplementation "net.fabricmc:fabric-loader:0.11.3"
|
|
modImplementation "net.fabricmc.fabric-api:fabric-api:0.32.7+1.17"
|
|
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("io.github.BoogieMonster1O1", "OpenWorlds", "c57e3ef")
|
|
includeCompile("io.github.cottonmc", "LibGui", "4.0.0-alpha.1+21w11a")
|
|
includeCompile("me.shedaniel.cloth", "cloth-config-fabric", "5.0.16")
|
|
includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-base", "3.0.0-nightly.21w14a")
|
|
includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-item", "3.0.0-nightly.21w14a")
|
|
includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-entity", "3.0.0-nightly.21w14a")
|
|
includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-level", "3.0.0-nightly.21w14a")
|
|
includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-util", "3.0.0-nightly.21w14a")
|
|
includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-world", "3.0.0-nightly.21w14a")
|
|
includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-chunk", "3.0.0-nightly.21w14a")
|
|
includeCompile("me.sargunvohra.mcmods", "autoconfig1u", "3.3.1")
|
|
includeCompile("dev.hephaestus", "seedy-behavior", "1.0.1")
|
|
|
|
modCompileOnly("com.terraformersmc:modmenu:2.0.0-beta.4") {
|
|
exclude module: "fabric-api"
|
|
}
|
|
modRuntime("com.terraformersmc:modmenu:2.0.0-beta.4") {
|
|
exclude module: "fabric-api"
|
|
}
|
|
|
|
modCompileOnly('mcp.mobius.waila:wthit-fabric:3.2.3') {
|
|
exclude module: "modmenu"
|
|
exclude module: "fabric-api"
|
|
}
|
|
modRuntime('mcp.mobius.waila:wthit-fabric:3.2.3') {
|
|
exclude module: "modmenu"
|
|
exclude module: "fabric-api"
|
|
}
|
|
modCompileOnly "me.shedaniel.cloth.api:cloth-datagen-api-v1:2.0.0"
|
|
modRuntime "me.shedaniel.cloth.api:cloth-datagen-api-v1:2.0.0"
|
|
modCompileOnly "worldedit:worldedit:7.2.3"
|
|
modRuntime "worldedit:worldedit:7.2.3"
|
|
|
|
modImplementation "geckolib:geckolib:3.0.31"
|
|
|
|
datagenImplementation sourceSets.main.output
|
|
datagenImplementation sourceSets.main.compileClasspath
|
|
datagenRuntimeOnly sourceSets.main.runtimeClasspath
|
|
|
|
testImplementation('junit:junit:4.13.2')
|
|
//testImplementation('net.devtech:PotatoUnit-fabric:1.0.0')
|
|
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.17'
|
|
mainArtifact(file("${project.buildDir}/libs/${archivesBaseName}-${version}.jar")) {
|
|
displayName = "[21w11a] 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 test ->
|
|
if (!test.workingDir.exists()) {
|
|
test.workingDir.mkdirs();
|
|
}
|
|
}
|