diff --git a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/internal/JvmCompilerPlugin.kt b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/internal/JvmCompilerPlugin.kt index 51f10052..fd473f8b 100644 --- a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/internal/JvmCompilerPlugin.kt +++ b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/internal/JvmCompilerPlugin.kt @@ -187,8 +187,8 @@ open class JvmCompilerPlugin @Inject constructor( var done = false // The directory where the classes get compiled val buildDirectory = - if (isTest) File(project.buildDirectory, KFiles.TEST_CLASSES_DIR) - else File(project.classesDir(context)) + if (isTest) File(KFiles.joinDir(project.directory, project.buildDirectory, KFiles.TEST_CLASSES_DIR)) + else File(KFiles.joinDir(project.directory, project.classesDir(context))) allCompilersSorted.doWhile({ ! done }) { compiler -> val compilerResults = compilerUtils.invokeCompiler(project, context, compiler,