This video shows how to convert Groovy-based Gradle scripts to Kotlin, using IntelliJ IDEA. The video walks through migrating a real multi-module application so that at the end of the tutorial the project uses Gradle's Kotlin DSL. We'll use IntelliJ IDEA's:
- Replace in Files feature with a file pattern to find code in build.gradle files that needs to be converted to Kotlin-friendly syntax
- Support for regular expressions in Replace in Files to locate patterns of Groovy code that can be converted to a Kotlin-style syntax
- Rename refactoring to change the filenames
More information:
Table of Contents:
00:00 - Introduction
00:40 - Replace single quotes with double
02:11 - Wrap arguments in parentheses
05:00 - Check settings.gradle
06:04 - Use the task container
06:46 - Replace = with set
07:37 - Check if anything has been missed
09:13 - Rename files
11:14 - Correct any errors
12:34 - Further information