Looking for Kotlin Gradle tutorials for JVM beginner


#1

Hi, I really would like to start with Kotlin since I think it’s a great language in a very productive ecosystem. But since I have no prior experience with programming on the JVM (but with other programming languages) I struggle the most with the build system. I have not yet found a good introduction from start to more advanced use for gradle (with Kotlin script) for JVM beginners.

Topics I am esp. interested in are:

  • including an external Java or Kotlin library in my project

  • include a local library in my project

  • include an external binary library (C++ project with Java bindings (*.so files)) in my project

  • generate a build configuration that makes sure that all necessary files are includes in the final jar.

Could anybody point me to some tutorials suitable for an aspiring Kotlin programmer without Java experience?

Many thanks,
Axel


#2

Have you really entered your request in google search before posting here?
There is a tremendous amount of examples and tutorials for that in the network. Including official kotlin documentation and official gradle documentation.

I won’t even try to do your work for you, but will point out only one thing to save you time:

include an external binary library (C++ project with Java bindings (*.so files)) in my project

If you do have java bindings, meaning jar file, you can include it as library. If you do not, then probably it is not possible. JNI bindings include two parts: native and jvm, so you need both to work. You can also try to use JNA, but for that you should seek help outside kotlin community.


#3

I agree that there are probably a lot of tutorials for the Java context.
But for someone who does not want to learn Java before getting started in Kotlin I am not able to find much.

Kind regards,
Axel


#4

Let the google be with you.


#5

Ok, thanks, there are some useful hits there. I was specifically searching for tutorials before and did not find some of the hits your search gives.

Kind regards,
Axel