Unicopia/build.gradle

98 lines
2.5 KiB
Groovy
Raw Normal View History

2020-01-16 12:35:46 +01:00
plugins {
id 'java-library'
2020-06-26 11:44:47 +02:00
id 'fabric-loom' version '0.4-SNAPSHOT'
2020-01-16 12:35:46 +01:00
id 'maven-publish'
2018-09-12 01:29:35 +02:00
}
2020-01-16 12:35:46 +01:00
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_1_8
version = "${project.minecraft_version}-${project.version}"
if (project.release != 'RELEASE') {
version += "-${project.release}"
}
2018-09-12 01:29:35 +02:00
group = project.group
2020-01-16 12:35:46 +01:00
description = project.displayname
archivesBaseName = project.name
2018-09-12 01:29:35 +02:00
minecraft {
2020-01-16 12:35:46 +01:00
refmapName = 'unicopia.mixin.refmap.json'
2018-09-12 01:29:35 +02:00
}
2020-01-16 12:35:46 +01:00
repositories {
maven {
name = "dblsaiko"
url = "https://maven.dblsaiko.net/"
}
maven {
name = "Cotton"
url = "http://server.bbkr.space:8081/artifactory/libs-release/"
}
2020-01-16 12:35:46 +01:00
maven {
name = 'minelp'
url = 'http://repo.minelittlepony-mod.com/maven/snapshot'
}
maven {
name = 'minelp-release'
url = 'http://repo.minelittlepony-mod.com/maven/release'
}
2018-09-12 01:29:35 +02:00
}
2020-01-16 12:35:46 +01:00
// check for updates every build when on CI
if (System.env.CI) {
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
}
2020-01-16 12:35:46 +01:00
dependencies {
2020-01-16 12:35:46 +01:00
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"
//modApi "net.fabricmc.fabric-api:fabric-api-base:0.1.0+"
//modApi "net.fabricmc.fabric-api:fabric-events-lifecycle-v0:0.1.0+"
//modApi "net.fabricmc.fabric-api:fabric-resource-loader-v0:0.1.0+"
modCompile "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
2020-01-16 12:35:46 +01:00
modApi "com.minelittlepony:MineLittlePony:${project.minelp_version}"
2020-04-22 22:41:00 +02:00
2020-01-16 12:35:46 +01:00
modApi "com.minelittlepony:Kirin:${project.kirin_version}"
include "com.minelittlepony:Kirin:${project.kirin_version}"
2020-04-22 16:28:20 +02:00
modCompileOnly("io.github.prospector:modmenu:${project.modmenu_version}") {
transitive = false
}
modCompileOnly("grondag:canvas-mc116:${project.canvas_version}") {
exclude(group: "net.fabricmc.fabric-api")
exclude(module: "fabric-loader")
}
}
2019-01-07 13:49:01 +01:00
processResources {
2020-01-16 12:35:46 +01:00
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"
2018-09-12 01:29:35 +02:00
}
2019-01-26 07:40:23 +01:00
2020-01-16 12:35:46 +01:00
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources"
from sourceSets.main.allSource
2019-01-26 07:40:23 +01:00
}