Skip to content
This repository has been archived by the owner on Apr 21, 2020. It is now read-only.
/ gradle2kts Public archive

Gradle Groovy to Gradle Kotlin conversion tool - discontinued spike

License

Notifications You must be signed in to change notification settings

gradle/gradle2kts

Repository files navigation

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 - discontinued spike

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages