Skip to converter
Gradle to Kotlin
Back to the converter

A smoother move to Kotlin DSL.

Answers to common conversion questions, with practical steps for taking the result back to your Gradle project.

How do I convert build.gradle to build.gradle.kts?

Paste your Groovy script into the left editor. The Kotlin result updates as you edit. Review the result, then copy or download it. Save it as build.gradle.kts in the same module, replacing the original build.gradle after backing it up or committing it to version control. Sync Gradle and run your project's build and tests before committing the migration.

What changes between Groovy and Kotlin DSL?

Kotlin uses double-quoted strings and explicit function-call parentheses. Many property assignments need an equals sign. Gradle APIs and plugin configuration can also differ, so renaming the extension alone is not a migration. Here is a simple dependency declaration in both formats.

build.gradle
dependencies {
    implementation 'com.example:library:1.0'
}
build.gradle.kts
dependencies {
    implementation("com.example:library:1.0")
}

Will the converter handle my entire build?

It handles common patterns such as plugins, dependencies, Android configuration, and tasks. Treat the output as a migration starting point. Custom plugin APIs, dynamic Groovy code, and complex build logic can require manual changes. The converter does not run Gradle or verify that the result compiles with your project's plugin versions.

Do I have to migrate every module at once?

No. Groovy and Kotlin DSL scripts can coexist in one Gradle build. Migrate one script at a time and verify each change before moving to the next module. Each converted script should use its Kotlin filename; do not keep both versions of the same script as competing build files.

What about settings.gradle and other build files?

A project's settings script and module build scripts have different responsibilities. Migrating build.gradle does not automatically migrate settings.gradle, convention plugins, or buildSrc. Review these separately. A Kotlin settings script uses the name settings.gradle.kts.

Why does the converted script show unresolved references?

Check which plugin provides the referenced property or function and whether it is applied to that module. Consult that plugin's Kotlin DSL examples for your installed version. Some Groovy conventions have no direct Kotlin equivalent. Start with the first Gradle error, fix it, and sync again; later errors can be consequences of the first one.

Does the converter upload my build script?

The conversion engine runs in your browser and does not need a server request to translate the script. No account or API key is required. Conversion does not execute your script or resolve its dependencies.

How can I report an incorrect conversion?

Open a GitHub issue with a small Groovy example, the converter's output, and the Kotlin code you expected. Include relevant Gradle and plugin versions. Remove credentials, private repository addresses, and other sensitive project details before posting.