Update build instructions in ReadMe to include gradle build step.

Also update links and overall readme structure.
This commit is contained in:
Ilya Gorbunov
2017-04-07 03:48:57 +03:00
parent f5647fb27f
commit 5aabcb6ea3
7 changed files with 96 additions and 79 deletions
+6 -5
View File
@@ -1,11 +1,12 @@
## Code Generation for Standard Library
Some of the code in the standard library is created by code generation based on templates.
For example, many Array methods need to be implemented separately for Array<T>, ByteArray, ShortArray, IntArray, etc.
For example, many `Array` methods need to be implemented separately for `Array<T>`, `ByteArray`, `ShortArray`, `IntArray`, etc.
To run the code generator from a kotlin checkout
To run the code generator from the `libraries` directory of a kotlin checkout, use the following command:
cd libraries/tools/kotlin-stdlib-gen
mvn compile exec:java
./gradlew :tools:kotlin-stdlib-gen:run
This then runs the [GenerateStandardLib.kt](https://github.com/JetBrains/kotlin/blob/master/libraries/tools/kotlin-stdlib-gen/src/generators/GenerateStandardLib.kt) script to create the source from the files for java.lang.Iterable<T> and java.util.Collection etc.
> Note: on Windows type `gradlew` without the leading `./`
This then runs the script which generates a significant part of stdlib sources from the [templates](https://github.com/JetBrains/kotlin/tree/master/libraries/tools/kotlin-stdlib-gen/src/templates) authored with a special kotlin based DSL.