Change absolute to relative file references (#4799)

With this change, the standalone project build uses relative paths instead of absolute paths starting from the root project. With these relative paths, the standalone project can be built as sub-project of different root projects.

Co-authored-by: gbildh <bildh@de.ibm.com>
diff --git a/core/standalone/build.gradle b/core/standalone/build.gradle
index 6e97466..aa6ee52 100644
--- a/core/standalone/build.gradle
+++ b/core/standalone/build.gradle
@@ -52,7 +52,7 @@
 
 task copyGWActions() {
     doLast {
-        def routeMgmtDir = new File(project.projectDir.getParentFile(), "routemgmt")
+        def routeMgmtDir = new File(project.projectDir, "../routemgmt")
         def commonDir = new File(routeMgmtDir, "common")
         def routeBuildDir = mkdir("$buildDir/tmp/routemgmt")
         apiGwActions.each { actionName ->
@@ -85,7 +85,7 @@
 
 task copyGrafanaConfig() {
     doLast {
-        def grafanaDir = new File(project.rootProject.getProjectDir(), "core/monitoring/user-events/compose/grafana")
+        def grafanaDir = new File(project(':core:monitoring:user-events').projectDir, "compose/grafana")
         def grafanaBuildDir = mkdir("$buildDir/tmp/grafana")
         def zipFileName = "grafana-config.zip"
         def zipFile = new File(grafanaBuildDir, zipFileName)
@@ -103,17 +103,17 @@
 processResources.dependsOn copyGrafanaConfig
 
 processResources {
-    from(new File(project.rootProject.projectDir, "ansible/files/runtimes.json")) {
+    from(new File(project.projectDir, "../../ansible/files/runtimes.json")) {
         into(".")
     }
-    from(new File(project.rootProject.projectDir, "ansible/files")) {
+    from(new File(project.projectDir, "../../ansible/files")) {
         include "*.json"
         into("couch")
     }
     from(file("$buildDir/tmp/grafana/grafana-config.zip")){
         into(".")
     }
-    from(new File(project.rootProject.getProjectDir(), "core/monitoring/user-events/compose/prometheus/prometheus.yml")){
+    from(new File(project(':core:monitoring:user-events').projectDir, "compose/prometheus/prometheus.yml")){
         into(".")
     }
     //Implement the logic present in controller Docker file