From f4399f8bb402cf5a7220c3e88176ef03dd264162 Mon Sep 17 00:00:00 2001 From: Conor Gallagher Date: Mon, 9 May 2022 12:58:37 +0100 Subject: [PATCH] Fix relative paths (#133) --- src/main/kotlin/com/cjbooms/fabrikt/model/Destinations.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/com/cjbooms/fabrikt/model/Destinations.kt b/src/main/kotlin/com/cjbooms/fabrikt/model/Destinations.kt index e142d2d4..7e8dfa6e 100644 --- a/src/main/kotlin/com/cjbooms/fabrikt/model/Destinations.kt +++ b/src/main/kotlin/com/cjbooms/fabrikt/model/Destinations.kt @@ -1,11 +1,13 @@ package com.cjbooms.fabrikt.model import java.nio.file.Path +import java.nio.file.Paths object Destinations { - val MAIN_KT_SOURCE: Path = Path.of("/src/main/kotlin/") - val MAIN_RESOURCES: Path = Path.of("/src/main/resources") + private val PATH_ROOT: Path = Paths.get("") + val MAIN_KT_SOURCE: Path = PATH_ROOT.resolve("src/main/kotlin/") + val MAIN_RESOURCES: Path = PATH_ROOT.resolve("src/main/resources") fun modelsPackage(basePackage: String): String = "$basePackage.models" fun controllersPackage(basePackage: String): String = "$basePackage.controllers"