Minor, use resolveSibling in getAbsolutePaths
This commit is contained in:
+1
-6
@@ -218,12 +218,7 @@ object KotlinToJVMBytecodeCompiler {
|
|||||||
|
|
||||||
private fun getAbsolutePaths(buildFile: File, sourceFilePaths: List<String>): List<String> =
|
private fun getAbsolutePaths(buildFile: File, sourceFilePaths: List<String>): List<String> =
|
||||||
sourceFilePaths.map { path ->
|
sourceFilePaths.map { path ->
|
||||||
val sourceFile = File(path)
|
(File(path).takeIf(File::isAbsolute) ?: buildFile.resolveSibling(path)).absolutePath
|
||||||
if (!sourceFile.isAbsolute) {
|
|
||||||
File(buildFile.absoluteFile.parentFile, path).absolutePath
|
|
||||||
} else {
|
|
||||||
sourceFile.absolutePath
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun findMainClass(generationState: GenerationState, files: List<KtFile>): FqName? {
|
private fun findMainClass(generationState: GenerationState, files: List<KtFile>): FqName? {
|
||||||
|
|||||||
Reference in New Issue
Block a user