diff --git a/src/main/kotlin/com/beust/kobalt/internal/build/BuildFileCompiler.kt b/src/main/kotlin/com/beust/kobalt/internal/build/BuildFileCompiler.kt index 12dfa7b8..7476bce0 100644 --- a/src/main/kotlin/com/beust/kobalt/internal/build/BuildFileCompiler.kt +++ b/src/main/kotlin/com/beust/kobalt/internal/build/BuildFileCompiler.kt @@ -58,8 +58,8 @@ public class BuildFileCompiler @Inject constructor(@Assisted("buildFiles") val b private fun findProjects(context: KobaltContext): List { val result = arrayListOf() buildFiles.forEach { buildFile -> - val processBuildFile = parseBuildFile(context, buildFile) - val pluginUrls = processBuildFile.pluginUrls + val parsedBuildFile = parseBuildFile(context, buildFile) + val pluginUrls = parsedBuildFile.pluginUrls val buildScriptJarFile = File(KFiles.findBuildScriptLocation(buildFile, SCRIPT_JAR)) // If the script jar files were generated by a different version, wipe them in case the API @@ -74,7 +74,7 @@ public class BuildFileCompiler @Inject constructor(@Assisted("buildFiles") val b // Write the modified Build.kt (e.g. maybe profiles were applied) to a temporary file, // compile it, jar it in buildScript.jar and run it val modifiedBuildFile = KFiles.createTempFile(".kt") - KFiles.saveFile(modifiedBuildFile, processBuildFile.buildScriptCode) + KFiles.saveFile(modifiedBuildFile, parsedBuildFile.buildScriptCode) maybeCompileBuildFile(context, BuildFile(Paths.get(modifiedBuildFile.path), "Modified Build.kt"), buildScriptJarFile, pluginUrls) val projects = buildScriptUtil.runBuildScriptJarFile(buildScriptJarFile, pluginUrls, context)