Possible lwjgl natives fix
This commit is contained in:
26
build.gradle
26
build.gradle
@@ -186,7 +186,7 @@ allprojects{
|
|||||||
maven{ url 'https://jitpack.io' }
|
maven{ url 'https://jitpack.io' }
|
||||||
}
|
}
|
||||||
|
|
||||||
task clearCache{
|
tasks.register('clearCache'){
|
||||||
doFirst{
|
doFirst{
|
||||||
delete{
|
delete{
|
||||||
delete "$rootDir/core/assets/cache"
|
delete "$rootDir/core/assets/cache"
|
||||||
@@ -273,7 +273,7 @@ project(":core"){
|
|||||||
|
|
||||||
compileJava.options.fork = true
|
compileJava.options.fork = true
|
||||||
|
|
||||||
task preGen{
|
tasks.register('preGen'){
|
||||||
outputs.upToDateWhen{ false }
|
outputs.upToDateWhen{ false }
|
||||||
generateLocales()
|
generateLocales()
|
||||||
writeVersion()
|
writeVersion()
|
||||||
@@ -281,7 +281,7 @@ project(":core"){
|
|||||||
writePlugins()
|
writePlugins()
|
||||||
}
|
}
|
||||||
|
|
||||||
task copyChangelog{
|
tasks.register('copyChangelog'){
|
||||||
doLast{
|
doLast{
|
||||||
def props = loadVersionProps()
|
def props = loadVersionProps()
|
||||||
def androidVersion = props['androidBuildCode'].toInteger() - 2
|
def androidVersion = props['androidBuildCode'].toInteger() - 2
|
||||||
@@ -289,9 +289,9 @@ project(":core"){
|
|||||||
def notice = "[This is a truncated changelog, see Github for full notes]"
|
def notice = "[This is a truncated changelog, see Github for full notes]"
|
||||||
def maxLength = 460
|
def maxLength = 460
|
||||||
|
|
||||||
def androidLogList = [notice] + loglines.findAll{ line -> !line.endsWith("]") || line.endsWith("[Mobile]") || line.endsWith("[Android]")}
|
def androidLogList = [notice] + loglines.findAll{ line -> !line.endsWith("]") || line.endsWith("[Mobile]") || line.endsWith("[Android]") }
|
||||||
def result = ""
|
def result = ""
|
||||||
androidLogList.forEach{line ->
|
androidLogList.forEach{ line ->
|
||||||
if(result.length() + line.length() + 1 < maxLength){
|
if(result.length() + line.length() + 1 < maxLength){
|
||||||
result += line + "\n"
|
result += line + "\n"
|
||||||
}
|
}
|
||||||
@@ -305,19 +305,21 @@ project(":core"){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task sourcesJar(type: Jar, dependsOn: classes){
|
tasks.register('sourcesJar', Jar){
|
||||||
|
dependsOn classes
|
||||||
archiveClassifier = 'sources'
|
archiveClassifier = 'sources'
|
||||||
from sourceSets.main.allSource
|
from sourceSets.main.allSource
|
||||||
}
|
}
|
||||||
|
|
||||||
task assetsJar(type: Jar, dependsOn: ":tools:pack"){
|
tasks.register('assetsJar', Jar){
|
||||||
|
dependsOn ":tools:pack"
|
||||||
archiveClassifier = 'assets'
|
archiveClassifier = 'assets'
|
||||||
from files("assets"){
|
from files("assets"){
|
||||||
exclude "config", "cache", "music", "sounds", "sprites/fallback"
|
exclude "config", "cache", "music", "sounds", "sprites/fallback"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task musicJar(type: Jar){
|
tasks.register('musicJar', Jar){
|
||||||
archiveClassifier = 'music'
|
archiveClassifier = 'music'
|
||||||
from files("assets"){
|
from files("assets"){
|
||||||
include "music/*", "sounds/*"
|
include "music/*", "sounds/*"
|
||||||
@@ -461,8 +463,8 @@ configure([":core", ":server"].collect{project(it)}){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task deployAll{
|
tasks.register('deployAll'){
|
||||||
task cleanDeployOutput{
|
tasks.register('cleanDeployOutput'){
|
||||||
doFirst{
|
doFirst{
|
||||||
if(getBuildVersion() == "custom build" || getBuildVersion() == "") throw new IllegalArgumentException("----\n\nSET A BUILD NUMBER FIRST!\n\n----")
|
if(getBuildVersion() == "custom build" || getBuildVersion() == "") throw new IllegalArgumentException("----\n\nSET A BUILD NUMBER FIRST!\n\n----")
|
||||||
if(!project.hasProperty("release")) throw new IllegalArgumentException("----\n\nSET THE RELEASE PROJECT PROPERTY FIRST!\n\n----")
|
if(!project.hasProperty("release")) throw new IllegalArgumentException("----\n\nSET THE RELEASE PROJECT PROPERTY FIRST!\n\n----")
|
||||||
@@ -484,11 +486,11 @@ task deployAll{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task resolveDependencies{
|
tasks.register('resolveDependencies'){
|
||||||
doLast{
|
doLast{
|
||||||
rootProject.allprojects{ project ->
|
rootProject.allprojects{ project ->
|
||||||
Set<Configuration> configurations = project.buildscript.configurations + project.configurations
|
Set<Configuration> configurations = project.buildscript.configurations + project.configurations
|
||||||
configurations.findAll{c -> c.canBeResolved}.forEach{c -> c.resolve()}
|
configurations.findAll{ c -> c.canBeResolved }.forEach{ c -> c.resolve() }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ def JDK_DIR = "$System.env.JDK_DIR"
|
|||||||
def ICON_DIR = new File("$rootDir/core/assets/icons/icon.icns")
|
def ICON_DIR = new File("$rootDir/core/assets/icons/icon.icns")
|
||||||
def platforms = ["Linux64", "Windows64", "Windows32", "MacOS"]
|
def platforms = ["Linux64", "Windows64", "Windows32", "MacOS"]
|
||||||
|
|
||||||
task run(dependsOn: classes, type: JavaExec){
|
tasks.register('run', JavaExec){
|
||||||
|
dependsOn classes
|
||||||
mainClass = project.mainClassName
|
mainClass = project.mainClassName
|
||||||
classpath = sourceSets.main.runtimeClasspath
|
classpath = sourceSets.main.runtimeClasspath
|
||||||
standardInput = System.in
|
standardInput = System.in
|
||||||
@@ -26,7 +27,7 @@ task run(dependsOn: classes, type: JavaExec){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(project.hasProperty("jvmArgs")){
|
if(project.hasProperty("jvmArgs")){
|
||||||
jvmArgs((List<String>)Eval.me(project.getProperties()["jvmArgs"]))
|
jvmArgs((List<String>) Eval.me(project.getProperties()["jvmArgs"]))
|
||||||
}
|
}
|
||||||
|
|
||||||
if(project.hasProperty("dataDir")){
|
if(project.hasProperty("dataDir")){
|
||||||
@@ -38,14 +39,16 @@ task run(dependsOn: classes, type: JavaExec){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task dist(type: Jar, dependsOn: configurations.runtimeClasspath){
|
tasks.register('dist', Jar){
|
||||||
|
dependsOn configurations.runtimeClasspath
|
||||||
dependsOn ":desktop:processResources"
|
dependsOn ":desktop:processResources"
|
||||||
|
|
||||||
from files(sourceSets.main.output.classesDirs)
|
from files(sourceSets.main.output.classesDirs)
|
||||||
from files(sourceSets.main.output.resourcesDir)
|
from files(sourceSets.main.output.resourcesDir)
|
||||||
from {configurations.runtimeClasspath.collect{ it.isDirectory() ? it : zipTree(it) }}
|
from{ configurations.runtimeClasspath.collect{ it.isDirectory() ? it : zipTree(it) } }
|
||||||
from files(project.assetsDir)
|
from files(project.assetsDir)
|
||||||
exclude("config/**")
|
exclude("config/**")
|
||||||
|
exclude("**hs_err**.log")
|
||||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||||
|
|
||||||
//don't include steam shared libraries unless necessary
|
//don't include steam shared libraries unless necessary
|
||||||
@@ -70,7 +73,8 @@ if(!project.ext.hasSprites() && System.getenv("JITPACK") != "true"){
|
|||||||
|
|
||||||
//this is only for local testing
|
//this is only for local testing
|
||||||
//add -Prelease -PversionModifier=steam as build properties
|
//add -Prelease -PversionModifier=steam as build properties
|
||||||
task steamtest(dependsOn: dist){
|
tasks.register('steamtest'){
|
||||||
|
dependsOn dist
|
||||||
doLast{
|
doLast{
|
||||||
copy{
|
copy{
|
||||||
from "build/libs/Mindustry.jar"
|
from "build/libs/Mindustry.jar"
|
||||||
|
|||||||
@@ -26,4 +26,4 @@ org.gradle.caching=true
|
|||||||
org.gradle.internal.http.socketTimeout=100000
|
org.gradle.internal.http.socketTimeout=100000
|
||||||
org.gradle.internal.http.connectionTimeout=100000
|
org.gradle.internal.http.connectionTimeout=100000
|
||||||
android.enableR8.fullMode=false
|
android.enableR8.fullMode=false
|
||||||
archash=039b13f434
|
archash=b5be655c5c
|
||||||
|
|||||||
@@ -7,7 +7,8 @@ ext.getServerFolder = {
|
|||||||
return "../deploy/${appName}-server-${getVersionString()}"
|
return "../deploy/${appName}-server-${getVersionString()}"
|
||||||
}
|
}
|
||||||
|
|
||||||
task run(dependsOn: classes, type: JavaExec){
|
tasks.register('run', JavaExec){
|
||||||
|
dependsOn classes
|
||||||
mainClass = project.mainClassName
|
mainClass = project.mainClassName
|
||||||
classpath = sourceSets.main.runtimeClasspath
|
classpath = sourceSets.main.runtimeClasspath
|
||||||
standardInput = System.in
|
standardInput = System.in
|
||||||
@@ -17,11 +18,12 @@ task run(dependsOn: classes, type: JavaExec){
|
|||||||
args Eval.me(appArgs)
|
args Eval.me(appArgs)
|
||||||
}
|
}
|
||||||
if(project.hasProperty("jvmArgs")){
|
if(project.hasProperty("jvmArgs")){
|
||||||
jvmArgs((List<String>)Eval.me(project.getProperties()["jvmArgs"]))
|
jvmArgs((List<String>) Eval.me(project.getProperties()["jvmArgs"]))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task debug(dependsOn: classes, type: JavaExec){
|
tasks.register('debug', JavaExec){
|
||||||
|
dependsOn classes
|
||||||
mainClass = project.mainClassName
|
mainClass = project.mainClassName
|
||||||
classpath = sourceSets.main.runtimeClasspath
|
classpath = sourceSets.main.runtimeClasspath
|
||||||
standardInput = System.in
|
standardInput = System.in
|
||||||
@@ -30,10 +32,11 @@ task debug(dependsOn: classes, type: JavaExec){
|
|||||||
debug = true
|
debug = true
|
||||||
}
|
}
|
||||||
|
|
||||||
task dist(type: Jar, dependsOn: configurations.runtimeClasspath){
|
tasks.register('dist', Jar){
|
||||||
|
dependsOn configurations.runtimeClasspath
|
||||||
from files(sourceSets.main.output.classesDirs)
|
from files(sourceSets.main.output.classesDirs)
|
||||||
from files(sourceSets.main.output.resourcesDir)
|
from files(sourceSets.main.output.resourcesDir)
|
||||||
from {configurations.runtimeClasspath.collect{ it.isDirectory() ? it : zipTree(it) }}
|
from{ configurations.runtimeClasspath.collect{ it.isDirectory() ? it : zipTree(it) } }
|
||||||
from files(project.assetsDir)
|
from files(project.assetsDir)
|
||||||
exclude("sprites/**")
|
exclude("sprites/**")
|
||||||
exclude("music/**")
|
exclude("music/**")
|
||||||
@@ -47,6 +50,7 @@ task dist(type: Jar, dependsOn: configurations.runtimeClasspath){
|
|||||||
exclude("icons/icon.icns")
|
exclude("icons/icon.icns")
|
||||||
exclude("icons/icon.ico")
|
exclude("icons/icon.ico")
|
||||||
exclude("icons/icon_64.png")
|
exclude("icons/icon_64.png")
|
||||||
|
exclude("**hs_err**.log")
|
||||||
|
|
||||||
duplicatesStrategy = 'exclude'
|
duplicatesStrategy = 'exclude'
|
||||||
|
|
||||||
@@ -55,7 +59,7 @@ task dist(type: Jar, dependsOn: configurations.runtimeClasspath){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task dzip(type: Zip){
|
tasks.register('dzip', Zip){
|
||||||
from getServerFolder()
|
from getServerFolder()
|
||||||
archiveFileName = "${generateDeployName('server')}.zip"
|
archiveFileName = "${generateDeployName('server')}.zip"
|
||||||
destinationDirectory = file("../deploy/")
|
destinationDirectory = file("../deploy/")
|
||||||
@@ -63,7 +67,7 @@ task dzip(type: Zip){
|
|||||||
finalizedBy 'cleanup'
|
finalizedBy 'cleanup'
|
||||||
}
|
}
|
||||||
|
|
||||||
task cleanup{
|
tasks.register('cleanup'){
|
||||||
doLast{
|
doLast{
|
||||||
delete{
|
delete{
|
||||||
delete getServerFolder()
|
delete getServerFolder()
|
||||||
@@ -71,7 +75,7 @@ task cleanup{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task deploy{
|
tasks.register('deploy'){
|
||||||
dependsOn "dist"
|
dependsOn "dist"
|
||||||
|
|
||||||
finalizedBy 'dzip'
|
finalizedBy 'dzip'
|
||||||
|
|||||||
Reference in New Issue
Block a user