Update build instructions in ReadMe to include gradle build step.
Also update links and overall readme structure.
This commit is contained in:
@@ -6,11 +6,13 @@ and ensure that the public binary API wasn't changed in a way that make this cha
|
||||
## How to run
|
||||
|
||||
Compile and run tests. `CasesPublicAPITest` verifies the tool itself,
|
||||
and `RuntimePublicAPITest` dumps the public API of `kotlin-runtime` and `kotlin-stdlib` jars,
|
||||
which must be built beforehand with maven.
|
||||
and `RuntimePublicAPITest` dumps the public API of `kotlin-stdlib`,
|
||||
`kotlin-stdlib-jre7/8` and `kotlin-reflect` jars,
|
||||
which must be built beforehand with gradle. Use `clean assemble` tasks,
|
||||
since the incremental compilation currently doesn't produce all the required output.
|
||||
|
||||
When substantial changes are made to the public API, it may be convenient to overwrite
|
||||
the entire dump and compare changes later before commiting: pass `-Doverwrite.output=true`
|
||||
the entire dump and compare changes later before committing: pass `-Doverwrite.output=true`
|
||||
property to the test to do so.
|
||||
|
||||
Also you can use shared run configuration "Binary compatibility tests", which also
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user