mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 08:38:13 -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
|
@ -21,9 +21,6 @@ class GroovyPlugin @Inject constructor(val groovyCompiler: GroovyCompiler,
|
|||
|
||||
override fun sourceSuffixes() = SOURCE_SUFFIXES
|
||||
|
||||
// IDocContributor
|
||||
override fun affinity(project: Project, context: KobaltContext) = sourceFileCount(project)
|
||||
|
||||
// ICompilerFlagsContributor
|
||||
override fun compilerFlagsFor(project: Project, context: KobaltContext, currentFlags: List<String>,
|
||||
suffixesBeingCompiled: List<String>) =
|
||||
|
|
|
@ -23,9 +23,6 @@ class JavaPlugin @Inject constructor(val javaCompiler: JavaCompiler, override va
|
|||
|
||||
override val name = PLUGIN_NAME
|
||||
|
||||
// IDocContributor
|
||||
override fun affinity(project: Project, context: KobaltContext) = sourceFileCount(project)
|
||||
|
||||
override fun sourceSuffixes() = SOURCE_SUFFIXES
|
||||
|
||||
override fun generateDoc(project: Project, context: KobaltContext, info: CompilerActionInfo) : TaskResult {
|
||||
|
|
|
@ -33,7 +33,7 @@ class KotlinPlugin @Inject constructor(val executors: KobaltExecutors, val depen
|
|||
|
||||
// IDocContributor
|
||||
override fun affinity(project: Project, context: KobaltContext) =
|
||||
if (project.sourceDirectories.any { it.contains("kotlin") }) 2 else 0
|
||||
if (sourceFileCount(project) > 0) 2 else 0
|
||||
|
||||
override fun generateDoc(project: Project, context: KobaltContext, info: CompilerActionInfo) : TaskResult {
|
||||
return TaskResult()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue