mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 16:28:12 -07:00
parent
9e53359790
commit
385a5005a1
2 changed files with 11 additions and 6 deletions
|
@ -33,11 +33,11 @@ class JavaPlugin @Inject constructor(
|
|||
|
||||
override val name = PLUGIN_NAME
|
||||
|
||||
override fun accept(project: Project) = project is JavaProject
|
||||
override fun accept(project: Project) = project.sourceDirectories.any { it.contains("java") }
|
||||
|
||||
// IDocContributor
|
||||
override fun affinity(project: Project, context: KobaltContext) =
|
||||
if (project.sourceDirectories.any { it.contains("java") }) 1 else 0
|
||||
if (accept(project)) 1 else 0
|
||||
|
||||
override fun generateDoc(project: Project, context: KobaltContext, info: CompilerActionInfo) : TaskResult {
|
||||
val result =
|
||||
|
|
|
@ -33,9 +33,17 @@ class KotlinPlugin @Inject constructor(
|
|||
const val PLUGIN_NAME = "Kotlin"
|
||||
}
|
||||
|
||||
override fun apply(project: Project, context: KobaltContext) {
|
||||
super.apply(project, context)
|
||||
}
|
||||
|
||||
override val name = PLUGIN_NAME
|
||||
|
||||
override fun accept(project: Project) = project is KotlinProject
|
||||
override fun accept(project: Project) = project.sourceDirectories.any { it.contains("kotlin") }
|
||||
|
||||
// IDocContributor
|
||||
override fun affinity(project: Project, context: KobaltContext) =
|
||||
if (project.sourceDirectories.any { it.contains("kotlin") }) 2 else 0
|
||||
|
||||
override fun generateDoc(project: Project, context: KobaltContext, info: CompilerActionInfo) : TaskResult {
|
||||
return TaskResult()
|
||||
|
@ -127,9 +135,6 @@ class KotlinPlugin @Inject constructor(
|
|||
|
||||
override val sourceSuffixes = listOf("kt")
|
||||
|
||||
override fun affinity(project: Project, context: KobaltContext) =
|
||||
if (project.sourceDirectories.any { it.contains("kotlin") }) 2 else 0
|
||||
|
||||
override fun compile(project: Project, context: KobaltContext, info: CompilerActionInfo) : TaskResult {
|
||||
val result =
|
||||
if (info.sourceFiles.size > 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue