vmptk / gradle2kts

Gradle Groovy to Gradle Kotlin conversion tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gradle2kts

Gradle Groovy to Gradle Kotlin conversion tool.

task compile {
    doLast {
        println 'compiling source'
    }
}

task compileTest(dependsOn: compile) {
    doLast {
        println 'compiling unit tests'
    }
}

task test(dependsOn: [compile, compileTest]) {
    doLast {
        println 'running unit tests'
    }
}

task dist(dependsOn: [compile, test]) {
    doLast {
        println 'building the distribution'
    }
}

Becomes:

val compile by tasks.creating {
    doLast {
        println("compiling source")
    }
}

val compileTest by tasks.creating {
    dependsOn(compile)
    doLast {
        println("compiling unit tests")
    }
}

val test by tasks.creating {
    dependsOn(compile, compileTest)
    doLast {
        println("running unit tests")
    }
}

val dist by tasks.creating {
    dependsOn(compile, test)
    doLast {
        println("building the distribution")
    }
}

About

Gradle Groovy to Gradle Kotlin conversion tool

License:Other


Languages

Language:Kotlin 100.0%