import com.beust.kobalt.*
import com.beust.kobalt.plugin.packaging.*
import com.beust.kobalt.plugin.application.*
{{imports}}

val bs = buildScript {
    repos({{{repositories}}})
}

{{#properties}}
val {{first}} = "{{second}}"
{{/properties}}

val p = {{directive}} {

    name = "{{name}}"
    group = "{{group}}"
    artifactId = name
    version = "{{version}}"

    sourceDirectories {
        {{#sourceDirectories}}
        path("{{toString}}")
        {{/sourceDirectories}}
    }

    sourceDirectoriesTest {
        {{#sourceDirectoriesTest}}
        path("{{toString}}")
        {{/sourceDirectoriesTest}}
    }

    dependencies {
//        compile("com.beust:jcommander:1.48")
        {{#mainDependencies}}
        compile("{{groupId}}:{{artifactId}}:{{version}}")
        {{/mainDependencies}}
    }

    dependenciesTest {
        compile("org.testng:testng:6.11")
        {{#testDependencies}}
        compile("{{groupId}}:{{artifactId}}:{{version}}")
        {{/testDependencies}}

    }

    assemble {
        jar {
        }
    }

    application {
        mainClass = "com.example.{{mainClass}}"
    }


}
