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

name.remal.gradle_plugins.dsl.extensions.org.gradle.api.tasks.compile.AbstractCompile.kt Maven / Gradle / Ivy

package name.remal.gradle_plugins.dsl.extensions

import org.gradle.api.file.FileVisitDetails
import org.gradle.api.tasks.SourceSet
import org.gradle.api.tasks.compile.AbstractCompile

fun AbstractCompile.isCompilingSourceSet(sourceSet: SourceSet): Boolean {
    val absoluteDestinationDir = destinationDir.absoluteFile
    return sourceSet.output.classesDirs.files.any { it.absoluteFile == absoluteDestinationDir }
}

fun AbstractCompile.forEachCreatedClassFile(action: (fileVisitDetails: FileVisitDetails) -> Unit) {
    project.fileTree(destinationDir).visit {
        if (it.name.endsWith(".class") && it.isFile) {
            action(it)
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy