Skip to content

Commit

Permalink
Update MavenMojoProjectParser.java
Browse files Browse the repository at this point in the history
Fix bug where Kotlin test source parsing actually parsed main dir a second time, and test sources were later parsed as additional resources
  • Loading branch information
nmck257 authored Dec 13, 2023
1 parent 24ddb24 commit f458136
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ private Stream<SourceFile> processTestSources(
alreadyParsed.addAll(testJavaSources);

// scan Kotlin files
String kotlinSourceDir = getKotlinDirectory(mavenProject.getBuild().getSourceDirectory());
String kotlinSourceDir = getKotlinDirectory(mavenProject.getBuild().getTestSourceDirectory());
List<Path> testKotlinSources = (kotlinSourceDir != null) ? listKotlinSources(mavenProject.getBasedir().toPath().resolve(kotlinSourceDir)) : Collections.emptyList();
alreadyParsed.addAll(testKotlinSources);

Expand Down

0 comments on commit f458136

Please sign in to comment.