From 436a6fa2c8972ba949ad0c4e85daea33deeae448 Mon Sep 17 00:00:00 2001 From: see Date: Wed, 13 Apr 2022 12:59:52 +0200 Subject: [PATCH] replaced hardcoded paths by rootProject.projectDir --- build.gradle | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index f344161..a5c1be7 100644 --- a/build.gradle +++ b/build.gradle @@ -148,15 +148,17 @@ task uberjarSyspec(type: Jar) { } archiveFileName = "provs-syspec.jar" } +def projectRoot = rootProject.projectDir + // copy jar to /usr/local/bin and make it executable // Remark: to be able to use it you must have jarwrapper installed (sudo apt install jarwrapper) task installlocally { dependsOn(uberjarServer, uberjarDesktop, uberjarSyspec) doLast { - exec { commandLine("sh", "-c", "sudo cp ~/repo/dda/provs/build/libs/provs-server.jar /usr/local/bin/") } - exec { commandLine("sh", "-c", "sudo cp ~/repo/dda/provs/build/libs/provs-desktop.jar /usr/local/bin/") } - exec { commandLine("sh", "-c", "sudo cp ~/repo/dda/provs/build/libs/provs-syspec.jar /usr/local/bin/") } + exec { commandLine("sh", "-c", "sudo cp $projectRoot/build/libs/provs-server.jar /usr/local/bin/") } + exec { commandLine("sh", "-c", "sudo cp $projectRoot/build/libs/provs-desktop.jar /usr/local/bin/") } + exec { commandLine("sh", "-c", "sudo cp $projectRoot/build/libs/provs-syspec.jar /usr/local/bin/") } exec { commandLine("sh", "-c", "sudo chmod 755 /usr/local/bin/provs-server.jar") } exec { commandLine("sh", "-c", "sudo chmod 755 /usr/local/bin/provs-desktop.jar") } exec { commandLine("sh", "-c", "sudo chmod 755 /usr/local/bin/provs-syspec.jar") }