2019-06-03 12:47:30 +02:00
|
|
|
// Fabric build script
|
|
|
|
// 03/06/2019
|
|
|
|
// https://github.com/FabricMC/fabric-example-mod/blob/master/build.gradle
|
|
|
|
|
2019-06-01 21:40:06 +02:00
|
|
|
plugins {
|
2019-06-03 01:32:12 +02:00
|
|
|
id 'fabric-loom' version '0.2.4-SNAPSHOT'
|
|
|
|
id 'maven-publish'
|
2016-01-15 08:49:17 +01:00
|
|
|
}
|
|
|
|
|
2019-05-27 17:59:15 +02:00
|
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
2019-03-24 10:54:38 +01:00
|
|
|
|
2019-06-03 01:32:12 +02:00
|
|
|
version = "${project.minecraft_version}-${project.version}"
|
2019-02-05 14:48:35 +01:00
|
|
|
|
2018-08-22 01:57:28 +02:00
|
|
|
if (project.release != 'RELEASE') {
|
|
|
|
version += "-${project.release}"
|
|
|
|
}
|
|
|
|
|
2018-08-22 02:29:17 +02:00
|
|
|
group = project.group
|
|
|
|
description = project.displayname
|
2019-03-24 11:04:36 +01:00
|
|
|
archivesBaseName = project.name
|
2015-08-02 00:36:33 +02:00
|
|
|
|
2019-06-02 01:08:36 +02:00
|
|
|
minecraft {
|
|
|
|
refmapName = 'minelp.mixin.refmap.json'
|
|
|
|
}
|
|
|
|
|
2019-06-01 21:40:06 +02:00
|
|
|
repositories {
|
|
|
|
maven {
|
2019-06-03 01:32:12 +02:00
|
|
|
name = 'minelp'
|
|
|
|
url = 'http://repo.minelittlepony-mod.com/maven/snapshot'
|
2019-06-01 21:40:06 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-05 17:27:55 +02:00
|
|
|
// check for updates every build when on CI
|
|
|
|
if (System.env.CI) {
|
|
|
|
configurations.all {
|
|
|
|
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-05-27 17:59:15 +02:00
|
|
|
dependencies {
|
2019-06-03 01:32:12 +02:00
|
|
|
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
|
|
|
mappings "net.fabricmc:yarn:${project.yarn_mappings}"
|
2019-07-04 05:40:56 +02:00
|
|
|
modApi "net.fabricmc:fabric-loader:${project.loader_version}"
|
2019-06-27 02:33:05 +02:00
|
|
|
|
2019-06-03 01:32:12 +02:00
|
|
|
compileOnly "com.google.code.findbugs:jsr305:3.0.2"
|
|
|
|
|
2019-07-03 03:41:45 +02:00
|
|
|
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+"
|
2019-05-27 17:59:15 +02:00
|
|
|
|
2019-07-08 04:47:13 +02:00
|
|
|
modApi "com.minelittlepony:Kirin:${project.kirin_version}"
|
2019-06-27 02:07:30 +02:00
|
|
|
include "com.minelittlepony:Kirin:${project.kirin_version}"
|
2019-06-01 21:40:06 +02:00
|
|
|
|
2019-07-04 05:40:56 +02:00
|
|
|
modImplementation "com.minelittlepony:HDSkins:${project.hd_skins_version}"
|
2019-07-06 21:50:44 +02:00
|
|
|
modImplementation "io.github.prospector.modmenu:ModMenu:1.6.2-93"
|
2019-05-27 17:59:15 +02:00
|
|
|
}
|
|
|
|
|
2019-06-12 16:37:50 +02:00
|
|
|
//
|
|
|
|
// Imports the Background Ponies from the MLP Community Skin Pack
|
|
|
|
//
|
|
|
|
task copyBGPones(type: Copy) {
|
|
|
|
|
|
|
|
def illegals = /[^a-z0-9_\/.-]/
|
|
|
|
|
|
|
|
from "skins/Background Ponies"
|
|
|
|
into temporaryDir
|
|
|
|
|
|
|
|
eachFile {
|
|
|
|
if (it.name =~ illegals) {
|
|
|
|
logger.warn("Sanitizing file with illegal characters: ${it.path}")
|
|
|
|
it.name = it.name.replaceAll(/\s/, '_').replaceAll(illegals, '')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-05-27 17:59:15 +02:00
|
|
|
processResources {
|
2019-06-03 01:32:12 +02:00
|
|
|
inputs.property "version", project.version
|
2019-03-24 11:22:25 +01:00
|
|
|
|
2019-06-03 01:32:12 +02:00
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
|
|
include "fabric.mod.json"
|
|
|
|
expand "version": project.version
|
|
|
|
}
|
2019-03-24 11:22:25 +01:00
|
|
|
|
2019-06-03 01:32:12 +02:00
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
|
|
exclude "fabric.mod.json"
|
|
|
|
}
|
2019-06-12 16:37:50 +02:00
|
|
|
|
2019-06-01 21:40:06 +02:00
|
|
|
from 'LICENSE'
|
2019-06-12 16:37:50 +02:00
|
|
|
|
|
|
|
exclude "/assets/minelittlepony/textures/entity/pony"
|
|
|
|
from(copyBGPones) {
|
|
|
|
into "/assets/minelittlepony/textures/entity/pony"
|
|
|
|
}
|
2019-03-24 11:22:25 +01:00
|
|
|
}
|
|
|
|
|
2019-05-27 17:59:15 +02:00
|
|
|
tasks.withType(JavaCompile) {
|
2019-06-03 01:32:12 +02:00
|
|
|
options.encoding = "UTF-8"
|
2019-03-25 00:29:56 +01:00
|
|
|
}
|
|
|
|
|
2019-05-27 17:59:15 +02:00
|
|
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
2019-06-03 01:32:12 +02:00
|
|
|
classifier = "sources"
|
|
|
|
from sourceSets.main.allSource
|
2018-08-22 01:57:28 +02:00
|
|
|
}
|
2018-07-08 09:35:11 +02:00
|
|
|
|
2019-06-03 01:32:12 +02:00
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
maven(MavenPublication) {
|
|
|
|
afterEvaluate {
|
|
|
|
artifact(remapJar.output)
|
|
|
|
}
|
|
|
|
artifact(sourcesJar) {
|
|
|
|
builtBy remapSourcesJar
|
|
|
|
}
|
|
|
|
|
|
|
|
pom {
|
|
|
|
name = "MineLittlePony"
|
|
|
|
description = "HD Skins support for Minecraft"
|
|
|
|
url = "http://minelittlepony-mod.com"
|
|
|
|
licenses {
|
|
|
|
license {
|
|
|
|
name = "MIT Public License"
|
|
|
|
url = "https://tlo.mit.edu/learn-about-intellectual-property/software-and-open-source-licensing"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
developers {
|
|
|
|
developer {
|
|
|
|
id = "killjoy1221"
|
|
|
|
name = "Matthew Messinger"
|
|
|
|
email = "mattmess1221@gmail.com"
|
|
|
|
}
|
|
|
|
developer {
|
|
|
|
id = "sollace"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
scm {
|
|
|
|
connection = 'scm:git:git://github.com/MineLittlePony/MineLittlePony.git'
|
|
|
|
developerConnection = 'scm:git:ssh://github.com/MineLittlePony/MineLittlePony.git'
|
|
|
|
url = 'https://github.com/MineLittlePony/MineLittlePony'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
maven {
|
|
|
|
name = "MineLittlePony"
|
|
|
|
def mvn = 's3://repo.minelittlepony-mod.com/maven'
|
|
|
|
url = release == 'SNAPSHOT' ? "$mvn/snapshot" : "$mvn/release"
|
|
|
|
|
|
|
|
credentials(AwsCredentials) {
|
|
|
|
accessKey = System.env.ACCESS_KEY
|
|
|
|
secretKey = System.env.SECRET_KEY
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-06-05 17:27:55 +02:00
|
|
|
}
|