You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plugin/src/main/kotlin/org/neotech/plugin/rootcoverage/RootCoveragePlugin.kt
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -197,8 +197,12 @@ class RootCoveragePlugin : Plugin<Project> {
197
197
// Hard coded alternative to get class files for Java.
198
198
//val classesTree = project.fileTree(mapOf("dir" to "${project.buildDir}/intermediates/classes/${variant.dirName}", "excludes" to getFileFilterPatterns()))
199
199
200
-
// TODO: No idea how to dynamically get the kotlin class files output folder... so for now this is hardcoded.
201
-
val kotlinClassTree = project.fileTree("${project.buildDir}/tmp/kotlin-classes/${variant.dirName}", excludes = getFileFilterPatterns()).excludeNonClassFiles()
200
+
// TODO: No idea how to dynamically get the kotlin class files output folder, so for now this is hardcoded.
201
+
// TODO: For some reason the tmp/kotlin-classes folder does not use the variant.dirName property, for now we instead use the variant.name.
202
+
val kotlinClassFolder ="${project.buildDir}/tmp/kotlin-classes/${variant.name}"
203
+
project.logger.info("Kotlin class folder for variant '${variant.name}': $kotlinClassFolder")
204
+
205
+
val kotlinClassTree = project.fileTree(kotlinClassFolder, excludes = getFileFilterPatterns()).excludeNonClassFiles()
202
206
203
207
// getSourceFolders returns ConfigurableFileCollections, but we only need the base directory of each ConfigurableFileCollection.
204
208
val sourceFiles = variant.getSourceFolders(SourceKind.JAVA).map { file -> file.dir }
0 commit comments