Minor, use resolveSibling in getAbsolutePaths

This commit is contained in:
Alexander Udalov
2018-08-20 11:34:04 +02:00
parent e56374908e
commit f069686a14
@@ -218,12 +218,7 @@ object KotlinToJVMBytecodeCompiler {
private fun getAbsolutePaths(buildFile: File, sourceFilePaths: List<String>): List<String> =
sourceFilePaths.map { path ->
val sourceFile = File(path)
if (!sourceFile.isAbsolute) {
File(buildFile.absoluteFile.parentFile, path).absolutePath
} else {
sourceFile.absolutePath
}
(File(path).takeIf(File::isAbsolute) ?: buildFile.resolveSibling(path)).absolutePath
}
private fun findMainClass(generationState: GenerationState, files: List<KtFile>): FqName? {