Since the beginning, writing a command-line app is a challenge in many of the object-oriented languages.
Writing a command-line app is a challenge in many object-oriented languages. Most the object-oriented languages need heavy lifting structure(source code) to run a simple program. Java/Kotlin is one of them. Here, Gradle comes to save us.
Gradle is a framework helping us to create and maintain big applications. Gradle is awesome. However, setting up Gradle is also a tedious task. Here I will show step by step setup to build a scalable CLI(Command Line Interface) tool in Kotlin.
Create a folder and scaffold the structure with Gradle.
mkdir kotlin-demos #[your project name] cd kotlin-demos && gradle init
Select basic [option 1] or just press enter. After that choose Kotlin[option 2] as build script DSL. You can enter the desired project name. The project name can be different from the folder name.
Once init is done, you can open the project in IntelliJ(IDE). It will sync the Gradle project and you can see available Gradle command on the right side of the IDE.
Note: You don’t require IntelliJ for this tutorial. However, IntelliJ is very handy to work with Gradle
What is OpenJDK? OpenJDk or Open Java Development Kit is a free, open-source framework of the Java Platform, Standard Edition (or Java SE).
Kotlin and Java have showcased the cut-throat competition in the lastest Android Development. There are a lot of ambiguities amongst developers to choose one, from both. This video will help you to understand the strengths and weaknesses of both with a head to head comparison.
Kotlin vs Java will help you to understand the differences between Kotlin and Java. Time and again, many have misconceptions about both the languages in android development.
Our Java Online Training provide you to learn about Java programming and its different features with realty. Our Java Online Course includes live sessions, live projects
How Record classes in Java’s most recent release compares to Kotlin’s data classes.