mirror of
https://github.com/xfl03/MCCustomSkinLoader.git
synced 2026-11-13 20:44:02 +00:00
* Enhance ICustomSkinLoaderPlugin. * Support auto update config file per snapshot. Fix crash with forge 1.14.2 ~ 1.15.2. * ElyByAPI should check root now. * Remove unnecessary packages, add some deprecated loaders. * Reformat imports. * Move forge stuffs to another commit. * Fix config updating incorrectly.
36 lines
806 B
Groovy
36 lines
806 B
Groovy
/**
|
|
* Gradle Script for Version
|
|
* Format Version String
|
|
*/
|
|
|
|
boolean isRelease() {
|
|
String s = rootProject.ext.config.snapshot
|
|
return s == null || s == "" || s == "0"
|
|
}
|
|
|
|
boolean isSnapshot() {
|
|
return !isRelease()
|
|
}
|
|
|
|
String getBuildNum() {
|
|
if (System.getenv("CIRCLE_BUILD_NUM") != null)
|
|
return System.getenv("CIRCLE_BUILD_NUM")
|
|
return "00"
|
|
}
|
|
|
|
//Example: 14.10a-SNAPSHOT-33
|
|
String getCSLVersion() {
|
|
return rootProject.ext.config.version + rootProject.ext.config.dev_version +
|
|
(isRelease() ? '' : ('-SNAPSHOT-' + getBuildNum()))
|
|
}
|
|
|
|
//Example: 14.10a-s33
|
|
String getShortVersion() {
|
|
return getCSLVersion().replace("SNAPSHOT-", "s")
|
|
}
|
|
|
|
ext {
|
|
getBuildNum = this.&getBuildNum
|
|
getCSLVersion = this.&getCSLVersion
|
|
getShortVersion = this.&getShortVersion
|
|
} |