pull/1837/head
Alfayed Baksh 9 months ago
parent 1a00ad53b6
commit 6f8a8ca4fd

@ -90,15 +90,16 @@ internal fun Project.configureJacoco(
html.required = true html.required = true
} }
// Collect all java and kotlin source directories from the variant's source sets fun SourceDirectories.Flat?.toFilePaths(): Provider<List<String>> = this
fun SourceDirectories.Flat.toFilePaths(): Provider<List<String>> = this ?.all
.all ?.map { directories -> directories.map { it.asFile.path } }
.map { directories -> directories.map { it.asFile.path } } ?: provider { emptyList() }
operator fun Provider<List<String>>.plus(other: Provider<List<String>>) =
zip(other) { first, second -> first + second }
sourceDirectories.setFrom( sourceDirectories.setFrom(
files( files(
variant.sources.java?.toFilePaths(), variant.sources.java.toFilePaths() + variant.sources.kotlin.toFilePaths()
variant.sources.kotlin?.toFilePaths() ),
)
) )
executionData.setFrom( executionData.setFrom(

Loading…
Cancel
Save