mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-23 21:38:00 +01:00
97 lines
2.7 KiB
Groovy
97 lines
2.7 KiB
Groovy
plugins {
|
|
id 'java-library'
|
|
id 'fabric-loom' version '0.4-SNAPSHOT' apply false
|
|
}
|
|
|
|
allprojects {
|
|
apply plugin: 'fabric-loom'
|
|
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
version = "${project.minecraft_version}-${project.version}"
|
|
|
|
if (project.release != 'RELEASE') {
|
|
version += "-${project.release}"
|
|
}
|
|
|
|
group = project.group
|
|
description = project.displayname
|
|
archivesBaseName = project.name
|
|
|
|
// check for updates every build when on CI
|
|
if (System.env.CI) {
|
|
configurations.all {
|
|
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
|
mappings "net.fabricmc:yarn:${project.yarn_mappings}"
|
|
modApi "net.fabricmc:fabric-loader:${project.loader_version}"
|
|
|
|
compileOnly "com.google.code.findbugs:jsr305:3.0.2"
|
|
|
|
modCompile "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
|
}
|
|
|
|
processResources {
|
|
inputs.property "version", project.version
|
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
include "fabric.mod.json"
|
|
expand "version": project.version
|
|
}
|
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
exclude "fabric.mod.json"
|
|
}
|
|
}
|
|
|
|
tasks.withType(JavaCompile) {
|
|
options.encoding = "UTF-8"
|
|
}
|
|
|
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
|
classifier = "sources"
|
|
from sourceSets.main.allSource
|
|
}
|
|
}
|
|
|
|
minecraft {
|
|
refmapName = 'unicopia.mixin.refmap.json'
|
|
}
|
|
|
|
repositories {
|
|
maven {
|
|
name = 'minelp'
|
|
url = 'http://repo.minelittlepony-mod.com/maven/snapshot'
|
|
}
|
|
maven {
|
|
name = 'minelp-release'
|
|
url = 'http://repo.minelittlepony-mod.com/maven/release'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
modApi "com.minelittlepony:MineLittlePony:${project.minelp_version}"
|
|
|
|
modApi "com.minelittlepony:Kirin:${project.kirin_version}"
|
|
include "com.minelittlepony:Kirin:${project.kirin_version}"
|
|
|
|
modCompileOnly("io.github.prospector:modmenu:${project.modmenu_version}") {
|
|
transitive = false
|
|
}
|
|
|
|
// Fix circular error when gradle tries to build this project as a pre-requisite to :canvas-compat
|
|
// Build will fail if the sub-project isn't built first though,
|
|
// so make sure to run gradlew :canvas-compat:build before doing gradlew build
|
|
if (file("./canvas-compat/build/libs/${project(':canvas-compat').jar.archiveName}").exists()) {
|
|
modCompileOnly project(":canvas-compat")
|
|
}
|
|
|
|
afterEvaluate {
|
|
include project(":canvas-compat")
|
|
}
|
|
}
|