https://kotlinlang.org logo
#feed
Title
# feed
a

altavir

12/19/2021, 12:02 PM
After almost a year being a draft, the article about problems with plugin model in Gradle is out: https://medium.com/@altavir/what-is-wrong-with-gradle-a312a7ceb651. It is complementary to the talk I've made here (I hope that the recording will be available soon). In the talk I explain why Gradle is unique in its flexibility, but there are some problems. The article mostly about global design, but is based mostly on gradle.kts.
G 5
👍 11
k

kenkyee

12/19/2021, 1:17 PM
Should this be usually instead of seldom? "one seldom wants to use a version number both in plugins block and in dependencies block" Agree with most of the article. 🙂
a

altavir

12/19/2021, 1:19 PM
Thanks, I will fix it later.
n

nilTheDev

12/19/2021, 2:11 PM
Hey, @altavir I have seen in many places you recommended using Gradle and you are a huge fan of it. As a beginner, I tried to understand Gradle and I sort of understand it but sometimes it feels weird. Gradle is simply a collection of tasks. And every plugin provides a set of tasks to be performed. That's the basic explanation provided in all the beginner level docs. However, after stating that, the docs move straight to describe the usage of some kind of plugin to achieve a specific goal like compiling a kotlin source or creating an Android build. I haven't been able to find any tutorials that shows the code compilation from the command line and walk upwards by creating Gradle tasks to achieve the same. I am pretty sure this is really simple. That's why no one even bothered to create a tutorial on it. But whenever I talked with any beginner who is using Gradle I found that nobody knows how to do this. And their (including myself) understanding of Gradle is very shallow. For example, beginner people know what Gradle is doing but they don't have any idea on how they can write Gradle tasks to do the same thing without any plugin. That's why we are heavily relied on copy pasting from the docs when it comes to using Gradle. It would be really helpful if you can come up with some articles that take a bottom up approach on explaining Gradle. I found a book named "Gradle in action" but that is so backdated that the code snippets doesn't work in modern versions of Gradle.
👌 1
👍 4
a

altavir

12/19/2021, 2:25 PM
Gradle is very powerful (maybe the most powerful) tool to manage your project (not only build), but it requires some time to learn (two weeks would be fine for people, familiar with kotlin).
j

jimn

12/19/2021, 2:28 PM
kotlin without gradle could do better. I see Stockholme Syndrome in any declaration that borrowing a groovy language build and reskinning it for an unrelated cross platform language deserves superlatives.
2
n

nilTheDev

12/19/2021, 2:47 PM
@altavir Can you suggest any good material for learning Gradle from the ground up? I tried the docs, the Gradle Trainng Program (hosted by Gradle). But still no luck.
a

altavir

12/19/2021, 2:50 PM
Not sure about that. I gave a several lectures on it, but most of them are in Russian. Last week I made a talk at Casus science in English but recording is not ready. We can ask @elect to ping here when it is.
1
n

nilTheDev

12/19/2021, 2:52 PM
Yep, a ping in feed would be superb.
That playlist above is a nice and super up-to-date intro to Gradle
Getting early "build management stage" would be nice. I'm still amazed how everything still works given the number of assumptions and "afterEvaluate {}" scattered all over the place 🙃
1
n

nilTheDev

12/19/2021, 3:27 PM
Thanks @mbonnin. I will try it out.
👍 1
That can improve a bit not depending in plugins order or after evaluate
a

altavir

12/19/2021, 4:19 PM
It could fix some problems, but not the design. And I think it is good idea for gradle team to think about the problem (we actually talked about it on Kotlinconf 2019).
3 Views