Include changelog in published artifacts.

This commit is contained in:
LexManos 2018-11-14 13:39:56 -08:00
parent e693dd4923
commit 93eabce1bc
5 changed files with 41 additions and 28 deletions

3
Jenkinsfile vendored
View file

@ -31,7 +31,6 @@ pipeline {
post {
success {
writeChangelog(currentBuild, 'build/changelog.txt')
archiveArtifacts artifacts: 'build/changelog.txt', fingerprint: false
}
}
}
@ -61,7 +60,7 @@ pipeline {
}
post {
always {
archiveArtifacts artifacts: 'projects/forge/build/libs/**/*.jar', fingerprint: true
archiveArtifacts artifacts: 'projects/forge/build/libs/**/*.*', fingerprint: true
//junit 'build/test-results/*/*.xml'
//jacoco sourcePattern: '**/src/*/java'
}

View file

@ -39,12 +39,16 @@ ext {
keystore: project.properties.keystore
]
}
MAPPING_CHANNEL = 'snapshot'
MAPPING_VERSION = '20180921-1.13'
MC_VERSION = '1.13'
MCP_VERSION = '2018.09.12.04.11.00'
}
project(':mcp') {
apply plugin: 'net.minecraftforge.gradle.forgedev.mcp'
mcp {
config = '1.13-2018.09.12.04.11.00'
config = MC_VERSION + '-' + MCP_VERSION
pipeline = 'joined'
}
}
@ -59,8 +63,8 @@ project(':clean') {
patcher {
parent = project(':mcp')
patchedSrc = file('src/main/java')
mappings channel: 'snapshot', version: '20180921-1.13'
mcVersion = '1.13'
mappings channel: MAPPING_CHANNEL, version: MAPPING_VERSION
mcVersion = MC_VERSION
}
task runclient(type: JavaExec) {
doFirst {
@ -99,13 +103,11 @@ project(':forge') {
mavenCentral()
}
ext {
MC_VERSION = '1.13'
SPEC_VERSION = '24.0' // This is overwritten by git tag, but here so dev time doesnt explode
// The new versioning sceme is <MCVersion>-<ForgeMC>.<RB>.<CommitsSinceRB>
// ForgeMC is a unique identifier for every MC version we have supported.
// Essentially, the same as the old, except dropping the first number, and the builds are no longer unique.
MCP_ARTIFACT = project(':mcp').mcp.config
MCP_VERSION = project(':mcp').mcp.config.version.split('-')[1] // The timestamp only.
}
patcher {
parent = project(':clean')
@ -145,7 +147,7 @@ project(':forge') {
if (branch != null && branch.endsWith('.x') && MC_VERSION.startsWith(branch.substring(0, branch.length() - 2))) //1.13.x
branch = null
SPEC_VERSION = tag
return "${MC_VERSION}-${tag}.${offset}${t -> if (branch != null) t << '-' + branch}"
return "${MC_VERSION}-${tag}.${offset}${t -> if (branch != null) t << '-' + branch}".toString() //Bake the response instead of making it dynamic
}
group = 'net.minecraftforge.test' //TODO: remove when we jenkins is working
@ -239,10 +241,16 @@ project(':forge') {
rootProject.file('CREDITS.txt'),
rootProject.file('LICENSE.txt')
]
/* TODO: Changelog
if (project.hasProperty('forgeJenkinsPass'))
def jenkinsChangelog = rootProject.file('build/changelog.txt')
def changelog = file("build/libs/${project.name}-${project.version}-changelog.txt")
if (jenkinsChangelog.exists()) {
if (!changelog.parentFile.exists())
changelog.parentFile.mkdirs()
java.nio.file.Files.copy(jenkinsChangelog.toPath(), changelog.toPath(), java.nio.file.StandardCopyOption.REPLACE_EXISTING)
extraTxts += changelog
*/
println extraTxts
}
task downloadCrowdin() {
ext {
@ -351,7 +359,7 @@ project(':forge') {
task launcherJson(dependsOn: 'signUniversal') {
inputs.file universalJar.archivePath
ext {
output = file('build/libs/version.json')
output = file('build/version.json')
vanilla = project(':mcp').file('build/mcp/downloadJson/version.json')
timestamp = dateToIso8601(new Date())
comment = [
@ -413,7 +421,7 @@ project(':forge') {
task installerJson(dependsOn: [launcherJson, genClientBinPatches, applyClientBinPatches, applyServerBinPatches]) {
ext {
output = file('build/libs/install_profile.json')
output = file('build/install_profile.json')
INSTALLER_TOOLS = 'net.minecraftforge:installertools:1.0.3'
JAR_SPLITTER = 'net.minecraftforge:jarsplitter:1.0.4'
}
@ -640,6 +648,7 @@ project(':forge') {
task installerJar(type: Zip, dependsOn: [downloadInstaller, signUniversal, installerJson, launcherJson, genClientBinPatches, genServerBinPatches]) {
classifier = 'installer'
extension = 'jar' //Needs to be Zip task to not override Manifest, so set extension
destinationDir = file('build/libs')
from(extraTxts)
from(rootProject.file('/src/main/resources/forge_logo.png')) {
rename{'big_logo.png'}
@ -683,7 +692,7 @@ project(':forge') {
baseName = project.name
classifier = 'mdk'
version = project.version
destinationDir = file('build/distributions')
destinationDir = file('build/libs')
from rootProject.file('gradlew')
from rootProject.file('gradlew.bat')
@ -692,10 +701,16 @@ project(':forge') {
into('gradle/')
}
from(rootProject.file('mdk/')){
/* filter(ReplaceTokens, tokens: [
VERSION: project.version
rootProject.file('mdk/gitignore.txt').eachLine{
if (!it.trim().isEmpty() && !it.trim().startsWith('#'))
exclude it
}
filter(ReplaceTokens, tokens: [
FORGE_VERSION: project.version,
MC_VERSION: MC_VERSION,
MAPPING_CHANNEL: MAPPING_CHANNEL,
MAPPING_VERSION: MAPPING_VERSION
])
*/
rename 'gitignore\\.txt', '.gitignore'
}
}
@ -732,7 +747,8 @@ project(':forge') {
publications {
mavenJava(MavenPublication) {
artifact universalJar
//TODO: changelog
if (changelog.exists())
artifact changelog
artifact installerJar
//TODO: installer-win
artifact makeMdk

View file

@ -20,10 +20,6 @@ apply plugin: 'net.minecraftforge.gradle'
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
apply plugin: 'eclipse'
repositories {
maven { url ='file://' + file('../repo').absolutePath } //Used by Forge development testing only, you can delete this.
}
version = '1.0'
group = 'com.yourname.modid' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'modid'
@ -39,16 +35,16 @@ minecraft {
// stable_# stables are built at the discretion of the MCP team.
// Use non-default mappings at your own risk. they may not always work.
// simply re-run your setup task after changing the mappings to update your workspace.
mappings channel: 'snapshot', version: '20180921-1.13'
mappings channel: '@MAPPING_CHANNEL@', version: '@MAPPING_VERSION@'
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
accessTransformer = file('test_at.cfg')
//accessTransformer = file('my_at.cfg')
}
dependencies {
// Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
// that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
minecraft 'net.minecraftforge:forge:1.13-15.24.0.0-1.13-pre'
minecraft 'net.minecraftforge:forge:@FORGE_VERSION@'
// you may put jars on which you depend on in ./libs
// or you may define them like so..
@ -76,14 +72,14 @@ dependencies {
processResources {
// this will ensure that this task is redone when the versions change.
inputs.property 'version', project.version
inputs.property 'mcversion', '1.13'
inputs.property 'mcversion', '@MC_VERSION@'
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
// replace version and mcversion
expand 'version':project.version, 'mcversion': '1.13'
expand 'version':project.version, 'mcversion': '@MC_VERSION@'
}
// copy everything else except the mcmod.info

View file

@ -20,3 +20,6 @@ build
# other
eclipse
run
# Files from Forge MDK
forge*changelog.txt

View file

@ -1 +0,0 @@
public net.minecraft.block.Block field_196273_d # LOGGER