mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-05 15:58:14 +07:00
Hjson unit tests
This commit is contained in:
@ -69,7 +69,7 @@ android{
|
|||||||
}
|
}
|
||||||
|
|
||||||
defaultConfig{
|
defaultConfig{
|
||||||
Properties props = new Properties().with{p -> p.load(file('../core/assets/version.properties').newReader()); return p }
|
Properties props = loadVersionProps()
|
||||||
Integer vcode = props['androidBuildCode']?.toInteger() ?: 1
|
Integer vcode = props['androidBuildCode']?.toInteger() ?: 1
|
||||||
def versionNameResult = "$versionNumber-$versionType-${getBuildVersion().replace(" ", "-")}"
|
def versionNameResult = "$versionNumber-$versionType-${getBuildVersion().replace(" ", "-")}"
|
||||||
|
|
||||||
|
29
build.gradle
29
build.gradle
@ -9,7 +9,7 @@ buildscript{
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies{
|
dependencies{
|
||||||
classpath 'com.mobidevelop.robovm:robovm-gradle-plugin:2.3.8-SNAPSHOT'
|
classpath 'com.mobidevelop.robovm:robovm-gradle-plugin:2.3.8'
|
||||||
classpath "com.badlogicgames.gdx:gdx-tools:1.9.10"
|
classpath "com.badlogicgames.gdx:gdx-tools:1.9.10"
|
||||||
classpath "com.github.anuken:packr:-SNAPSHOT"
|
classpath "com.github.anuken:packr:-SNAPSHOT"
|
||||||
}
|
}
|
||||||
@ -26,10 +26,14 @@ allprojects{
|
|||||||
if(!project.hasProperty("versionType")) versionType = 'official'
|
if(!project.hasProperty("versionType")) versionType = 'official'
|
||||||
appName = 'Mindustry'
|
appName = 'Mindustry'
|
||||||
gdxVersion = '1.9.10'
|
gdxVersion = '1.9.10'
|
||||||
roboVMVersion = '2.3.8-SNAPSHOT'
|
roboVMVersion = '2.3.8'
|
||||||
steamworksVersion = '891ed912791e01fe9ee6237a6497e5212b85c256'
|
steamworksVersion = '891ed912791e01fe9ee6237a6497e5212b85c256'
|
||||||
arcHash = null
|
arcHash = null
|
||||||
|
|
||||||
|
loadVersionProps = {
|
||||||
|
return new Properties().with{p -> p.load(file('../core/assets/version.properties').newReader()); return p }
|
||||||
|
}
|
||||||
|
|
||||||
debugged = {
|
debugged = {
|
||||||
return new File(projectDir.parent, '../Mindustry-Debug').exists() && !project.hasProperty("release") && project.hasProperty("args")
|
return new File(projectDir.parent, '../Mindustry-Debug').exists() && !project.hasProperty("release") && project.hasProperty("args")
|
||||||
}
|
}
|
||||||
@ -200,6 +204,27 @@ project(":core"){
|
|||||||
writeVersion()
|
writeVersion()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task copyChangelog{
|
||||||
|
doLast{
|
||||||
|
def props = loadVersionProps()
|
||||||
|
def androidVersion = props['androidBuildCode'].toInteger() - 2
|
||||||
|
def buildVersion = props["build"]
|
||||||
|
def loglines = file("../changelog").text.split("\n")
|
||||||
|
def maxLength = 460
|
||||||
|
|
||||||
|
def androidLogList = loglines.findAll{ line -> !line.endsWith("]") || line.endsWith("[Mobile]") || line.endsWith("[Android]")}
|
||||||
|
def result = ""
|
||||||
|
androidLogList.forEach({line ->
|
||||||
|
if(result.length() + line.length() + 1 < maxLength){
|
||||||
|
result += line + "\n"
|
||||||
|
}
|
||||||
|
})
|
||||||
|
def changelogs = file("../fastlane/metadata/android/en-US/changelogs/")
|
||||||
|
new File(changelogs, buildVersion + ".txt").text = (result)
|
||||||
|
new File(changelogs, androidVersion + ".txt").text = (result)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dependencies{
|
dependencies{
|
||||||
if(System.properties["user.name"] == "anuke"){
|
if(System.properties["user.name"] == "anuke"){
|
||||||
task cleanGen{
|
task cleanGen{
|
||||||
|
@ -48,7 +48,7 @@ public class Vars implements Loadable{
|
|||||||
/** URL for discord invite. */
|
/** URL for discord invite. */
|
||||||
public static final String discordURL = "https://discord.gg/mindustry";
|
public static final String discordURL = "https://discord.gg/mindustry";
|
||||||
/** URL for sending crash reports to */
|
/** URL for sending crash reports to */
|
||||||
public static final String crashReportURL = "http://mins.us.to/report";
|
public static final String crashReportURL = "http://192.99.169.18/report";
|
||||||
/** URL the links to the wiki's modding guide.*/
|
/** URL the links to the wiki's modding guide.*/
|
||||||
public static final String modGuideURL = "https://mindustrygame.github.io/wiki/modding/";
|
public static final String modGuideURL = "https://mindustrygame.github.io/wiki/modding/";
|
||||||
/** URL the links to the wiki's modding guide.*/
|
/** URL the links to the wiki's modding guide.*/
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
org.gradle.daemon=true
|
org.gradle.daemon=true
|
||||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||||
archash=d2bb4a004b8653a8d878abda0b1e1c62b2df2aab
|
archash=685a3d94c8dce72292765fcb492d8e9a7f1fac2a
|
||||||
|
Reference in New Issue
Block a user