From e04873957e126d383dd632617827835eb1a0c130 Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Wed, 29 Jun 2016 16:24:57 +0300 Subject: [PATCH] Notes in README about required environment variables to build libraries maven project. --- ReadMe.md | 17 +++++++++++++++-- libraries/ReadMe.md | 16 +++++++++++++--- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/ReadMe.md b/ReadMe.md index 0fd6da48f71..656431c68f4 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -24,9 +24,22 @@ Welcome to [Kotlin](http://kotlinlang.org/)! Some handy links: * [Kotlin Eclipse Plugin](http://kotlinlang.org/docs/tutorials/getting-started-eclipse.html) * [Kotlin TextMate Bundle](https://github.com/vkostyukov/kotlin-sublime-package) +## Build environment requirements + +In order to build Kotlin distribution you need to have: + +- Apache Ant 1.8 and higher +- JDK 1.6, 1.7 and 1.8 +- Setup environment variables as following: + + JAVA_HOME="path to JDK 1.6" + JDK_16="path to JDK 1.6" + JDK_17="path to JDK 1.7" + JDK_18="path to JDK 1.8" + ## Building -To build this project, first time you try to build you need to run this (requires Apache **Ant 1.8** or higher and **JDK 1.6**): +To build this project, first time you try to build you need to run this: ant -f update_dependencies.xml @@ -46,7 +59,7 @@ which will build the binaries of the compiler and put them into the 'dist' direc mvn package -from 'libraries' directory after building the compiler. Refer to `libraries/ReadMe.md` for details. +from 'libraries' directory after building the compiler. Refer to [libraries/ReadMe.md](libraries/ReadMe.md) for details. ## Working with the project in IntelliJ IDEA diff --git a/libraries/ReadMe.md b/libraries/ReadMe.md index f2593a2bfd3..db6ac9030ff 100644 --- a/libraries/ReadMe.md +++ b/libraries/ReadMe.md @@ -2,13 +2,23 @@ This area of the project is all written in Kotlin and assumes you've got the [Kotlin IDEA plugin installed](http://confluence.jetbrains.net/display/Kotlin/Getting+Started). -This area of the project uses Maven for its build. To build install a recent [Maven](http://maven.apache.org/) distribution then type: +This area of the project uses Maven for its build. You need to install a recent [Maven](http://maven.apache.org/) distribution and +setup environment variables as following: + + JDK_16="path to JDK 1.6" + JDK_17="path to JDK 1.7" + JDK_18="path to JDK 1.8" + +The main part of kotlin runtime and all tools are compiled against JDK 1.6 and also there are two extensions +for the standard library which are compiled against JDK 1.7 and 1.8 respectively, so you need to have all these JDKs installed. + +Then you'll be able to build tools and libraries with: mvn install -For more details see the [Getting Started Guide](http://confluence.jetbrains.net/display/Kotlin/Getting+Started) +For more details see the [Getting Started Guide](http://confluence.jetbrains.net/display/Kotlin/Getting+Started). -Be sure to build Kotlin compiler before launching Maven: see ReadMe.md at root level, section "Building" +Be sure to build Kotlin compiler distribution before launching Maven: see ReadMe.md at root level, section "Building". If your maven build is failing with Out-Of-Memory errors, set JVM options for maven in MAVEN_OPTS environment variable like this: