import org.gradle.api.tasks.*
import org.apache.tools.ant.filters.*

//for including in the copy task
val dataContent = copySpec {
    it.from("src/data")
    it.include("*.data")
}

task<Copy>("initConfig") {

    from("src/main/config") {
        it.include("**/*.properties")
        it.include("**/*.xml")
        it.filter<ReplaceTokens>(
            "tokens" to mapOf("version" to "2.3.1"))
    }

    from("src/main/languages") {
        it.rename("EN_US_(.*)", "$1")
    }

    into("build/target/config")
    exclude("**/*.bak")
    includeEmptyDirs = false
    with(dataContent)
}

task<Delete>("clean") {
    delete(buildDir)
}

import org.gradle.api.file.*
import org.gradle.api.tasks.*
import org.apache.tools.ant.filters.*

//for including in the copy task
val dataContent = copySpec {
    it.from("src/data")
    it.include("*.data")
}

task<Copy>("initConfig") {

    from("src/main/config").let { it as CopySpec }.apply {
        include("**/*.properties")
        include("**/*.xml")
        filter<ReplaceTokens>(
            "tokens" to mapOf("version" to "2.3.1"))
    }

    from("src/main/languages").let { it as CopySpec }.apply {
        rename("EN_US_(.*)", "$1")
    }

    into("build/target/config")
    exclude("**/*.bak")
    includeEmptyDirs = false
    with(dataContent)
}

task<Delete>("clean") {
    delete(buildDir)
}

Fix copy sample to work against latest Gradle API
Fix copy sample to work against latest Gradle API

Interim solution until either #52 is implemented or the change in the
Gradle API is reconsidered.

blindpirate/gradle,robinverduijn/gradle,gradle/gradle,blindpirate/gradle,gradle/gradle-script-kotlin,robinverduijn/gradle,gradle/gradle,gradle/gradle,gradle/gradle,robinverduijn/gradle,blindpirate/gradle,blindpirate/gradle,robinverduijn/gradle,gradle/gradle,blindpirate/gradle,blindpirate/gradle,gradle/gradle,gradle/gradle,robinverduijn/gradle,robinverduijn/gradle,robinverduijn/gradle,gradle/gradle,blindpirate/gradle,robinverduijn/gradle,gradle/gradle,blindpirate/gradle,robinverduijn/gradle,gradle/gradle-script-kotlin,blindpirate/gradle,gradle/gradle,blindpirate/gradle,robinverduijn/gradle,robinverduijn/gradle