hi. I am new to Kotlin, “Gradle and the Kotlin DSL” build system. I am not new to programming though. I am using Intellij. I am trying to learn kotlin and the gradle build system using kotlin dsl all at the same time. And it is super confusing. Nothing seems straight forward. I am not new to programming at all by any stretch. But I am new to kotlin and the entire java ecosystem. And I want to learn this as soon as possible because, I will start work on a very large kotlin/gradle project at work very soon.
At the moment, I am trying to do the following just to test out the kotlin language, and learn more about the gradle/kotlin DSL build system.
- create a kotlin project with gradle/kotlinDSL as build system
- add the fuel (http client) as a dependency.
- use fuel to make a http request.
At the moment I am stuck at “adding fuel as a dependency”. In intellij, I added fuel as a dependency in project settings but still i keep getting “unresolved reference”
Here are some of the problems I faced and does not seem straight-forward for someone that has been coding professionally for a long time, but is very new to the java ecosystem.
- couldn’t find the one package manager. python has pypi. rust has crates. c# has nuget. So I naively assumed I would find something like that in the java/jvm/kotlin world. Oh boy, how wrong I was.
- theres like 10 different JDKs. I am not sure which one is the most used and which one I should use.
- confusion about what the JDK is. Is it the compiler , runtime and standard libraries. ?
- there is jscentral. maven central. and many others. Are they repositories of java libraries? kotlin libraries? or a combination of both.
- can i use any java libary with kotlin? Or are there some java libraries that won’t work with kotlin? If so how do I tell if a java library will not work with kotlin
- are libraries restricted to working on only certain SDKs and not others?
- what is a module? can modules exist within other modules? In the c# world a solution can have many projects. Is it something like that?
I have so many other questions and If I seem frustrated, my apologies. I have been trying to get fuel added as a dependency and It just wont work. I’ve been trying to work this out for the past one day.
Otherwise, I think kotlin is a beauty. I just wish it was easier to understand the ecosytem.
Any help or document/tutorial/book that will help me to answer some or all these questions will be appreciated.