• Stars
    star
    45,725
  • Rank 244 (Top 0.01 %)
  • Language
    Kotlin
  • Created about 12 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The Kotlin Programming Language.

official project TeamCity (simple build status) Maven Central GitHub license Revved up by Develocity

Kotlin Programming Language

Welcome to Kotlin!
It is an open-source, statically typed programming language supported and developed by JetBrains and open-source contributors.

Some handy links:

Kotlin Multiplatform capabilities

Support for multiplatform programming is one of Kotlinโ€™s key benefits. It reduces time spent writing and maintaining the same code for different platforms while retaining the flexibility and benefits of native programming.

Editing Kotlin

Build environment requirements

This repository is using Gradle toolchains feature to select and auto-provision required JDKs from AdoptOpenJdk project.

Unfortunately AdoptOpenJdk project does not provide required JDK 1.6 and 1.7 images, so you could either download them manually and provide path to installation via JDK_1_6 and JDK_1_7 environment variables or use following SDK managers:

Alternatively, it is still possible to only provide required JDKs via environment variables (see gradle.properties for supported variable names). To ensure Gradle uses only JDKs from environmental variables - disable Gradle toolchain auto-detection by passing -Porg.gradle.java.installations.auto-detect=false option (or put it into $GRADLE_USER_HOME/gradle.properties).

For local development, if you're not working on the standard library, it's OK to avoid installing JDK 1.6 and JDK 1.7. Add kotlin.build.isObsoleteJdkOverrideEnabled=true to the local.properties file, so build will only use JDK 1.8+. Note, that in this case, build will have Gradle remote build cache misses for some tasks.

Note: The JDK 6 for MacOS is not available on Oracle's site. You can install it by

$ brew tap homebrew/cask-versions
$ brew install --cask java6

On Windows you might need to add long paths setting to the repo:

git config core.longpaths true 

Building

The project is built with Gradle. Run Gradle to build the project and to run the tests using the following command on Unix/macOS:

./gradlew <tasks-and-options>

or the following command on Windows:

gradlew <tasks-and-options>

On the first project configuration gradle will download and setup the dependencies on

  • intellij-core is a part of command line compiler and contains only necessary APIs.
  • idea-full is a full blown IntelliJ IDEA Community Edition to be used in the plugin module.

These dependencies are quite large, so depending on the quality of your internet connection you might face timeouts getting them. In this case, you can increase timeout by specifying the following command line parameters on the first run:

./gradlew -Dhttp.socketTimeout=60000 -Dhttp.connectionTimeout=60000

Important gradle tasks

  • clean - clean build results
  • dist - assembles the compiler distribution into dist/kotlinc/ folder
  • install - build and install all public artifacts into local maven repository
  • coreLibsTest - build and run stdlib, reflect and kotlin-test tests
  • gradlePluginTest - build and run gradle plugin tests
  • compilerTest - build and run all compiler tests

To reproduce TeamCity build use -Pteamcity=true flag. Local builds don't run proguard and have jar compression disabled by default.

OPTIONAL: Some artifacts, mainly Maven plugin ones, are built separately with Maven. Refer to libraries/ReadMe.md for details.

To build Kotlin/Native, see kotlin-native/README.md.

Working with the project in IntelliJ IDEA

It is recommended to use the latest released version of Intellij IDEA (Community or Ultimate Edition). You can download IntelliJ IDEA here.

After cloning the project, import the project in IntelliJ by choosing the project directory in the Open project dialog.

For handy work with compiler tests it's recommended to use Kotlin Compiler Test Helper

Dependency verification

We have a dependencies verification feature enabled in the repository for all Gradle builds. Gradle will check hashes (md5 and sha256) of used dependencies and will fail builds with Dependency verification failed errors when local artifacts are absent or have different hashes listed in the verification-metadata.xml file.

It's expected that verification-metadata.xml should only be updated with the commits that modify the build. There are some tips how to perform such updates:

  • Delete components section of verification-metadata.xml to avoid stockpiling of old unused dependencies. You may use the following command:
#macOS
sed -i '' -e '/<components>/,/<\/components>/d' gradle/verification-metadata.xml
#Linux & Git for Windows
sed -i -e '/<components>/,/<\/components>/d' gradle/verification-metadata.xml
  • Re-generate dependencies with Gradle's --write-verification-metadata command (verify update relates to your changes)
./gradlew -i --write-verification-metadata sha256,md5 -Pkotlin.native.enabled=true resolveDependencies

resolveDependencies task resolves dependencies for all platforms including dependencies downloaded by plugins.

Keep in mind:

  • If youโ€™re adding a dependency with OS mentioned in an artifact name (darwin, mac, osx, linux, windows), remember to add them to implicitDependencies configuration or update resolveDependencies task if needed. resolveDependencies should resolve all dependencies including dependencies for different platforms.
  • If you have a local.properties file in your Kotlin project folder, make sure that it doesn't contain kotlin.native.enabled=false. Otherwise, native-only dependencies may not be added to the verification metadata. This is because local.properties has higher precedence than the -Pkotlin.native.enabled=true specified in the Gradle command.

Using -dev versions

We publish -dev versions frequently.

For -dev versions you can use the list of available versions and include this maven repository:

maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/bootstrap")

License

Kotlin is distributed under the terms of the Apache License (Version 2.0). See license folder for details.

Contributing

Please be sure to review Kotlin's contributing guidelines to learn how to help the project.

More Repositories

1

intellij-community

IntelliJ IDEA Community Edition & IntelliJ Platform
16,452
star
2

compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
Kotlin
14,518
star
3

JetBrainsMono

JetBrains Mono โ€“ the free and open-source typeface for developers
Shell
10,126
star
4

ideavim

IdeaVim โ€“ A Vim engine for JetBrains IDEs
Kotlin
7,980
star
5

Exposed

Kotlin SQL Framework
Kotlin
7,824
star
6

kotlin-native

Kotlin/Native infrastructure
Kotlin
7,048
star
7

ring-ui

A collection of JetBrains Web UI components
TypeScript
3,549
star
8

kotlinconf-app

KotlinConf Schedule Application
Kotlin
2,822
star
9

intellij-platform-plugin-template

Template repository for creating plugins for IntelliJ Platform
Kotlin
2,736
star
10

skija

Java bindings for Skia
Java
2,605
star
11

create-react-kotlin-app

Create React apps using Kotlin with no build configuration
JavaScript
2,477
star
12

projector-docker

Run JetBrains IDEs remotely with Docker
Shell
2,209
star
13

intellij-plugins

Open-source plugins included in the distribution of IntelliJ IDEA Ultimate and other IDEs based on the IntelliJ Platform
Java
2,002
star
14

svg-sprite-loader

Webpack loader for creating SVG sprites.
JavaScript
1,998
star
15

skiko

Kotlin MPP bindings to Skia
Kotlin
1,669
star
16

compose-multiplatform-ios-android-template

Compose Multiplatform iOS+Android Application project template
Kotlin
1,563
star
17

MPS

JetBrains Meta programming System
JetBrains MPS
1,500
star
18

lets-plot

Multiplatform plotting library based on the Grammar of Graphics
Kotlin
1,434
star
19

kotlin-web-site

The Kotlin programming language website
JavaScript
1,406
star
20

gradle-intellij-plugin

Gradle plugin for building plugins for IntelliJ-based IDEs
Kotlin
1,365
star
21

phpstorm-stubs

PHP runtime & extensions header files for PhpStorm
PHP
1,295
star
22

kotlin-wrappers

Kotlin wrappers for popular JavaScript libraries
Kotlin
1,287
star
23

idea-gitignore

.ignore support plugin for IntelliJ IDEA
Kotlin
1,281
star
24

projector-server

Server-side library for running Swing applications remotely
Kotlin
1,224
star
25

resharper-unity

Unity support for both ReSharper and Rider
C#
1,195
star
26

intellij-sdk-docs

IntelliJ SDK Platform Documentation
Markdown
1,175
star
27

xodus

Transactional schema-less embedded database used by JetBrains YouTrack and JetBrains Hub.
Java
1,155
star
28

intellij-scala

Scala plugin for IntelliJ IDEA
Scala
1,137
star
29

kotless

Kotlin Serverless Framework
Kotlin
1,124
star
30

JetBrainsRuntime

Runtime environment based on OpenJDK for running IntelliJ Platform-based products on Windows, macOS, and Linux
Java
1,095
star
31

intellij-sdk-code-samples

Mirror of the IntelliJ SDK Docs Code Samples
Java
980
star
32

js-graphql-intellij-plugin

GraphQL language support for WebStorm, IntelliJ IDEA and other IDEs based on the IntelliJ Platform.
Java
875
star
33

android

Android Plugin for IntelliJ IDEA. This repository is a subset of https://git.jetbrains.org/?p=idea/android.git cut according to GitHub file size limitations.
Kotlin
863
star
34

projector-client

Common and client-related code for running Swing applications remotely
Kotlin
813
star
35

projector-installer

Install, configure and run JetBrains IDEs with Projector Server on Linux or in WSL
Python
809
star
36

Grammar-Kit

Grammar files support & parser/PSI generation for IntelliJ IDEA
Java
677
star
37

Arend

The Arend Proof Assistant
Java
676
star
38

jediterm

Pure Java Terminal Emulator. Works with SSH and PTY.
Java
611
star
39

compose-multiplatform-template

Compose Multiplatform Application project template
Kotlin
603
star
40

markdown

Markdown parser written in kotlin
Kotlin
590
star
41

amper

Amper - a build and project configuration tool with a focus on the user experience and the IDE support
Kotlin
588
star
42

jewel

An implementation of the IntelliJ look and feels in Compose for Desktop
Kotlin
556
star
43

Nitra

Public Nitra repository
Nemerle
549
star
44

lincheck

Framework for testing concurrent data structures
Kotlin
518
star
45

intellij-micropython

Plugin for MicroPython devices in PyCharm and IntelliJ
Python
475
star
46

kotlin-playground

Self-contained component to embed in websites for running Kotlin code
JavaScript
422
star
47

colorSchemeTool

Python
396
star
48

lets-plot-kotlin

Grammar of Graphics for Kotlin
Kotlin
389
star
49

Qodana

๐Ÿ“ Source repository of Qodana Help
389
star
50

rd

Reactive Distributed communication framework for .NET, Kotlin, C++. Inspired by Rider IDE.
C#
370
star
51

java-annotations

Annotations for JVM-based languages.
Java
362
star
52

compose-multiplatform-desktop-template

Compose Multiplatform Desktop Application project template
Kotlin
360
star
53

phpstorm-attributes

PhpStorm specific attributes
PHP
357
star
54

Unity3dRider

Unity JetBrains Rider integration
348
star
55

pty4j

Pty for Java
Java
335
star
56

resharper-fsharp

F# support in JetBrains Rider
F#
319
star
57

godot-support

C#
315
star
58

phpstorm-workshop

Code for the PhpStorm workshop
PHP
287
star
59

awesome-pycharm

A curated list of resources for learning and using PyCharm, a Python IDE from JetBrains
271
star
60

web-types

JSON standard for documenting web component libraries for IDEs, documentation generators and other tools
TypeScript
270
star
61

meta-runner-power-pack

A set of Meta-runners for TeamCity
PowerShell
256
star
62

inspection-plugin

Gradle plugin to launch IDEA inspections
Kotlin
255
star
63

youtrack-mobile

A iOS and Android client for YouTrack
TypeScript
254
star
64

gradle-changelog-plugin

Plugin for parsing and managing the Changelog in a "keep a changelog" style.
Kotlin
252
star
65

ideolog

Interactive viewer for '.log' files.
Kotlin
248
star
66

qodana-action

โš™๏ธ Scan your Go, Java, Kotlin, PHP, Python, JavaScript, TypeScript, .NET projects at GitHub with Qodana. This repository contains Qodana for Azure, GitHub, CircleCI and Gradle
JavaScript
234
star
67

gradle-idea-ext-plugin

Plugin to store IJ settings in gradle script
Groovy
226
star
68

php-timeline

Notable events of PHP history
223
star
69

resharper-rider-samples

Simple interactive exercises to help learn ReSharper and Rider
C#
221
star
70

la-clojure

Clojure plugin for IntelliJ IDEA
Java
220
star
71

kotlin-compiler-server

Server for executing kotlin code
Kotlin
211
star
72

jdk8u_jdk

Java
209
star
73

jcef

A simple framework for embedding Chromium-based browsers into Java-based applications.
Java
206
star
74

pest-intellij

The official Pest Plugin for PhpStorm / IntelliJ IDEA
Kotlin
195
star
75

youtrack-workflows

YouTrack Custom Workflow Repository
JavaScript
194
star
76

compose-for-web-demos

Historical repository of early Compose for Web effort.
176
star
77

psiviewer

PSI Viewer for IntelliJ IDEA plugin development
Java
175
star
78

svg-mixer

Node.js toolset for generating & transforming SVG images and sprites in modern way
JavaScript
173
star
79

phpstorm-docker-images

Pre-configured Docker images used by PhpStorm team
Dockerfile
170
star
80

jetbrains_guide

JetBrains Guides where Developer Advocacy and the community share ideas.
CSS
168
star
81

kotlin-web-demo

Online mini-IDE for Kotlin
Kotlin
168
star
82

rider-efcore

Entity Framework Core UI plugin for JetBrains Rider
Kotlin
167
star
83

intellij-samples

Code that demonstrates various IntelliJ IDEA features
Java
164
star
84

intellij-plugin-verifier

Compatibility verification tool for IntelliJ Platform plugins
Kotlin
163
star
85

jdk8u_hotspot

C++
159
star
86

resharper-rider-plugin

https://www.jetbrains.com/help/resharper/sdk/
PowerShell
156
star
87

qodana-cli

๐Ÿ”ง JetBrains Qodanaโ€™s official command line tool
Go
154
star
88

teamcity-messages

Python Unit Test Reporting to TeamCity
Python
139
star
89

ruby-type-inference

Dynamic definitions and types provider for ruby static analysis
Kotlin
136
star
90

resharper-angularjs

ReSharper plugin for AngularJS support
JavaScript
134
star
91

golandtipsandtricks

This is an ever evolving repository for GoLand Tips&Tricks
Go
132
star
92

python-skeletons

The python-skeltons repo is deprecated: use PEP 484 and Typeshed instead
Python
132
star
93

educational-plugin

Educational plugin to learn and teach programming languages such as Kotlin, Java, Python, JavaScript, and others right inside of JetBrains IntelliJ Platform based IDEs.
Kotlin
131
star
94

phpstorm-phpstan-plugin

PHPStan plugin for PhpStorm
Java
131
star
95

clion-wsl

Shell
130
star
96

clion-remote

129
star
97

teamcity-docker-samples

TeamCity docker compose samples
Shell
128
star
98

phpstorm-psalm-plugin

Psalm plugin for PhpStorm
Java
126
star
99

jdk8u

Shell
123
star
100

YouTrackSharp

.NET Standard 2.0 Library to access YouTrack API.
C#
123
star