forked from xjboss/KCauldronX
Change version start at 1 and change mainfast KCauldron to KCauldronX and using the jenkins's build ID
This commit is contained in:
parent
f15e1456f3
commit
1a8c4700aa
29
build.gradle
29
build.gradle
@ -57,7 +57,7 @@ minecraft {
|
|||||||
|
|
||||||
srgExtra "PK: org/bukkit/craftbukkit org/bukkit/craftbukkit/v1_7_R4"
|
srgExtra "PK: org/bukkit/craftbukkit org/bukkit/craftbukkit/v1_7_R4"
|
||||||
}
|
}
|
||||||
group = 'pw.prok'
|
group = 'pw.yumc'
|
||||||
ext.buildInfoCached = null;
|
ext.buildInfoCached = null;
|
||||||
|
|
||||||
def buildInfo(String key) {
|
def buildInfo(String key) {
|
||||||
@ -96,11 +96,12 @@ def gitInfo(String key) {
|
|||||||
}
|
}
|
||||||
return key ? gitInfoCached[key] : gitInfoCached;
|
return key ? gitInfoCached[key] : gitInfoCached;
|
||||||
}
|
}
|
||||||
|
ext.sys= System.properties
|
||||||
ext.mcVersion = "1.7.10"
|
ext.mcVersion = "1.7.10"
|
||||||
ext.forgeVersion = VersionParser.parseForgeRevision(file('src/main/resources/fmlversion.properties'))
|
ext.forgeVersion = VersionParser.parseForgeRevision(file('src/main/resources/fmlversion.properties'))
|
||||||
ext.revision = project.hasProperty('revision') ? project.getProperty('revision') : buildInfo('nextBuildNumber')
|
ext.build = sys.hasProperty('BUILD_NUMBER') ? sys.getProperty('BUILD_NUMBER') : "Unkonwn"
|
||||||
version = "${mcVersion}-${forgeVersion}.${revision}"
|
ext.kcx_version = 1
|
||||||
|
version = "${mcVersion}-${forgeVersion}-${kcx_version}.${build}"
|
||||||
if (project.hasProperty('officialBuild')) println "Updated KCauldron version: ${version}"
|
if (project.hasProperty('officialBuild')) println "Updated KCauldron version: ${version}"
|
||||||
|
|
||||||
launch4j {
|
launch4j {
|
||||||
@ -169,13 +170,13 @@ def generateClasspath(boolean legacy = false) {
|
|||||||
|
|
||||||
def generateManifest(boolean legacy = false) {
|
def generateManifest(boolean legacy = false) {
|
||||||
[
|
[
|
||||||
'KCauldron-Git-Branch' : gitInfo('branch'),
|
'KCauldronX-Git-Branch' : gitInfo('branch'),
|
||||||
'KCauldron-Git-Hash' : gitInfo('fullHash'),
|
'KCauldronX-Git-Hash' : gitInfo('fullHash'),
|
||||||
'KCauldron-Group' : project.group,
|
'KCauldronX-Group' : project.group,
|
||||||
'KCauldron-Channel' : project.name,
|
'KCauldronX-Channel' : project.name,
|
||||||
'KCauldron-Version' : project.version,
|
'KCauldronX-Version' : project.version,
|
||||||
'KCauldron-Legacy' : legacy,
|
'KCauldronX-Legacy' : legacy,
|
||||||
'KCauldron-Official' : project.hasProperty('officialBuild'),
|
'KCauldronX-Official' : sys.hasProperty('officialBuild'),
|
||||||
'Implementation-Vendor' : 'Prototik',
|
'Implementation-Vendor' : 'Prototik',
|
||||||
'Implementation-Title' : project.name,
|
'Implementation-Title' : project.name,
|
||||||
'Implementation-Version': '1.7.10-R0.1-SNAPSHOT',
|
'Implementation-Version': '1.7.10-R0.1-SNAPSHOT',
|
||||||
@ -206,12 +207,14 @@ tasks.packageInstaller.onlyIf { false }
|
|||||||
|
|
||||||
task packageChangelog(type: CreateChangelog) {
|
task packageChangelog(type: CreateChangelog) {
|
||||||
onlyIf { project.hasProperty('officialBuild') }
|
onlyIf { project.hasProperty('officialBuild') }
|
||||||
|
/*
|
||||||
classifier = 'changelog'
|
classifier = 'changelog'
|
||||||
extension = 'txt'
|
extension = 'txt'
|
||||||
oldChangelogUrl = "https://repo.prok.pw/${project.group.replace('.', '/')}/${project.name}/${buildInfo('version')}/${project.name}-${buildInfo('version')}-changelog.txt"
|
oldChangelogUrl = "https://repo.prok.pw/${project.group.replace('.', '/')}/${project.name}/${buildInfo('version')}/${project.name}-${buildInfo('version')}-changelog.txt"
|
||||||
hash = gitInfo('hash')
|
hash = gitInfo('hash')
|
||||||
message = gitInfo('message')
|
message = gitInfo('message')
|
||||||
version = project.version
|
version = project.version
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
task bundleStub(type: Jar) {
|
task bundleStub(type: Jar) {
|
||||||
@ -263,7 +266,7 @@ def getSignatureFiles = {
|
|||||||
[archive: signedJar, classifier: null, extension: 'jar.asc']
|
[archive: signedJar, classifier: null, extension: 'jar.asc']
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
publishing {
|
publishing {
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
@ -294,7 +297,7 @@ publishing {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
tasks.generateProjectCauldron {
|
tasks.generateProjectCauldron {
|
||||||
doLast {
|
doLast {
|
||||||
def file = new File('eclipse/cauldron/build.gradle')
|
def file = new File('eclipse/cauldron/build.gradle')
|
||||||
|
@ -29,7 +29,7 @@ public class KCauldron {
|
|||||||
while (resources.hasMoreElements()) {
|
while (resources.hasMoreElements()) {
|
||||||
URL url = resources.nextElement();
|
URL url = resources.nextElement();
|
||||||
manifest.load(url.openStream());
|
manifest.load(url.openStream());
|
||||||
String version = manifest.getProperty("KCauldron-Version");
|
String version = manifest.getProperty("KCauldronX-Version");
|
||||||
if (version != null) {
|
if (version != null) {
|
||||||
String path = url.getPath();
|
String path = url.getPath();
|
||||||
String jarFilePath = path.substring(path.indexOf(":") + 1,
|
String jarFilePath = path.substring(path.indexOf(":") + 1,
|
||||||
@ -38,11 +38,11 @@ public class KCauldron {
|
|||||||
sServerLocation = new File(jarFilePath);
|
sServerLocation = new File(jarFilePath);
|
||||||
|
|
||||||
sCurrentVersion = version;
|
sCurrentVersion = version;
|
||||||
sGroup = manifest.getProperty("KCauldron-Group");
|
sGroup = manifest.getProperty("KCauldronX-Group");
|
||||||
sBranch = manifest.getProperty("KCauldron-Branch");
|
sBranch = manifest.getProperty("KCauldronX-Branch");
|
||||||
sChannel = manifest.getProperty("KCauldron-Channel");
|
sChannel = manifest.getProperty("KCauldronX-Channel");
|
||||||
sLegacy = Boolean.parseBoolean(manifest.getProperty("KCauldron-Legacy"));
|
sLegacy = Boolean.parseBoolean(manifest.getProperty("KCauldronX-Legacy"));
|
||||||
sOfficial = Boolean.parseBoolean(manifest.getProperty("KCauldron-Official"));
|
sOfficial = Boolean.parseBoolean(manifest.getProperty("KCauldronX-Official"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
manifest.clear();
|
manifest.clear();
|
||||||
|
Loading…
Reference in New Issue
Block a user