From f29ec48ddf0b83c21721d7c90d116d7f90816833 Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Thu, 7 Apr 2016 19:02:26 -0800 Subject: [PATCH] Apply plug-ins after running the interceptors. --- src/main/kotlin/com/beust/kobalt/Main.kt | 8 +++++++- src/main/kotlin/com/beust/kobalt/app/BuildFileCompiler.kt | 3 --- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/com/beust/kobalt/Main.kt b/src/main/kotlin/com/beust/kobalt/Main.kt index a7e1dafd..6cff5303 100644 --- a/src/main/kotlin/com/beust/kobalt/Main.kt +++ b/src/main/kotlin/com/beust/kobalt/Main.kt @@ -201,12 +201,18 @@ private class Main @Inject constructor( } // - // Run all their dependencies through the IDependencyInterceptors + // Run all the dependencies through the IDependencyInterceptors // runClasspathInterceptors(allProjects) log(2, "Final list of repos:\n " + Kobalt.repos.joinToString("\n ")) + // + // Call apply() on all plug-ins now that the repos are set up + // + plugins.applyPlugins(Kobalt.context!!, allProjects) + + if (args.projectInfo) { // --projectInfo allProjects.forEach { diff --git a/src/main/kotlin/com/beust/kobalt/app/BuildFileCompiler.kt b/src/main/kotlin/com/beust/kobalt/app/BuildFileCompiler.kt index c5d7d1af..78395085 100644 --- a/src/main/kotlin/com/beust/kobalt/app/BuildFileCompiler.kt +++ b/src/main/kotlin/com/beust/kobalt/app/BuildFileCompiler.kt @@ -55,9 +55,6 @@ public class BuildFileCompiler @Inject constructor(@Assisted("buildFiles") val b // Find all the projects in the build file, possibly compiling them // val projectResult = findProjects(context) - if (projectResult.taskResult.success) { - plugins.applyPlugins(context, projectResult.projects) - } return projectResult }