1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-12-12 19:20:29 +00:00

Merge pull request #282 from apemanzilla/contributors_task

Dynamically generate contributors list
This commit is contained in:
Daniel Ratcliffe 2017-05-28 12:06:12 +01:00 committed by GitHub
commit 9f35d2a2b7
2 changed files with 25 additions and 21 deletions

View File

@ -10,9 +10,11 @@ buildscript {
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
classpath 'org.ajoberstar:gradle-git:1.6.0'
}
}
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'org.ajoberstar.grgit'
/*
// for people who want stable - not yet functional for MC 1.8.8 - we require the forgegradle 2.1 snapshot
@ -69,23 +71,33 @@ jar {
}
}
processResources
{
// this will ensure that this task is redone when the versions change.
import org.ajoberstar.grgit.Grgit
processResources {
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
def grgit = Grgit.open(dir: '.')
inputs.property "commithash", grgit.log(maxCommits: 1)[0].id
// replace version and mcversion
expand 'version':project.version, 'mcversion':project.minecraft.version
def blacklist = ['GitHub', 'dan200', 'Daniel Ratcliffe']
Set<String> contributors = []
grgit.log().each {
if (!blacklist.contains(it.committer.name))
contributors.add(it.committer.name)
}
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
include 'assets/computercraft/lua/rom/help/credits.txt'
expand 'version':project.version, 'mcversion':project.minecraft.version, 'gitcontributors':contributors.sort().join('\n')
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
exclude 'assets/computercraft/lua/rom/help/credits.txt'
}
}
@ -94,3 +106,4 @@ gradle.projectsEvaluated {
options.compilerArgs << "-Xlint"
}
}

View File

@ -1,3 +1,4 @@
ComputerCraft was created by Daniel "dan200" Ratcliffe, with additional code by Aaron "Cloudy" Mills.
Thanks to nitrogenfingers, GopherATL and RamiLego for program contributions.
Thanks to Mojang, the Forge team, and the MCP team.
@ -12,14 +13,4 @@ Follow @DanTwoHundred on Twitter!
To help contribute to ComputerCraft, browse the source code at https://github.com/dan200/ComputerCraft.
GitHub Contributors:
boq
Cruor
gegy1000
JLLeitschuh
Lignum
ObloxCC
Restioson
SquidDev
timia2109
Wilma456
Wojbie
${gitcontributors}