My video on Gradle ( • We need to talk about Gradle ) was my most popular yet, and there was a lot of discussion on YouTube and Reddit. But I don’t want to be known for my rants. My job as an engineer is to deliver value to my clients efficiently and effectively; not to complain about how hard that can be.
That said, thank you to the people who said that they were were heartened by the knowledge that it isn’t just them - simple things are often harder than they should be.
Thank you also to the people in JetBrains who contacted me to discuss my issues. Both JetBrains and Gradle know that there are problems with build tooling, and both had talks at KotlinConf outlining their approaches. Neither had much detail, but Amper at least is available in early access for us to try.
Today’s video doesn’t do that though. Instead it starts from a new git clone of the project so that I can work out how to move from Java 19 to Java 21 with a fresh pair of eyes and a fresh checkout.
In this episode
00:00:57 Let's begin with a fresh clone
00:01:50 IntelliJ needs to run Gradle to know what modules exist
00:02:57 Now lets build our specific module
00:03:20 There are warnings about Kotlin and Gradle versions - lets try to get rid of them
00:08:39 Still chasing where the versions are coming from!
00:10:08 It turns out that we can't clean from command line because that is using a different version of Java
00:11:38 Try to upgradle
00:13:23 Continue Yak Shaking
00:17:10 Finally we can build and run in IntelliJ and Bash - now try to upgrade the Java target version to 21
00:17:53 Our issue is an old version of the Kotlin Gradle plugin that doesn't know about Java 21
00:22:48 How many versions?
If you like this, you’ll probably like my book Java to Kotlin, A Refactoring Guidebook (http://java-to-kotlin.dev). It's about far more than just the syntax differences between the languages - it shows how to upgrade your thinking to a more functional style.
Watch video Was Betteridge right? online without registration, duration hours minute second in high quality. This video was added by user Pairing with Duncan 31 May 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 833 once and liked it 39 people.