1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-11-19 00:04:53 +00:00

Merge pull request #357 from SquidDev-CC/hotfix/credits-include

Various improvements to credits generation
This commit is contained in:
Daniel Ratcliffe 2017-07-07 20:57:36 +01:00 committed by GitHub
commit db2364dae6

View File

@ -78,21 +78,23 @@ processResources {
inputs.property "mcversion", project.minecraft.version inputs.property "mcversion", project.minecraft.version
def grgit = Grgit.open(dir: '.') def grgit = Grgit.open(dir: '.')
inputs.property "commithash", grgit.log(maxCommits: 1)[0].id inputs.property "commithash", grgit.head().id
def blacklist = ['GitHub', 'dan200', 'Daniel Ratcliffe'] def blacklist = ['GitHub', 'dan200', 'Daniel Ratcliffe']
Set<String> contributors = [] Set<String> contributors = []
grgit.log().each { grgit.log().each {
if (!blacklist.contains(it.committer.name)) if (!blacklist.contains(it.author.name)) contributors.add(it.author.name)
contributors.add(it.committer.name) if (!blacklist.contains(it.committer.name)) contributors.add(it.committer.name)
} }
from(sourceSets.main.resources.srcDirs) { from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info' include 'mcmod.info'
include 'assets/computercraft/lua/rom/help/credits.txt' include 'assets/computercraft/lua/rom/help/credits.txt'
expand 'version':project.version, 'mcversion':project.minecraft.version, 'gitcontributors':contributors.sort().join('\n') expand 'version':project.version,
'mcversion':project.minecraft.version,
'gitcontributors':contributors.sort(false, String.CASE_INSENSITIVE_ORDER).join('\n')
} }
from(sourceSets.main.resources.srcDirs) { from(sourceSets.main.resources.srcDirs) {