mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-26 06:57:51 +01:00
Clean up buildscript, add automatic changelog and curseforge upload
This commit is contained in:
parent
c5e783207f
commit
d857ebb3b7
3 changed files with 111 additions and 24 deletions
78
build.gradle
78
build.gradle
|
@ -10,13 +10,19 @@ buildscript {
|
|||
}
|
||||
plugins {
|
||||
id 'com.github.johnrengelman.shadow' version '5.2.0'
|
||||
id 'com.matthewprenger.cursegradle' version '1.4.0'
|
||||
}
|
||||
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'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
version = 'mc1.15.2_v0.2.4'
|
||||
boolean dev = System.getenv('RELEASE') == null || System.getenv('RELEASE').equals('false');
|
||||
|
||||
ext.buildnumber = 0
|
||||
project.buildnumber = System.getenv('BUILD_NUMBER') != null ? System.getenv('BUILD_NUMBER') : "custom"
|
||||
|
||||
version = "mc${minecraft_version}_v${mod_version}" + (dev ? "+${buildnumber}" : '')
|
||||
group = 'com.simibubi.create'
|
||||
archivesBaseName = 'create'
|
||||
|
||||
|
@ -95,16 +101,16 @@ configurations {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
minecraft 'net.minecraftforge:forge:1.15.2-31.2.3'
|
||||
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
|
||||
|
||||
def registrate = "com.tterrag.registrate:Registrate:MC1.15.2-0.0.3.17"
|
||||
def registrate = "com.tterrag.registrate:Registrate:MC${minecraft_version}-${registrate_version}"
|
||||
implementation fg.deobf(registrate)
|
||||
shade registrate
|
||||
|
||||
// compile against the JEI API but do not include it at runtime
|
||||
compileOnly fg.deobf("mezz.jei:jei-1.15.2:6.0.0.2:api")
|
||||
compileOnly fg.deobf("mezz.jei:jei-${minecraft_version}:${jei_version}:api")
|
||||
// at runtime, use the full JEI jar
|
||||
runtimeOnly fg.deobf("mezz.jei:jei-1.15.2:6.0.0.2")
|
||||
runtimeOnly fg.deobf("mezz.jei:jei-${minecraft_version}:${jei_version}")
|
||||
|
||||
// i'll leave this here commented for easier testing
|
||||
//runtimeOnly fg.deobf("vazkii.arl:AutoRegLib:1.4-35.69")
|
||||
|
@ -134,24 +140,56 @@ reobf {
|
|||
shadowJar {}
|
||||
}
|
||||
|
||||
// Example configuration to allow publishing using the maven-publish task
|
||||
// we define a custom artifact that is sourced from the reobfJar output task
|
||||
// and then declare that to be published
|
||||
// Note you'll need to add a repository here
|
||||
def reobfFile = file("$buildDir/reobfJar/output.jar")
|
||||
def reobfArtifact = artifacts.add('default', reobfFile) {
|
||||
type 'jar'
|
||||
builtBy 'reobfJar'
|
||||
String getChangelogText() {
|
||||
def changelogFile = file('changelog.txt')
|
||||
String str = ''
|
||||
int lineCount = 0
|
||||
boolean done = false
|
||||
changelogFile.eachLine {
|
||||
if (done || it == null) {
|
||||
return
|
||||
}
|
||||
if (it.size() > 1) {
|
||||
def temp = it
|
||||
if (lineCount == 0) {
|
||||
temp = "Create ${version}"
|
||||
temp = "<h2 style=\"display:inline;\">$temp </h2><em>for Minecraft ${minecraft_version}</em><br/>"
|
||||
} else if (it.startsWith('-')) {
|
||||
temp = " $temp<br/>"
|
||||
temp = temp.replaceAll("(\\S+\\/\\S+)#([0-9]+)\\b", "<a href=\"https://github.com/\$1/issues/\$2\">\$0</a>");
|
||||
temp = temp.replaceAll("#([0-9]+)\\b(?!<\\/a>)", "<a href=\"https://github.com/$github_project/issues/\$1\">\$0</a>");
|
||||
} else {
|
||||
temp = "<h4>$temp</h4>"
|
||||
}
|
||||
str += temp
|
||||
lineCount++
|
||||
return
|
||||
} else {
|
||||
done = true
|
||||
}
|
||||
}
|
||||
return str
|
||||
}
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
artifact reobfArtifact
|
||||
|
||||
println getChangelogText()
|
||||
|
||||
tasks.curseforge.enabled = !dev && project.hasProperty('simi_curseforge_key')
|
||||
|
||||
curseforge {
|
||||
if (project.hasProperty('simi_curseforge_key')) {
|
||||
apiKey = project.simi_curseforge_key
|
||||
}
|
||||
|
||||
project {
|
||||
id = project.projectId
|
||||
changelog = System.getenv('CHANGELOG') == null || System.getenv('CHANGELOG').equals('none') ? getChangelogText() : System.getenv('CHANGELOG')
|
||||
changelogType = 'html'
|
||||
releaseType = project.curse_type
|
||||
mainArtifact(jar) {
|
||||
displayName = "Create - ${version}"
|
||||
}
|
||||
repositories {
|
||||
maven {
|
||||
url "file:///${project.projectDir}/mcmodsrepo"
|
||||
relations {
|
||||
optionalDependency 'jei'
|
||||
}
|
||||
}
|
||||
}
|
33
changelog.txt
Normal file
33
changelog.txt
Normal file
|
@ -0,0 +1,33 @@
|
|||
0.2.4:
|
||||
Welcome to the future! Glad you are still here.
|
||||
Warning
|
||||
- Do NOT transfer world or schematic data from 1.14. This version is incompatible with any of the prior versions!
|
||||
New
|
||||
- Ported Create to Minecraft 1.15.2
|
||||
- Added Nixie Tubes
|
||||
- Added the Extendo Grip
|
||||
- Added support for TerraForged worldgen
|
||||
Changes
|
||||
- Removed Windowlogging, might come back as a stand-alone
|
||||
- Removed Blazing, Shadow Steel and Gilded Quartz Toolsets
|
||||
- Massively reworked Create palettes, offering a whole bunch of new patterns!
|
||||
- The Creative Motor can now face in any direction
|
||||
- The Creative Motor, Encased Fan and other directional blocks will now reverse their effective rotation when oriented backwards
|
||||
- Redstone link receivers now emit their signal with the level of the strongest transmitter of the same frequency
|
||||
- Changed the way cart assemblers react to redstone input
|
||||
- Blocks that couldn't be placed when a contraption disassembles, now drop as items
|
||||
- Some fixes regarding inconsistencies with Super Glue placement
|
||||
- Deployers no longer consume food
|
||||
- Deployers can now feed players
|
||||
- Ploughs no longer break blocks if farmland is below them
|
||||
- Super glue can no longer be removed while inbetween two blocks
|
||||
Fixes
|
||||
- Fixed Bells duplicating themselves when moved by a contraption
|
||||
- Fixed moved Deployers in breaking mode getting stuck on fluids or bedrock
|
||||
- Schematicannons can no longer place water in the nether
|
||||
- Fixed bug with extractors not always being able to pull from moved contraptions
|
||||
- Fixed deployers not able to place certain foods on campfires
|
||||
- Fixed fire-immune creatures taking damage from heated air currents
|
||||
- Endermen now take damage from washing fans
|
||||
- Fixed crash when assembled minecarts pick up the block below their assembler
|
||||
- Schematicannons can no longer place lit furnaces
|
|
@ -2,3 +2,19 @@
|
|||
# This is required to provide enough memory for the Minecraft decompilation process.
|
||||
org.gradle.jvmargs=-Xmx3G
|
||||
org.gradle.daemon=false
|
||||
|
||||
# mod version info
|
||||
mod_version=0.2.4
|
||||
minecraft_version=1.15.2
|
||||
forge_version=31.2.3
|
||||
|
||||
# dependency versions
|
||||
registrate_version=0.0.3.17
|
||||
jei_version=6.0.0.2
|
||||
|
||||
# curseforge information
|
||||
projectId=328085
|
||||
curse_type=beta
|
||||
|
||||
# github information
|
||||
github_project=Creators-of-Create/Create
|
Loading…
Reference in a new issue