org.neotech.plugin.rootcoverage.utilities.GradleExtensions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of android-root-coverage-plugin Show documentation
Show all versions of android-root-coverage-plugin Show documentation
A Gradle plugin for easy generation of combined code coverage reports for Android projects with multiple modules.
package org.neotech.plugin.rootcoverage.utilities
import org.gradle.api.Project
import org.gradle.api.file.ConfigurableFileTree
import org.gradle.api.file.FileTree
/**
* Executes an include match on the FileTree that only includes files with the .class extension.
*/
fun FileTree.excludeNonClassFiles(): FileTree = matching { it.include("**/*.class") }
/**
* Wrapper around Project.fileTree(Map) to use it easier from Kotlin code.
* Currently only supports the dir, excludes and includes properties.
* */
fun Project.fileTree(dir: Any, excludes: List = listOf(), includes: List = listOf()): ConfigurableFileTree =
fileTree(mapOf(
"dir" to dir,
"excludes" to excludes,
"includes" to includes))
© 2015 - 2024 Weber Informatics LLC | Privacy Policy