mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 08:38:13 -07:00
New PluginProperties implementation.
This commit is contained in:
parent
642f4fc0bc
commit
561f87726e
9 changed files with 56 additions and 23 deletions
|
@ -4,6 +4,7 @@ import com.beust.kobalt.api.BasePlugin
|
|||
import com.beust.kobalt.api.KobaltContext
|
||||
import com.beust.kobalt.api.Project
|
||||
import com.beust.kobalt.api.annotation.Directive
|
||||
import com.beust.kobalt.api.annotation.ExportedProperty
|
||||
import com.beust.kobalt.api.annotation.Task
|
||||
import com.beust.kobalt.maven.*
|
||||
import com.beust.kobalt.misc.KFiles
|
||||
|
@ -24,6 +25,9 @@ abstract class JvmCompilerPlugin @Inject constructor(
|
|||
open val jvmCompiler: JvmCompiler) : BasePlugin() {
|
||||
|
||||
companion object {
|
||||
@ExportedProperty
|
||||
const val BUILD_DIR = "buildDir"
|
||||
|
||||
const val TASK_CLEAN = "clean"
|
||||
const val TASK_TEST = "test"
|
||||
|
||||
|
@ -41,10 +45,11 @@ abstract class JvmCompilerPlugin @Inject constructor(
|
|||
|
||||
var context: KobaltContext? = null
|
||||
|
||||
|
||||
override fun apply(project: Project, context: KobaltContext) {
|
||||
super.apply(project, context)
|
||||
this.context = context
|
||||
pluginProperties.put(BUILD_DIR, project.buildDirectory + File.separator + "classes")
|
||||
context.pluginProperties.put(name, BUILD_DIR, project.buildDirectory + File.separator + "classes")
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue