How to setup kotlin development enviroment for beginners

마경욱
2 min readJun 13, 2020

--

Welcome! Kotlin Beginners. Our team decide to set up new development environment for changing development stack Ruby on Rails to Kotlin&Spring Boot. Most of our engineers only have experience using Java/Rails.

So, We need engineering process for writing “GOOD” kotlin code. There’s so many software engineering practice for maintaning quality of software. However, Our team is in startup phase. So, we decided start with small but essential code review process. Before request review, All developer should do self-checking with static anaylsis tool. It can be helpful for reducing time-consuming review. In this tutorial, i will let you know how to setup static analysis tool for kotlin development environment step by step.

Prerequisites

You can also install SonarQube server on your own local environment. In that case SonarQube need Java 11 for running. Try to avoid dependency hell, Running dependencies on docker is smart choice.

1. Get SonarQube docker image

docker pull sonarqube

2. Run SonarQube container

docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 sonarqube

It take some time SonarQube loaded fully. After SonarQube is loaded completely, You can see SonarQube dashboard on http://localhost:9000

3. Install SonarLint(IntelliJ plugin) for integrating with SonarQube

4. Bind to local sonarqube

‘Setting’ > ‘Tool’ > ‘SonarLint’ > ‘Project Settings’ > ‘Configure the connection’

Set configuration name you wanted and sonarqube url to http://localhost:9000

Default ID/Password is admin/admin

5. Analyzed code in SonarLint tab

As our product migrating to Kotlin&Spring Cloud, I will blogging how we did it, how to solve problem when happened migrating to new environment. Stay tuned!

--

--

Responses (1)