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:
parent
23360b6077
commit
86dec889f2
4 changed files with 4 additions and 8 deletions
|
@ -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>
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue