mirror of
https://github.com/xfl03/MCCustomSkinLoader.git
synced 2026-11-21 20:52:33 +00:00
* Support Vanilla 1.8.9, 1.12.2, 1.15.2, 1.16.1. * Move vanilla specific version folders to "Vanilla" folder. * Fix launchwrapper dependency. * Update profile. * Move customskinloader.fabric.mixin to customskinloader.mixin
144 lines
4.1 KiB
Groovy
144 lines
4.1 KiB
Groovy
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
jcenter()
|
|
maven {
|
|
name = "forge"
|
|
url = "http://files.minecraftforge.net/maven"
|
|
}
|
|
}
|
|
dependencies {
|
|
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
|
|
}
|
|
}
|
|
apply plugin: 'net.minecraftforge.gradle.forge'
|
|
|
|
ext.configFile = file "build.properties"
|
|
configFile.withReader {
|
|
def prop = new Properties()
|
|
prop.load(it)
|
|
project.ext.config = new ConfigSlurper().parse prop
|
|
}
|
|
apply from: rootProject.file("BuildScripts/version.gradle")
|
|
|
|
archivesBaseName = "CustomSkinLoader_Forge"
|
|
version = getCSLVersion()
|
|
group = "customskinloader"
|
|
|
|
sourceCompatibility = targetCompatibility = 1.8
|
|
compileJava {
|
|
sourceCompatibility = targetCompatibility = 1.8
|
|
}
|
|
jar {
|
|
manifest {
|
|
attributes([
|
|
"FMLCorePlugin" : "customskinloader.forge.ForgePlugin",
|
|
"FMLCorePluginContainsFMLMod": true,
|
|
"Specification-Title" : "CustomSkinLoader",
|
|
"Specification-Vendor" : "xfl03",
|
|
"Specification-Version" : "1",
|
|
"Implementation-Title" : "CustomSkinLoader",
|
|
"Implementation-Version" : "${version}",
|
|
"Implementation-Vendor" : "xfl03",
|
|
"Implementation-Timestamp" : new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
|
|
])
|
|
}
|
|
exclude 'net/minecraft/client/renderer/texture/**'
|
|
exclude 'net/minecraftforge/**'
|
|
}
|
|
sourceSets {
|
|
main {
|
|
java {
|
|
//Common
|
|
srcDir "${rootDir}/Common/source"
|
|
//Forge
|
|
srcDir "source"
|
|
}
|
|
resources {
|
|
//Common
|
|
srcDir "${rootDir}/Common/resource"
|
|
exclude "Profile.json"
|
|
//Forge
|
|
srcDir "resource"
|
|
}
|
|
}
|
|
}
|
|
|
|
minecraft {
|
|
version = config.forge_mc_version + "-" + config.forge_version
|
|
runDir = "run"
|
|
mappings = config.mappings_version
|
|
clientJvmArgs += "-Dfml.coreMods.load=customskinloader.forge.ForgePlugin"
|
|
|
|
replace '@MOD_VERSION@', rootProject.ext.config.version
|
|
replace '@MOD_FULL_VERSION@', project.version
|
|
replaceIn 'CustomSkinLoader.java'
|
|
replaceIn 'ForgeMod.java'
|
|
}
|
|
|
|
processResources {
|
|
filesNotMatching("**/*.js"){
|
|
expand([
|
|
modVersion : rootProject.ext.config.version,
|
|
modFullVersion: project.version,
|
|
mcVersion : config.minecraft_version,
|
|
mcFullVersions: config.minecraft_full_versions,
|
|
forgeVersion : config.forge_version,
|
|
gitVersion : System.getenv("CIRCLE_SHA1"),
|
|
buildUrl : System.getenv("CIRCLE_BUILD_URL"),
|
|
releaseTime : new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
|
|
])}
|
|
}
|
|
|
|
task signJar(type: SignJar, dependsOn: reobfJar) {
|
|
onlyIf { System.getenv("KEY_PASS") != null }
|
|
doLast { System.out.println("Jar will be signed.") }
|
|
|
|
inputFile = jar.archivePath
|
|
outputFile = jar.archivePath
|
|
|
|
keyStore = 'CustomSkinLoader.jks'
|
|
alias = 'CustomSkinLoader'
|
|
storePass = System.getenv("KEY_PASS")
|
|
keyPass = System.getenv("KEY_PASS")
|
|
}
|
|
build.dependsOn signJar
|
|
|
|
task afterBuild {
|
|
doLast {
|
|
//copyBuildFile
|
|
copy {
|
|
from "build/libs"
|
|
into "${rootDir}/build/libs"
|
|
include "**/*.jar"
|
|
exclude "**/*-sources.jar"
|
|
}
|
|
}
|
|
}
|
|
build.finalizedBy afterBuild
|
|
|
|
|
|
apply plugin: 'maven-publish'
|
|
publishing {
|
|
repositories {
|
|
maven {
|
|
name = "GitHubPackages"
|
|
url = uri("https://maven.pkg.github.com/xfl03/MCCustomSkinLoader")
|
|
credentials {
|
|
username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")
|
|
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
|
|
}
|
|
}
|
|
}
|
|
publications {
|
|
gpr(MavenPublication) {
|
|
groupId 'customskinloader'
|
|
artifactId project.archivesBaseName
|
|
from(components.java)
|
|
}
|
|
}
|
|
}
|
|
tasks.withType(PublishToMavenRepository) {
|
|
onlyIf { System.getenv("GITHUB_TOKEN") != null }
|
|
}
|