This blog post describes how to start Kontribute or how to start contributing Kotlin.
Who am I?
I’ve been kontributors since July 2016. I made more than 60 commits by now. I love Kotlin, my beautiful wife and lovely son.
I talked about this topic a few times in different places. After speaking at DroidKaigi 2018 and Kotlin Night Kolkata, some people gave me feed back that it is also helpful for new Kontributors if I make a blog post in English. I am too lazy to write this from scratch, so I re-used some of contents from those presentation.
Prerequisite
This blog entry does not explain how to use git/github and how to write Kotlin.
Since I mainly contribute to Kotlin plguin features, this blog post focus on how to contribute kotlin plugin. However, once you undersntand how to do it, it is really easy to contribute to Kotlin Languages, Kotlin JS or Kotlin Native because it is in the same repository.
Outline
- Setup
- Communication
- 1st Recommended Ways to Kontribute
- Developing/Testing Kotlin plugin
Setup
It “was” the hardest part but not anymore. This is the reason I updated this topic as v3. There are “only” 4 parts of setups
JDK
The first one is JDK.
You need to install 3 differenct versions of JDKs.
In order to use those JDK, you must setup environment variables like this
It’s quite annoying to set each environment variables. Here is what I did.
1 2 3 4 |
|
Intellij IDEA & Plugins
As for Intellij IDEA, you can use both community and ultimate version.
To make sure you are using latest kotlin plugin, check the following gif.
Open project
After setup Intellij IDEA, you can open kotlin plugin. First time you open the project, Intellij downloads all dependencies using gradle. It took me about 50 mins. Just wait.
Module
After downloading dependencies, you will notice that there is no source code in Project view. To fix this problem, you will need to do the followings:
- Go to File | New | Module from Existing Sources | and then select
build.gradle.kts
file - After selecting the file,
Import Module from Gradle
dialog popup. Selectuse default gradle wrapper
The following gif visually describes the steps
Run
Setup is done. Let’s run it. To run it, select IDEA
run configuration and hit run button.
After waiting a few minites, the child IDEA shows up. What does this do is if you change your Kotlin project, the change is bundle to this child IDEA. You can test your new feature in this child IDEA.
If you cannot build or run the project, ask other kontributors! In next blog post, I will talk about how to intract with other Kontributors or JetBrains team.