File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
main/kotlin/com/tschuchort/compiletesting
test/kotlin/com/tschuchort/compiletesting Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -410,13 +410,6 @@ class KotlinCompilation {
410410
411411 /* * Performs the 1st and 2nd compilation step to generate stubs and run annotation processors */
412412 private fun stubsAndApt (sourceFiles : List <File >): ExitCode {
413- pluginClasspaths.forEach { filepath ->
414- if (! filepath.exists()) {
415- error(" Plugin $filepath not found" )
416- return ExitCode .INTERNAL_ERROR
417- }
418- }
419-
420413 if (annotationProcessors.isEmpty()) {
421414 log(" No services were given. Not running kapt steps." )
422415 return ExitCode .OK
@@ -682,6 +675,13 @@ class KotlinCompilation {
682675 // write given sources to working directory
683676 val sourceFiles = sources.map { it.writeIfNeeded(sourcesDir) }
684677
678+ pluginClasspaths.forEach { filepath ->
679+ if (! filepath.exists()) {
680+ error(" Plugin $filepath not found" )
681+ return Result (ExitCode .INTERNAL_ERROR , classesDir, " " )
682+ }
683+ }
684+
685685 /*
686686 There are 4 steps to the compilation process:
687687 1. Generate stubs (using kotlinc with kapt plugin which does no further compilation)
Original file line number Diff line number Diff line change @@ -633,7 +633,9 @@ class KotlinCompilationTests {
633633 }.compile()
634634
635635 assertThat(result.exitCode).isEqualTo(ExitCode .OK )
636- assertThat(result.messages).contains(" provided plugin org.jetbrains.kotlin.scripting.compiler.plugin.ScriptingCompilerConfigurationComponentRegistrar" )
636+ assertThat(result.messages).contains(
637+ " provided plugin org.jetbrains.kotlin.scripting.compiler.plugin.ScriptingCompilerConfigurationComponentRegistrar"
638+ )
637639 }
638640
639641 @Test
You can’t perform that action at this time.
0 commit comments