From f821bd0f03778bf388f877a5a334c7844531462e Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Mon, 17 Apr 2017 22:59:29 -0700 Subject: [PATCH] Fixes and more implemenation. --- .../plugin/propertyfile/PropertyFilePlugin.kt | 51 +++++++++++++------ 1 file changed, 35 insertions(+), 16 deletions(-) diff --git a/src/main/kotlin/net/thauvin/erik/kobalt/plugin/propertyfile/PropertyFilePlugin.kt b/src/main/kotlin/net/thauvin/erik/kobalt/plugin/propertyfile/PropertyFilePlugin.kt index 47de875..21cefca 100644 --- a/src/main/kotlin/net/thauvin/erik/kobalt/plugin/propertyfile/PropertyFilePlugin.kt +++ b/src/main/kotlin/net/thauvin/erik/kobalt/plugin/propertyfile/PropertyFilePlugin.kt @@ -129,7 +129,7 @@ class PropertyFilePlugin @Inject constructor(val configActor: ConfigActor = Types.STRING, + var type: Types = Types.STRING, var operation: Enum = Operations.SET, var pattern: String = "", var unit: Units = Units.DAY) @@ -231,7 +250,7 @@ data class Entry( @Directive class PropertyFileConfig { var file: String = "" - var comment: String = "" + var comment: String = "PropertyFile Plugin for Kobalt" val entries = arrayListOf() @Suppress("unused") @@ -239,7 +258,7 @@ class PropertyFileConfig { key: String = "", value: String? = null, default: String? = null, - type: Enum = Types.STRING, + type: Types = Types.STRING, operation: Enum = Operations.SET, pattern: String = "", unit: Units = Units.DAY) { @@ -249,7 +268,7 @@ class PropertyFileConfig { @Suppress("unused") @Directive -fun Project.propertyfile(init: PropertyFileConfig.() -> Unit) { +fun Project.propertyFile(init: PropertyFileConfig.() -> Unit) { PropertyFileConfig().let { config -> config.init() (Plugins.findPlugin(PropertyFilePlugin.NAME) as PropertyFilePlugin).addConfiguration(this, config)