diff options
author | Robert Jaros <rjaros@finn.pl> | 2019-10-29 11:37:00 +0100 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2019-10-29 11:37:00 +0100 |
commit | ff2b3855d3039025fb59f3113cdf41491f16f039 (patch) | |
tree | 665a37e0ee40c909b9a4026a625f4216a1241d22 /kvision-tools/kvision-compiler-plugin/src/main/kotlin/pl | |
parent | b72247f40f5948e5a5eb33d12632af0734668e11 (diff) | |
download | kvision-ff2b3855d3039025fb59f3113cdf41491f16f039.tar.gz kvision-ff2b3855d3039025fb59f3113cdf41491f16f039.tar.bz2 kvision-ff2b3855d3039025fb59f3113cdf41491f16f039.zip |
Fix guessing the build folder.
Diffstat (limited to 'kvision-tools/kvision-compiler-plugin/src/main/kotlin/pl')
-rw-r--r-- | kvision-tools/kvision-compiler-plugin/src/main/kotlin/pl/treksoft/kvision/plugin/KVProcessor.kt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kvision-tools/kvision-compiler-plugin/src/main/kotlin/pl/treksoft/kvision/plugin/KVProcessor.kt b/kvision-tools/kvision-compiler-plugin/src/main/kotlin/pl/treksoft/kvision/plugin/KVProcessor.kt index eba66a9b..84d31593 100644 --- a/kvision-tools/kvision-compiler-plugin/src/main/kotlin/pl/treksoft/kvision/plugin/KVProcessor.kt +++ b/kvision-tools/kvision-compiler-plugin/src/main/kotlin/pl/treksoft/kvision/plugin/KVProcessor.kt @@ -21,7 +21,7 @@ */ package pl.treksoft.kvision.plugin -import de.jensklingenberg.mpapt.common.guessingBuildFolder +import de.jensklingenberg.mpapt.common.canonicalFilePath import de.jensklingenberg.mpapt.common.methods import de.jensklingenberg.mpapt.model.AbstractProcessor import de.jensklingenberg.mpapt.model.Element @@ -62,7 +62,9 @@ class KVProcessor : AbstractProcessor() { && it.classDescriptor.name.asString().endsWith("Service") ) { val cl = it.classDescriptor - val genRootDir = File(cl.guessingBuildFolder(), "generated-src").apply { + val projectFolder = cl.canonicalFilePath()?.split("${File.separator}src")?.get(0) ?: "" + val buildFolder = "$projectFolder${File.separator}build" + val genRootDir = File(buildFolder, "generated-src").apply { mkdirs() } val packageName = cl.containingDeclaration.fqNameSafe.asString() |