mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Refactoring.
This commit is contained in:
parent
b1860e64e2
commit
13d9a36a6b
1 changed files with 7 additions and 8 deletions
|
@ -2,14 +2,11 @@ package com.beust.kobalt.api
|
|||
|
||||
import com.beust.kobalt.Plugins
|
||||
import com.beust.kobalt.internal.TaskManager
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
abstract public class BasePlugin : IPlugin {
|
||||
override var taskManager: TaskManager by Delegates.notNull()
|
||||
override fun accept(project: Project) = true
|
||||
var plugins: Plugins by Delegates.notNull()
|
||||
lateinit var context: KobaltContext
|
||||
|
||||
var context: KobaltContext by Delegates.notNull()
|
||||
override fun accept(project: Project) = true
|
||||
|
||||
override fun apply(project: Project, context: KobaltContext) {
|
||||
this.context = context
|
||||
|
@ -17,7 +14,9 @@ abstract public class BasePlugin : IPlugin {
|
|||
|
||||
protected val projects = arrayListOf<ProjectDescription>()
|
||||
|
||||
fun addProject(project: Project, dependsOn: Array<out Project>) {
|
||||
projects.add(ProjectDescription(project, dependsOn.toList()))
|
||||
}
|
||||
fun addProject(project: Project, dependsOn: Array<out Project>) =
|
||||
projects.add(ProjectDescription(project, dependsOn.toList()))
|
||||
|
||||
override lateinit var taskManager: TaskManager
|
||||
lateinit var plugins: Plugins
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue