SteamWar/BauSystem
Archiviert
13
0

Add gradle.properties to make gradle build after cleanup even faster

Update .gitignore
Update build.gradle
Dieser Commit ist enthalten in:
yoyosource 2021-04-16 22:34:52 +02:00
Ursprung 0938b9b812
Commit 18a9970e69
3 geänderte Dateien mit 36 neuen und 5 gelöschten Zeilen

2
.gitignore vendored
Datei anzeigen

@ -5,7 +5,7 @@
.gradle
**/build/
!gradle/wrapper/gradle-wrapper.jar
gradle.properties
steamwar.properties
# IntelliJ IDEA
.idea

Datei anzeigen

@ -20,6 +20,8 @@
import org.apache.tools.ant.taskdefs.condition.Os
import java.util.function.BiConsumer
plugins {
// Adding the base plugin fixes the following gradle warnings in IntelliJ:
//
@ -37,6 +39,11 @@ plugins {
group 'steamwar'
version ''
Properties steamwarProperties = new Properties()
if (file("steamwar.properties").exists()) {
steamwarProperties.load(file("steamwar.properties").newDataInputStream())
}
ext {
buildName = 'BauSystem'
artifactName = 'bausystem'
@ -93,8 +100,9 @@ task finalizeProject {
}
build.finalizedBy(finalizeProject)
if (project.hasProperty("hostname")) {
if (steamwarProperties.containsKey("hostname")) {
def server = "Dev1.15"
def hostname = steamwarProperties.get("hostname")
// def server = "Developer"
task uploadProject {
@ -106,7 +114,7 @@ if (project.hasProperty("hostname")) {
if (!answer("Start ${server} server?")) {
return
}
serverStart(server)
serverStart(server, hostname)
}
}
@ -115,7 +123,7 @@ if (project.hasProperty("hostname")) {
group "Steamwar"
doLast {
serverStart(server)
serverStart(server, hostname)
}
}
}
@ -135,7 +143,7 @@ private def shell(String command) {
}
}
private def serverStart(String serverName) {
private def serverStart(String serverName, String hostname) {
def proc = shell("ssh -t ${hostname} \"./mc ${serverName}\"")
Set<String> strings = new HashSet<>()

23
gradle.properties Normale Datei
Datei anzeigen

@ -0,0 +1,23 @@
#
# This file is a part of the SteamWar software.
#
# Copyright (C) 2020 SteamWar.de-Serverteam
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
org.gradle.daemon = true
org.gradle.parallel = true
org.gradle.configureondemand = true
org.gradle.workers.max = 4