Gradle Kotlin vs. Groovy DSL (side-by-side comparison)

Опубликовано: 25 Июль 2021
на канале: Tom Gregory Tech
8,169
200

Is the Gradle Kotlin DSL any good? Find out with this side-by-side comparison between the Kotlin & Groovy DSL. You'll learn the main differences as we create a Gradle project in both languages at the same time.

🚀 FREE QUICK-START GRADLE GUIDE https://tomgregory.com/gradlequickstart

🔥 ULTIMATE GRADLE BUILD BIBLE https://tomgregory.com/gradlebuildbible

Quick access to differences in Kotlin DSL:
0:00 Introduction
0:21 Different build file name
0:40 Improved plugins syntax & autocomplete
1:25 Different syntax to set task properties
1:45 Different register task syntax
2:05 Use equals to set class variables
3:02 Configuring jar task
3:25 Double quoted strings
4:05 Always use brackets
4:42 No build script warnings in IDE

CORRECTION
In Groovy it's better to use "tasks.named('jar')" instead of "jar" when configuring the jar task. That way you will avoid potential unnecessary configuration.

📖 Check out the accompanying article "5 reasons to switch to the Gradle Kotlin DSL" https://tomgregory.com/gradle/5-reaso...


Смотрите видео Gradle Kotlin vs. Groovy DSL (side-by-side comparison) онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Tom Gregory Tech 25 Июль 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 8,169 раз и оно понравилось 200 людям.