1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-27 00:38:11 -07:00

New PluginProperties implementation.

This commit is contained in:
Cedric Beust 2015-11-03 10:56:35 -08:00
parent 642f4fc0bc
commit 561f87726e
9 changed files with 56 additions and 23 deletions

View file

@ -8,6 +8,7 @@ import com.beust.kobalt.api.Kobalt
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.glob
import com.beust.kobalt.internal.JvmCompilerPlugin
@ -40,7 +41,10 @@ class PackagingPlugin @Inject constructor(val dependencyManager : DependencyMana
val executors: KobaltExecutors, val localRepo: LocalRepo) : BasePlugin() {
companion object {
public const val TASK_ASSEMBLE : String = "assemble"
@ExportedProperty
const val LIBS_DIR = "libsDir"
const val TASK_ASSEMBLE : String = "assemble"
}
override val name = "packaging"
@ -49,7 +53,7 @@ class PackagingPlugin @Inject constructor(val dependencyManager : DependencyMana
override fun apply(project: Project, context: KobaltContext) {
super.apply(project, context)
pluginProperties.put(LIBS_DIR, libsDir(project))
context.pluginProperties.put(name, LIBS_DIR, libsDir(project))
}
private fun libsDir(project: Project) = KFiles.makeDir(buildDir(project).path, "libs")