Skip to content

Commit ce18c2b

Browse files
committed
Fix readme - only basic corrections
1 parent d9e0486 commit ce18c2b

File tree

1 file changed

+25
-15
lines changed

1 file changed

+25
-15
lines changed

ReadMe.md

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -51,34 +51,44 @@ which will setup the dependencies on
5151
* `intellij-core` is a part of command line compiler and contains only necessary APIs.
5252
* `idea-full` is a full blown IntelliJ IDEA Community Edition to be used in the plugin module.
5353

54-
Then, you need to run
54+
Then, you may run gradle to build the project and run tests, using:
5555

56-
ant -f build.xml
56+
./gradlew <tasks-and-options>
57+
58+
command on unix/macOS, or
5759

58-
which will build the binaries of the compiler and put them into the `dist` directory. You may need to increase the **heap size** for Ant using
59-
[ANT_OPTS](https://web.liferay.com/community/wiki/-/wiki/Main/Ant+opts).
60+
gradlew.bat <tasks-and-options>
61+
62+
on windows.
6063

61-
**OPTIONAL:** Maven artifact distribution is built separately, go into `libraries` directory after building the compiler and run:
64+
## Important gradle tasks
6265

63-
./gradlew build install
64-
mvn install
66+
- `clean` - clean build results
67+
- `dist` - assembles the compiler distribution into `dist/kotlinc/` folder
68+
- `ideaPlugin` - assembles the Kotlin IDEA plugin distribution into `dist/artifacts/Kotlin` folder
69+
- `install` - build and install all public artifacts into local maven repository
70+
- `runIde` - build IDEA plugin and run IDEA with it
71+
- `coreLibsTest` - build and run stdlib, reflect and kotlin-test tests
72+
- `gradlePluginsTest` - build and run gradle plugin tests
73+
- `compilerTest` - build and run all compiler tests
74+
- `ideaPluginTest` - build and run all IDEA plugin tests
6575

66-
> Note: on Windows type `gradlew` without the leading `./`
76+
**OPTIONAL:** Some artifacts, mainly maven plugin ones, are built separately by maven: go into `libraries` directory after building the compiler and run:
77+
78+
mvn install
6779

6880
Refer to [libraries/ReadMe.md](libraries/ReadMe.md) for details.
6981

7082
## Working with the project in IntelliJ IDEA
7183

72-
The [root kotlin project](https://github.com/JetBrains/kotlin) already has an IntelliJ IDEA project, you can just open it in IntelliJ IDEA.
84+
The [root kotlin project](https://github.com/JetBrains/kotlin) should be imported into IDEA as gradle project.
7385

74-
You may need to set the Project SDK (`File -> Project Structure -> Project`).
75-
You may also need to add `tools.jar` to your SDK:
76-
77-
File -> Project Structure -> SDKs -> <Your JDK> -> Classpath
86+
To import the project in Intellij choose project directory in Open project dialog. Then, after project opened, Select
87+
`File` -> `New...` -> `Module from Existing Sources` in the menu, and select `build.gradle.kts` file in the project's root folder.
7888

79-
then choose the `tools.jar` in the JDK's `lib` directory.
89+
In the import dialog, select `use default gradle wrapper`.
8090

81-
If you are not dealing with Android, you may need to disable the Android Plugin in order to compile the project.
91+
To be able to run tests from Intellij easily, check `Delegate IDE build/run actions to Gradle` in the gradle runner settings.
8292

8393
### <a name="installing-plugin"></a> Installing the latest Kotlin plugin
8494

0 commit comments

Comments
 (0)