189 lines
5.6 KiB
Groovy
189 lines
5.6 KiB
Groovy
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
maven { url = "https://jitpack.io" }
|
|
maven { url = "https://maven.minecraftforge.net" }
|
|
}
|
|
dependencies {
|
|
// classpath('com.github.DStrand1:ForgeGradle:FG_2.3-SNAPSHOT') {
|
|
// changing = true
|
|
// }
|
|
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
|
|
}
|
|
}
|
|
plugins {
|
|
id "com.matthewprenger.cursegradle" version "1.4.0"
|
|
}
|
|
apply plugin: 'net.minecraftforge.gradle.forge'
|
|
|
|
apply from: 'https://raw.githubusercontent.com/MinecraftModDevelopment/Gradle-Collection/22e7d543a18cd30675277fbfa3669e3d9e206010/generic/secrets.gradle'
|
|
|
|
if (project.hasProperty('secretFile')) {
|
|
loadSecrets(new File((String) findProperty('secretFile')))
|
|
}
|
|
|
|
version = "4.0.20"
|
|
if (System.getenv('BUILD_NUMBER') != null) {
|
|
version += "." + System.getenv('BUILD_NUMBER')
|
|
}
|
|
group = "com.blamejared.modtweaker"
|
|
archivesBaseName = "modtweaker"
|
|
|
|
sourceCompatibility = targetCompatibility = "1.8"
|
|
compileJava {
|
|
sourceCompatibility = targetCompatibility = "1.8"
|
|
}
|
|
|
|
minecraft {
|
|
version = "1.12.2-14.23.5.2847"
|
|
runDir = "run"
|
|
mappings = "snapshot_20180407"
|
|
useDepAts = true
|
|
}
|
|
|
|
repositories {
|
|
maven {
|
|
url "https://dvs1.progwml6.com/files/maven"
|
|
}
|
|
maven {
|
|
url "https://maven.blamejared.com"
|
|
}
|
|
maven {
|
|
url "https://maven.covers1624.net/"
|
|
}
|
|
maven {
|
|
url "https://chickenbones.net/maven/"
|
|
}
|
|
maven {
|
|
url "https://www.ryanliptak.com/maven/"
|
|
}
|
|
maven {
|
|
url "https://maven.ellpeck.de/"
|
|
}
|
|
maven {
|
|
url "https://maven2.ic2.player.to/"
|
|
}
|
|
maven {
|
|
url "https://maven.tterrag.com"
|
|
}
|
|
maven {
|
|
url = "https://maven.thiakil.com"
|
|
}
|
|
maven {
|
|
url "https://maven.amadornes.com/"
|
|
}
|
|
maven {
|
|
url "https://www.cursemaven.com"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
deobfCompile "CraftTweaker2:CraftTweaker2-MC1120-Main:1.12-4.1.20.662"
|
|
deobfCompile "mezz.jei:jei_1.12.2:4.16.1.302"
|
|
deobfCompile "curse.maven:mtlib-253211:3308160" // MTLib 3.0.7
|
|
deobfCompile "com.azanor.baubles:Baubles:1.12-1.5.2"
|
|
deobfCompile "vazkii.botania:Botania:r1.10-363.148"
|
|
|
|
|
|
deobfCompile("cofh:ThermalExpansion:1.12.2-5.5.4.43:universal") {
|
|
exclude group: 'mezz.jei'
|
|
}
|
|
deobfCompile("cofh:ThermalFoundation:1.12.2-2.6.3.27:universal") {
|
|
exclude group: 'mezz.jei'
|
|
}
|
|
|
|
deobfCompile("cofh:CoFHCore:1.12.2-4.6.3.27:universal") {
|
|
exclude group: 'mezz.jei'
|
|
}
|
|
|
|
deobfCompile("cofh:RedstoneFlux:1.12-2.1.0.7:universal") {
|
|
exclude group: 'mezz.jei'
|
|
}
|
|
|
|
deobfCompile("cofh:CoFHWorld:1.12.2-1.3.1.7:universal") {
|
|
exclude group: 'mezz.jei'
|
|
}
|
|
|
|
|
|
deobfCompile("codechicken:CodeChickenLib:1.12.2-3.2.3.358:universal") {
|
|
exclude group: 'mezz.jei'
|
|
}
|
|
|
|
deobfCompile("betterwithmods:BetterWithMods:1.12-2.3.24-1065") {
|
|
exclude group: 'mezz.jei'
|
|
}
|
|
deobfCompile("de.ellpeck.actuallyadditions:ActuallyAdditions:1.12.2-r152.16") {
|
|
exclude group: 'mezz.jei'
|
|
}
|
|
deobfCompile("slimeknights.mantle:Mantle:1.12-1.3.3.+") {
|
|
exclude group: 'mezz.jei'
|
|
}
|
|
deobfCompile("slimeknights:TConstruct:1.12.2-2.12.0.+") {
|
|
exclude group: 'mezz.jei'
|
|
}
|
|
deobfCompile('net.sengir.forestry:forestry_1.12.2:5.+') {
|
|
exclude group: 'mezz.jei'
|
|
}
|
|
deobfCompile "team.chisel.ctm:CTM:MC1.12.2-1.0.2.31"
|
|
deobfCompile("knightminer.tcomplement:TinkersComplement:1.12.2-0.4.2.39") {
|
|
exclude group: 'mezz.jei'
|
|
}
|
|
deobfCompile "team.chisel:Chisel:MC1.12.2-1.0.2.45"
|
|
deobfCompile "curse.maven:bloodmagic-224791:2610083"
|
|
deobfCompile "curse.maven:guideapi-228832:2645992"
|
|
deobfCompile("knightminer:Inspirations:1.12.2-0.2.9.9") {
|
|
exclude group: 'mezz.jei'
|
|
}
|
|
deobfCompile "blusunrize:ImmersiveEngineering:0.12-92-559"
|
|
}
|
|
|
|
processResources {
|
|
inputs.property "version", project.version
|
|
inputs.property "mcversion", project.minecraft.version
|
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
include 'mcmod.info'
|
|
|
|
expand 'version': project.version, 'mcversion': project.minecraft.version
|
|
}
|
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
exclude 'mcmod.info'
|
|
}
|
|
}
|
|
|
|
task genGitChangelog() {
|
|
def stdout = new ByteArrayOutputStream()
|
|
// first commit to check from, in our case the first commit of the branch
|
|
String firstCommit = 'e300eb92091f53918f9700dc552133fa8e837918';
|
|
String repoLink = "https://github.com/jaredlll08/ModTweaker/commit/"
|
|
// was having issues with grep and spaces in the regex
|
|
exec {
|
|
commandLine 'git', 'log', '-i', '--grep=version\\spush', '--grep=open\\sbeta\\sspecific\\scode', '--pretty=tformat:%H', '--date=local', firstCommit + '..@{0}'
|
|
standardOutput = stdout
|
|
}
|
|
if (stdout.toString().trim().indexOf("\n") >= 0) {
|
|
firstCommit = stdout.toString().split("\n")[0].trim();
|
|
}
|
|
System.out.println("Last version hash: \"" + firstCommit + "\"");
|
|
stdout = new ByteArrayOutputStream()
|
|
def test = exec {
|
|
commandLine 'git', 'log', '--pretty=tformat:- [%s](' + repoLink + '%H) - %aN - %cd', '--max-parents=1', '--date=local', firstCommit + "..@"
|
|
standardOutput = stdout
|
|
}
|
|
File file = new File("changelog.md")
|
|
file.write("### Current version: " + project.version)
|
|
file.append("\n" + stdout.toString())
|
|
System.out.println("Changelog generated!")
|
|
}
|
|
|
|
curseforge {
|
|
apiKey = findProperty('curseforge_api_token') ?: 0
|
|
project {
|
|
id = "220954"
|
|
releaseType = 'release'
|
|
changelog = file("changelog.md")
|
|
changelogType = 'markdown'
|
|
addGameVersion '1.12.2'
|
|
}
|
|
} |