2016-01-15 08:49:17 +01:00
|
|
|
buildscript {
|
2018-07-09 00:58:20 +02:00
|
|
|
repositories {
|
|
|
|
jcenter()
|
|
|
|
maven {
|
|
|
|
name 'forge'
|
|
|
|
url 'http://files.minecraftforge.net/maven'
|
|
|
|
}
|
|
|
|
maven {
|
|
|
|
name = 'sponge'
|
|
|
|
url = 'https://repo.spongepowered.org/maven'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
dependencies {
|
2019-03-24 11:07:41 +01:00
|
|
|
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
|
2018-07-09 01:02:24 +02:00
|
|
|
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.4'
|
2018-07-09 00:58:20 +02:00
|
|
|
}
|
2016-01-15 08:49:17 +01:00
|
|
|
}
|
|
|
|
|
2018-08-22 01:57:28 +02:00
|
|
|
plugins {
|
|
|
|
id 'org.ajoberstar.grgit' version '1.7.2'
|
|
|
|
}
|
|
|
|
|
2019-03-24 10:54:38 +01:00
|
|
|
apply plugin: 'net.minecraftforge.gradle'
|
|
|
|
apply plugin: 'eclipse'
|
2018-07-09 00:00:58 +02:00
|
|
|
apply plugin: 'com.github.johnrengelman.shadow'
|
2016-01-15 08:49:17 +01:00
|
|
|
|
2019-03-24 10:54:38 +01:00
|
|
|
sourceCompatibility = '1.8'
|
|
|
|
targetCompatibility = '1.8'
|
|
|
|
compileJava.sourceCompatibility = '1.8'
|
|
|
|
compileJava.targetCompatibility = '1.8'
|
|
|
|
|
2018-08-22 01:57:28 +02:00
|
|
|
ext {
|
|
|
|
revision = grgit.log().size()
|
|
|
|
hash = grgit.head().abbreviatedId
|
|
|
|
if (file('.git/shallow').exists()) {
|
|
|
|
// don't clone with --depth
|
|
|
|
revision = -1
|
|
|
|
hash += " shallow"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-02-05 14:48:35 +01:00
|
|
|
version = "${project.minecraft_version}.${project.version}"
|
|
|
|
|
2018-08-22 01:57:28 +02:00
|
|
|
if (project.release != 'RELEASE') {
|
|
|
|
version += "-${project.release}"
|
|
|
|
}
|
|
|
|
if (project.release == 'SNAPSHOT') {
|
|
|
|
version += "-${project.revision}-${project.hash}"
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
2015-12-09 22:05:21 +01:00
|
|
|
sourceSets {
|
2019-03-24 10:30:57 +01:00
|
|
|
client {
|
|
|
|
// Client-only code
|
|
|
|
compileClasspath += main.compileClasspath
|
|
|
|
compileClasspath += main.output
|
2018-07-09 00:58:20 +02:00
|
|
|
}
|
2019-03-24 10:30:57 +01:00
|
|
|
main {
|
|
|
|
}
|
2019-03-25 16:33:58 +01:00
|
|
|
|
2019-03-24 10:54:38 +01:00
|
|
|
fml {
|
|
|
|
compileClasspath += main.compileClasspath
|
|
|
|
compileClasspath += main.output
|
|
|
|
compileClasspath += client.output
|
|
|
|
}
|
|
|
|
|
2019-04-14 13:32:01 +02:00
|
|
|
// TODO: Disable the hidden "test" sourceset
|
|
|
|
// TODO: Disable the resources folders for sourcesets that don't need them
|
2017-06-13 05:55:50 +02:00
|
|
|
}
|
2016-11-24 08:01:23 +01:00
|
|
|
|
2019-03-24 11:22:25 +01:00
|
|
|
minecraft {
|
2019-03-25 00:29:56 +01:00
|
|
|
mappings channel: project.mappings_channel, version: project.mappings_version + "-" + project.minecraft_version
|
2019-03-24 11:22:25 +01:00
|
|
|
|
|
|
|
runs {
|
|
|
|
client {
|
|
|
|
workingDirectory project.file('run')
|
|
|
|
|
2019-04-14 13:56:09 +02:00
|
|
|
property 'forge.logging.markers', 'SCAN'
|
2019-03-24 11:22:25 +01:00
|
|
|
property 'forge.logging.console.level', 'debug'
|
|
|
|
|
|
|
|
mods {
|
|
|
|
minelittlepony {
|
2019-03-31 12:44:26 +02:00
|
|
|
// TODO: Remember to add /bin/default to the Environment configs
|
2019-03-31 12:28:14 +02:00
|
|
|
// minelittlepony%%C:/.../bin/default
|
2019-03-31 12:44:26 +02:00
|
|
|
source sourceSets.common
|
|
|
|
source sourceSets.client
|
|
|
|
source sourceSets.main
|
2019-03-31 12:28:14 +02:00
|
|
|
source sourceSets.fml
|
2019-03-24 11:22:25 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-03-25 00:29:56 +01:00
|
|
|
repositories {
|
|
|
|
maven {
|
|
|
|
url = 'https://repo.spongepowered.org/maven'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-07-08 09:35:11 +02:00
|
|
|
dependencies {
|
2019-03-26 18:50:49 +01:00
|
|
|
// TODO: Add HDSkins as a dependency. It won't compile without it.
|
2019-04-14 13:32:01 +02:00
|
|
|
// TODO: Add KirinUI as a dependency.
|
2019-03-26 18:50:49 +01:00
|
|
|
|
2019-04-14 13:56:09 +02:00
|
|
|
minecraft "net.minecraftforge:forge:" + project.minecraft_version + "-" + project.forge_version
|
2019-03-24 10:54:38 +01:00
|
|
|
|
2018-08-26 04:40:07 +02:00
|
|
|
compile('org.spongepowered:mixin:0.7.11-SNAPSHOT') {
|
|
|
|
transitive = false
|
2019-04-15 13:14:41 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
compile project(':hdskins') {
|
|
|
|
transitive = false
|
2018-08-26 04:40:07 +02:00
|
|
|
}
|
2018-07-08 09:35:11 +02:00
|
|
|
}
|
2018-08-22 02:29:17 +02:00
|
|
|
|
2018-08-22 01:57:28 +02:00
|
|
|
manifest {
|
2019-04-14 13:56:09 +02:00
|
|
|
attributes(
|
|
|
|
"Implementation-Version": "${version} (git-${project.hash})",
|
|
|
|
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
|
|
|
|
)
|
2018-08-22 01:57:28 +02:00
|
|
|
}
|
2018-07-08 09:35:11 +02:00
|
|
|
|
2015-08-02 00:36:33 +02:00
|
|
|
jar {
|
2019-03-24 10:54:38 +01:00
|
|
|
from sourceSets.main.output
|
|
|
|
from sourceSets.client.output
|
|
|
|
from sourceSets.fml.output
|
|
|
|
|
2018-07-09 01:02:24 +02:00
|
|
|
classifier 'base'
|
|
|
|
extension 'jar'
|
2018-07-09 00:00:58 +02:00
|
|
|
}
|
2018-08-22 02:29:17 +02:00
|
|
|
|
2019-04-14 13:56:09 +02:00
|
|
|
//
|
|
|
|
// Imports the Background Ponies from the MLP Community Skin Pack
|
|
|
|
//
|
2018-11-05 14:47:05 +01:00
|
|
|
task copyBGPones(type: Copy) {
|
2018-11-06 01:32:30 +01:00
|
|
|
|
|
|
|
def illegals = /[^a-z0-9_\/.-]/
|
|
|
|
|
2018-11-14 22:21:40 +01:00
|
|
|
from "skins/Background Ponies"
|
2018-11-06 01:32:30 +01:00
|
|
|
into temporaryDir
|
|
|
|
|
|
|
|
eachFile {
|
|
|
|
if (it.name =~ illegals){
|
|
|
|
logger.warn("Sanitizing file with illegal characters: ${it.path}")
|
|
|
|
it.name = it.name.replaceAll(/\s/, '_').replaceAll(illegals, '')
|
2018-11-05 14:47:05 +01:00
|
|
|
}
|
|
|
|
}
|
2018-11-06 01:32:30 +01:00
|
|
|
}
|
|
|
|
|
2019-04-14 13:56:09 +02:00
|
|
|
//
|
|
|
|
// Creates HorseLib
|
|
|
|
// A common library for mods to load MineLP features on the server without
|
|
|
|
// any client components
|
2019-03-24 10:30:57 +01:00
|
|
|
task horseLib(type: Jar) {
|
2019-04-14 13:56:09 +02:00
|
|
|
// TODO: Add KirinUI as a dependency.
|
2019-03-24 10:30:57 +01:00
|
|
|
from sourceSets.main.output
|
|
|
|
|
2019-04-14 13:56:09 +02:00
|
|
|
baseName = "HorseLib"
|
2019-03-24 10:30:57 +01:00
|
|
|
}
|