diff --git a/build.gradle b/build.gradle index a0a62f0..4f62589 100644 --- a/build.gradle +++ b/build.gradle @@ -83,16 +83,18 @@ task finalizeProject { } build.finalizedBy(finalizeProject) -task uploadProject { - description 'Upload this project' - group "Steamwar" +if (project.hasProperty("hostname")) { + task uploadProject { + description 'Upload this project' + group "Steamwar" - doLast { - shell("scp ${libs}/${jarName} ${hostname}:~/Dev1.15/plugins") - if (!answer("Start DEV server?")) { - return + doLast { + shell("scp ${libs}/${jarName} ${hostname}:~/Dev1.15/plugins") + if (!answer("Start DEV server?")) { + return + } + shell("ssh ${hostname} \"./mc Dev1.15\"") } - shell("ssh ${hostname} \"./mc Dev1.15\"") } }