File tree 2 files changed +3
-2
lines changed
kover-gradle-plugin/src/main/kotlin/kotlinx/kover/gradle/aggregation
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -6,5 +6,6 @@ package kotlinx.kover.gradle.aggregation.commons.names
6
6
7
7
internal object PluginId {
8
8
const val KOTLIN_JVM_PLUGIN_ID = " org.jetbrains.kotlin.jvm"
9
+ const val KOTLIN_ANDROID_PLUGIN_ID = " org.jetbrains.kotlin.android"
9
10
const val KOTLIN_MULTIPLATFORM_PLUGIN_ID = " org.jetbrains.kotlin.multiplatform"
10
11
}
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ internal class KoverProjectGradlePlugin : Plugin<Project> {
78
78
79
79
val compilations = project.layout.buildDirectory.map {
80
80
val compilations = when {
81
- pluginManager.hasPlugin(KOTLIN_JVM_PLUGIN_ID ) -> {
81
+ pluginManager.hasPlugin(KOTLIN_JVM_PLUGIN_ID ) || pluginManager.hasPlugin( KOTLIN_ANDROID_PLUGIN_ID ) -> {
82
82
val kotlin = exts.findByName(" kotlin" )?.bean()
83
83
? : throw KoverCriticalException (" Kotlin JVM extension not found" )
84
84
kotlin[" target" ][" compilations" ].sequence()
@@ -100,7 +100,7 @@ internal class KoverProjectGradlePlugin : Plugin<Project> {
100
100
101
101
compilations.filter { compilation ->
102
102
val compilationName = compilation[" name" ].value<String >()
103
- if (compilationName == " test" ) return @filter false
103
+ if (compilationName == " test" || compilationName.endsWith( " Test " ) ) return @filter false
104
104
105
105
val taskPath = projectPath + (if (projectPath == Project .PATH_SEPARATOR ) " " else Project .PATH_SEPARATOR ) + compilation[" compileTaskProvider" ][" name" ].value<String >()
106
106
taskGraph.hasTask(taskPath)
You can’t perform that action at this time.
0 commit comments