All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.neotech.plugin.rootcoverage.utilities.GradleExtensions.kt Maven / Gradle / Ivy

Go to download

A Gradle plugin for easy generation of combined code coverage reports for Android projects with multiple modules.

There is a newer version: 1.9.0
Show newest version
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