mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-21 20:18:01 +01:00
155 lines
4.4 KiB
Groovy
155 lines
4.4 KiB
Groovy
plugins {
|
|
id 'java-library'
|
|
id 'fabric-loom' version '0.8-SNAPSHOT'
|
|
id 'maven-publish'
|
|
id 'org.ajoberstar.reckon' version '0.13.0'
|
|
}
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(16)
|
|
}
|
|
}
|
|
|
|
group = project.group
|
|
description = project.displayname
|
|
archivesBaseName = project.name
|
|
|
|
minecraft {
|
|
refmapName = 'minelp.mixin.refmap.json'
|
|
accessWidener 'src/main/resources/minelp.aw'
|
|
}
|
|
|
|
reckon {
|
|
scopeFromProp()
|
|
stageFromProp('beta', 'rc', 'final')
|
|
}
|
|
|
|
repositories {
|
|
mavenLocal()
|
|
maven {
|
|
name = 'modmenu'
|
|
url = 'https://maven.terraformersmc.com/releases'
|
|
}
|
|
maven {
|
|
name = 'minelp'
|
|
url = 'https://repo.minelittlepony-mod.com/maven/snapshot'
|
|
}
|
|
maven {
|
|
name = 'minelp-release'
|
|
url = 'https://repo.minelittlepony-mod.com/maven/release'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
|
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
|
|
modApi "net.fabricmc:fabric-loader:${project.loader_version}"
|
|
|
|
modApi fabricApi.module("fabric-api-base", project.fabric_version)
|
|
modApi fabricApi.module("fabric-lifecycle-events-v1", project.fabric_version)
|
|
modApi fabricApi.module("fabric-resource-loader-v0", project.fabric_version)
|
|
modApi fabricApi.module("fabric-networking-v0", project.fabric_version)
|
|
|
|
modApi "com.minelittlepony:kirin:${project.kirin_version}"
|
|
include "com.minelittlepony:kirin:${project.kirin_version}"
|
|
|
|
modApi "com.minelittlepony:mson:${project.mson_version}"
|
|
include "com.minelittlepony:mson:${project.mson_version}"
|
|
|
|
modImplementation "com.minelittlepony:hdskins:${project.hd_skins_version}"
|
|
modCompileOnly("com.terraformersmc:modmenu:${project.modmenu_version}")
|
|
}
|
|
|
|
//
|
|
// 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, '')
|
|
}
|
|
}
|
|
}
|
|
processResources {
|
|
inputs.property "version", project.version.toString()
|
|
|
|
filesMatching("fabric.mod.json") {
|
|
expand "version": project.version.toString()
|
|
}
|
|
|
|
from 'LICENSE'
|
|
|
|
exclude "/assets/minelittlepony/textures/entity/pony"
|
|
from(copyBGPones) {
|
|
into "/assets/minelittlepony/textures/entity/pony"
|
|
}
|
|
}
|
|
|
|
tasks.withType(JavaCompile) {
|
|
options.encoding = "UTF-8"
|
|
}
|
|
|
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
|
classifier = "sources"
|
|
from sourceSets.main.allSource
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
maven(MavenPublication) {
|
|
afterEvaluate {
|
|
artifact(remapJar)
|
|
}
|
|
artifact(sourcesJar) {
|
|
builtBy remapSourcesJar
|
|
}
|
|
|
|
pom {
|
|
name = "MineLittlePony"
|
|
description = "HD Skins support for Minecraft"
|
|
url = "https://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 stage = version.version.stage.value
|
|
url = "s3://repo.minelittlepony-mod.com/maven/${stage != null && stage.name == 'beta' ? 'snapshot' : 'release'}"
|
|
credentials(AwsCredentials) {
|
|
accessKey = System.env.ACCESS_KEY
|
|
secretKey = System.env.SECRET_KEY
|
|
}
|
|
}
|
|
}
|
|
}
|