DimDoors/build.gradle

153 lines
3.7 KiB
Groovy
Raw Normal View History

2021-01-08 03:38:43 +01:00
plugins {
2021-02-11 16:10:28 +01:00
id "fabric-loom" version "0.6-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"
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
2021-01-28 06:57:36 +01:00
mavenCentral()
2021-02-11 16:10:28 +01:00
jcenter()
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"
}
}
2021-02-11 16:10:28 +01:00
maven {
2021-01-28 06:57:36 +01:00
url = "https://jitpack.io"
}
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"
}
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-01-08 03:38:43 +01:00
dependencies {
2021-02-11 16:10:28 +01:00
minecraft "com.mojang:minecraft:21w06a"
mappings "net.fabricmc:yarn:21w06a+build.3:v2"
modImplementation "net.fabricmc:fabric-loader:0.11.1"
modImplementation "net.fabricmc.fabric-api:fabric-api:0.30.2+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-02-12 06:18:21 +01:00
includeCompile("io.github.BoogieMonster1O1", "OpenWorlds", "c57e3ef")
2021-01-28 06:57:36 +01:00
includeCompile("io.github.cottonmc", "LibGui", "3.3.2+1.16.4")
2021-02-11 16:10:28 +01:00
includeCompile("me.shedaniel.cloth", "config-2", "5.0.0")
2021-02-11 19:31:15 +01:00
includeCompile("io.github.onyxstudios", "Cardinal-Components-API", "3.0.0-nightly.20w48a")
2021-01-28 06:57:36 +01: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-02-11 16:10:28 +01:00
modCompileOnly("io.github.prospector:modmenu:2.0.0-beta.1+build.2") {
exclude module: "fabric-api"
}
modRuntime("io.github.prospector:modmenu:2.0.0-beta.1+build.2") {
exclude module: "fabric-api"
}
2021-02-12 13:48:56 +01:00
modCompileOnly 'com.github.badasintended:wthit:3.0.0'
modRuntime 'com.github.badasintended:wthit:3.0.0'
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) {
if (version.contains("alpha")) {
return version + "." + Calendar.getInstance().getTime().format("dd.MM.yyyy")
}
return version
}
2021-01-10 03:08:01 +01:00
sourceSets {
main {
java {
2021-01-28 06:57:36 +01:00
srcDir "src/main/schematics"
srcDir "src/main/registry"
srcDir "src/main/config"
2021-01-10 03:08:01 +01:00
}
}
}
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'
changelog = 'This is a test release. Please back up your worlds before loading this mod. A changelog can be found at https://github.com/DimensionalDevelopment/DimDoors/commits/1.17'
releaseType = 'alpha'
addGameVersion '1.17'
mainArtifact(file("${project.buildDir}/libs/${archivesBaseName}-${version}.jar")) {
displayName = "[${project.minecraft_version}] Dimensional Doors ${version}"
}
afterEvaluate {
uploadTask.dependsOn("remapJar")
}
}
options {
forgeGradleIntegration = false
}
}