1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 08:27:12 -07:00

Pull a few functions up in BaseJvmPlugin.

This commit is contained in:
Cedric Beust 2017-02-14 11:15:48 -08:00
parent 23360b6077
commit 86dec889f2
4 changed files with 4 additions and 8 deletions

View file

@ -24,12 +24,14 @@ abstract class BaseJvmPlugin<T>(open val configActor: ConfigActor<T>) :
override fun accept(project: Project) = sourceFileCount(project) > 0
// IBuildConfigContributor
protected fun sourceFileCount(project: Project)
= KFiles.findSourceFiles(project.directory, project.sourceDirectories, sourceSuffixes()).size +
KFiles.findSourceFiles(project.directory, project.sourceDirectoriesTest, sourceSuffixes()).size
fun affinity(project: Project) = sourceFileCount(project)
// IDocContributor
open fun affinity(project: Project, context: KobaltContext) = sourceFileCount(project)
abstract fun sourceSuffixes() : List<String>
}