You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ReadMe.md
+13-67Lines changed: 13 additions & 67 deletions
Original file line number
Diff line number
Diff line change
@@ -38,6 +38,8 @@ In order to build Kotlin distribution you need to have:
38
38
JDK_17="path to JDK 1.7"
39
39
JDK_18="path to JDK 1.8"
40
40
41
+
For local development, if you're not working on bytecode generation or the standard library, it's OK to have only JDK 8 installed, and to point all of the environment variables mentioned above to your JDK 8 installation.
42
+
41
43
> Note: The JDK 6 for MacOS is not available on Oracle's site. You can [download it here](https://support.apple.com/kb/DL1572).
42
44
43
45
## Building
@@ -51,15 +53,15 @@ which will setup the dependencies on
51
53
*`intellij-core` is a part of command line compiler and contains only necessary APIs.
52
54
*`idea-full` is a full blown IntelliJ IDEA Community Edition to be used in the plugin module.
53
55
54
-
Then, you may run gradle to build the project and run tests, using:
56
+
Then, you may run Gradle to build the project and run tests, using:
55
57
56
58
./gradlew <tasks-and-options>
57
59
58
-
command on unix/macOS, or
60
+
command on Unix/macOS, or
59
61
60
-
gradlew.bat <tasks-and-options>
62
+
gradlew <tasks-and-options>
61
63
62
-
on windows.
64
+
on Windows.
63
65
64
66
## Important gradle tasks
65
67
@@ -73,54 +75,34 @@ on windows.
73
75
-`compilerTest` - build and run all compiler tests
74
76
-`ideaPluginTest` - build and run all IDEA plugin tests
75
77
76
-
**OPTIONAL:** Some artifacts, mainly maven plugin ones, are built separately by maven: go into `libraries` directory after building the compiler and run:
78
+
**OPTIONAL:** Some artifacts, mainly Maven plugin ones, are built separately by Maven: go into `libraries` directory after building the compiler and run:
77
79
78
80
mvn install
79
81
80
82
Refer to [libraries/ReadMe.md](libraries/ReadMe.md) for details.
81
83
82
84
## Working with the project in IntelliJ IDEA
83
85
84
-
The [root kotlin project](https://github.com/JetBrains/kotlin) should be imported into IDEA as gradle project.
86
+
Working with the Kotlin project requires IntelliJ IDEA 2017.3. You can download an Early Access Preview version of IntelliJ IDEA 2017.3 [here](https://www.jetbrains.com/idea/nextversion/).
87
+
88
+
The [root Kotlin project](https://github.com/JetBrains/kotlin) should be imported into IDEA as gradle project.
85
89
86
90
To import the project in Intellij choose project directory in Open project dialog. Then, after project opened, Select
87
91
`File` -> `New...` -> `Module from Existing Sources` in the menu, and select `build.gradle.kts` file in the project's root folder.
88
92
89
93
In the import dialog, select `use default gradle wrapper`.
90
94
91
-
To be able to run tests from Intellij easily, check `Delegate IDE build/run actions to Gradle` in the gradle runner settings.
92
-
93
-
### <aname="installing-plugin"></a> Installing the latest Kotlin plugin
94
-
95
-
Since Kotlin project contains code written in Kotlin itself, you will also need a Kotlin plugin to build the project in IntelliJ IDEA.
96
-
97
-
You probably want to have locally the same version of plugin that build server is using for building.
98
-
As this version is constantly moving, the best way to always be updated is to let IntelliJ IDEA notify you when it is time to renew your plugin.
99
-
100
-
To keep the plugin version in sync with the rest of the team and our [Continuous Integration server](https://teamcity.jetbrains.com/project.html?projectId=Kotlin&tab=projectOverview)
101
-
you should setup IDEA to update the plugin directly from the build server.
102
-
103
-
Open:
95
+
To be able to run tests from IntelliJ easily, check `Delegate IDE build/run actions to Gradle` in the Gradle runner settings.
Then update the list of plugins in "Browse Repositories", you'll see two versions of Kotlin there, install the one with the higher version number.
112
-
113
-
If you want to keep an IntelliJ IDEA installation with that bleeding edge Kotlin plugin for working Kotlin project sources only separate to your default IntelliJ IDEA installation with the stable Kotlin
114
-
plugin [see this document](https://intellij-support.jetbrains.com/hc/en-us/articles/207240985-Changing-IDE-default-directories-used-for-config-plugins-and-caches-storage), which describes how to have multiple IntelliJ IDEA installations using different configurations and plugin directories.
97
+
At this time, you can use the latest released 1.1.x version of the Kotlin plugin for working with the code. To make sure you have the latest version installed, use Tools | Kotlin | Configure Kotlin Plugin Updates and press "Check for updates now".
115
98
116
99
### Compiling and running
117
100
118
101
From this root project there are Run/Debug Configurations for running IDEA or the Compiler Tests for example; so if you want to try out the latest and greatest IDEA plugin
119
102
120
103
* VCS -> Git -> Pull
121
-
* Run IntelliJ IDEA
104
+
* Run the "IDEA" run configuration in the project
122
105
* a child IntelliJ IDEA with the Kotlin plugin will then startup
123
-
* you can now open the [kotlin libraries project](https://github.com/JetBrains/kotlin/tree/master/libraries) to then work with the various kotlin libraries etc.
124
106
125
107
# Contributing
126
108
@@ -143,36 +125,6 @@ macro to include code from a test function. The benefits of this approach are tw
143
125
144
126
Also the [JavaScript translation](https://github.com/JetBrains/kotlin/blob/master/js/ReadMe.md) could really use your help. See the [JavaScript contribution section](https://github.com/JetBrains/kotlin/blob/master/js/ReadMe.md) for more details.
145
127
146
-
147
-
## If you want to work on the compiler
148
-
149
-
The Kotlin compiler is written in Java and Kotlin (we gradually migrate more and more of it to pure Kotlin). So the easiest way to work on the compiler or IntelliJ IDEA plugin is
150
-
151
-
* download a recent [IntelliJ IDEA](https://www.jetbrains.com/idea/?fromMenu#chooseYourEdition), Community edition is enough
152
-
*[install the Kotlin plugin](#installing-plugin)
153
-
* open the [root kotlin project](https://github.com/JetBrains/kotlin) in IDEA (opening the kotlin directory)
154
-
155
-
You can now run the various Run/Debug Configurations such as
156
-
157
-
* IDEA
158
-
* All Compiler Tests
159
-
* All IDEA Plugin Tests
160
-
161
-
162
-
## If you want to work on the Kotlin libraries
163
-
164
-
* download a recent [IntelliJ IDEA](https://www.jetbrains.com/idea/?fromMenu#chooseYourEdition), Community edition is enough
165
-
*[install the Kotlin plugin](#installing-plugin)
166
-
* open the [kotlin libraries project](https://github.com/JetBrains/kotlin/tree/master/libraries)
167
-
168
-
Then build via
169
-
170
-
cd libraries
171
-
./gradlew build install
172
-
mvn install
173
-
174
-
> Note: on Windows type `gradlew` without the leading `./`
175
-
176
128
Some of the code in the standard library is created by generating code from templates. See the [README](libraries/stdlib/ReadMe.md) in the stdlib section for how run the code generator. The existing templates can be used as examples for creating new ones.
This will avoid your local repo having too many merge commits
189
141
which will help keep your pull request simple and easy to apply.
190
-
191
-
## Commit comments
192
-
193
-
If you include in your comment this text (where KT-1234 is the Issue ID in the [Issue Tracker](https://youtrack.jetbrains.com/issues/KT)), the issue will get automatically marked as fixed.
0 commit comments