*2c61572c50- (HEAD -> master, tag: build-1.3.60-dev-346, origin/master, origin/HEAD) Build: Fix artifact pattern for Android Studio bintray repo (3 дня назад) <Vyacheslav Gerasimov> *10f5204f67- (tag: build-1.3.60-dev-344) as36: Fix groovy-all dependency version (3 дня назад) <Vyacheslav Gerasimov> *aed9b13455- (tag: build-1.3.60-dev-338) Fix jvm-host-embeddable artefact generation (3 дня назад) <Ilya Chernikov> *333c7ff688- Filter out local classes on JSR-223 properties mapping (3 дня назад) <Ilya Chernikov> *2ae19e1d42- (tag: build-1.3.60-dev-330) Run :kotlin-gradle-plugin:validateTaskProperties on every install (3 дня назад) <Alexey Tsvetkov> *aff66b6a29- (tag: build-1.3.60-dev-327) Make KotlinJpsBuildTestBase abstract (3 дня назад) <Alexey Tsvetkov> *ce9ed26918- [DEBUGGER] Improve computation of source position for breakpoint in KotlinLineBreakpointType more precise. (3 дня назад) <Roman Artemev> *2e0ec3b490- (tag: build-1.3.60-dev-319) AbstractFindUsagesTest: add read lock (3 дня назад) <Dmitry Gridin> *dbb9b3b6fd- AbstractFindUsagesTest: cleanup code (3 дня назад) <Dmitry Gridin> *58f294a757- (tag: build-1.3.60-dev-317) Fix kotlin compiler tests in 192 (KT-32193) (3 дня назад) <Nikolay Krasko> *3729c4e770- (tag: build-1.3.60-dev-315) JVM: simplify choice of wrapped receiver descriptors (3 дня назад) <Georgy Bronnikov> *a10e57eaec- (tag: build-1.3.60-dev-314) JavaOutsideModuleDetector: should refresh notification after move #KT-32967 Fixed (3 дня назад) <Dmitry Gridin> *4c8d0acb5d- CreateExpectFix: shouldn't suggest create expect property with `lateinit` or `const` modifier #KT-32705 Fixed (3 дня назад) <Dmitry Gridin> *a858607fac- (tag: build-1.3.60-dev-313) Fix script classpath utility functions that use classpath filtering by "keys" (3 дня назад) <Ilya Chernikov> *ec3ccf1ba8- Properly handle REPL snippets with exceptions ... (3 дня назад) <Ilya Chernikov> *288fdc0952- Add a handler for providing evaluation context for scripts (3 дня назад) <Ilya Chernikov> *2a5c4a2409- Move caching to after all configuration refinements and ... (3 дня назад) <Ilya Chernikov> *e41bbe9328- Introducing transient properties in scripting API (3 дня назад) <Ilya Chernikov> *5fe843d754- Refactor main-kts build scripts - fix red code in IDEA (3 дня назад) <Ilya Chernikov> *42dde50b6b- Implement base zip cache with tests... (3 дня назад) <Ilya Chernikov> *c7eb9e9520- Move caching tests into a dedicated class (3 дня назад) <Ilya Chernikov> *ef23033936- Add net.jpountz and one.util.streamex to the list of shadowed packages (3 дня назад) <Ilya Chernikov> *cefd4a35c5- Fix and test evaluation of scripts with default configurations (3 дня назад) <Ilya Chernikov> *961607673d- [minor] Refactor properties collection builder: (3 дня назад) <Ilya Chernikov> *0af52f2fa6- Implement composable refinement handlers... (3 дня назад) <Ilya Chernikov> *65e6d3b0ff- [minor] Add a small diagnostics handling utility fun (3 дня назад) <Ilya Chernikov> *0072f8c265- Improve JSR-223 engine diagnostics (3 дня назад) <Ilya Chernikov> *b68ab0d968- Add test on repl with implicit receiver (3 дня назад) <Ilya Chernikov> *a13d452cd8- Implement JSR223 host in the main-kts jar (3 дня назад) <Ilya Chernikov> *0108a76e99- Extract arguments calculation for base JSR223 engine into an argument (3 дня назад) <Ilya Chernikov> *e8fa139dc8- Move direct properties configuration code into public functions in scripting host jar (3 дня назад) <Ilya Chernikov> *89a53fe028- (tag: build-1.3.60-dev-312) Safe get of registry key in KotlinAndroidGradleMPPModuleDataService (3 дня назад) <Andrey Uskov> *5f2aca5856- Fix NewMultiplatformProjectImportingTest in bunch 183 (3 дня назад) <Andrey Uskov> *e25b315319- (tag: build-1.3.60-dev-310) Introduce `-Xpolymorphic-signature` compiler flag as more priority than `-XXLanguage:+PolymorphicSignature` (3 дня назад) <Victor Petukhov> *944ee8fcd5- Introduce `-Xinline-classes` compiler flag as more priority than `-XXLanguage:+InlineClasses` (3 дня назад) <Victor Petukhov> *45644c224e- (tag: build-1.3.60-dev-308) JPS: Add temporary non caching jps storage for 192 (3 дня назад) <Mikhail Mazurkevich> *584d441587- (tag: build-1.3.60-dev-306) Fix import when android gradle plugin is involved in IDEA 183 (4 дня назад) <Andrey Uskov> *91365d9fad- Fix import library dependencies when transitive MPP are involved (4 дня назад) <Andrey Uskov> *0b8ad5c6c0- Fixed setting production-on-test flag if project was not build (4 дня назад) <Andrey Uskov> *17dec7b389- Add transitive test dependencies on MPP with jvmWithJava on import (4 дня назад) <Andrey Uskov> *86a26f0cca- Add jvmWithJava IDE import test (4 дня назад) <Andrey Uskov> *6c0469cee0- Fix importing transitive dependencies on MPP project (4 дня назад) <Andrey Uskov> *8592396a9a- Fix combobox size in facet settings tab (KT-32784) (4 дня назад) <Andrey Uskov> *9ce9b5945e- Fix order of platforms in Facets (KT-32783) (4 дня назад) <Andrey Uskov> *b8400a16f0- (tag: build-1.3.60-dev-304) Fix webpack dsl with closure (4 дня назад) <ilgonmic> *deb6b7105a- Remove duplicated source-map-loader configuring and cleanup kotlin webpack config writer (4 дня назад) <ilgonmic> *3b78ef9cb2- (tag: build-1.3.60-dev-296) as36: Add bunches for AS 3.6 C6 based on 192 platform (4 дня назад) <Vyacheslav Gerasimov> *5c6dedc623- Build: Add repo for prerelease Android Studio (4 дня назад) <Vyacheslav Gerasimov> *ccff347ffc- (tag: build-1.3.60-dev-294) Kapt: Attach generated Kotlin sources in 'compilation' mode (KT-32535) (4 дня назад) <Yan Zhulanow> *1c63d3aa2f- KT-32210: Handle long compiler plugin options (4 дня назад) <Ivan Gavrilovic> *4b9a852745- (tag: build-1.3.60-dev-293) Sort source to output mapping before writing to caches (4 дня назад) <Alexey Tsvetkov> *afa10cc125- Rewrite test of relocatable JPS IC caches (4 дня назад) <Alexey Tsvetkov> *98aad3e00c- Extract EnableICFixture (4 дня назад) <Alexey Tsvetkov> *a4c62d156f- Make lookup storage addAll order independent (4 дня назад) <Alexey Tsvetkov> *57caca4b0e- Improve exception message for directories comparison in tests (4 дня назад) <Alexey Tsvetkov> *6914a9dd3d- (tag: build-1.3.60-dev-289) KotlinFindUsagesHandler: fix read access (flaky tests) (4 дня назад) <Dmitry Gridin> *66fdc148be- (tag: build-1.3.60-dev-278) Revert strong references for compiler only (4 дня назад) <Alexander Podkhalyuzin> *f3112f752d- Inherit max metaspace size of client VM for Kotlin compile daemon (4 дня назад) <Alexey Tsvetkov> *5c99243c10- (tag: build-1.3.60-dev-277) Substitute kotlin-reflect with kotlin-reflect-api in compile classpath (4 дня назад) <Alexey Tsvetkov> *33b7745b17- Find only non-default shadow jars in findShadowJarsInClasspath diagnostic (4 дня назад) <Alexey Tsvetkov> *e91eefe709- Remove unnecessary dependencies on kotlin-compiler-runner (4 дня назад) <Alexey Tsvetkov> *cd641c9047- Set source and target compatibility in buildSrc (4 дня назад) <Alexey Tsvetkov> *a7403b7ee7- Do not fork java compile tasks when current JDK can be used (4 дня назад) <Alexey Tsvetkov> *a372f181d2- Check JDK env vars once during configuration when not syncing (4 дня назад) <Alexey Tsvetkov> *a20627fa2c- Set sourceCompatibility and targetCompatibility for JavaCompile tasks (4 дня назад) <Alexey Tsvetkov> *a35d405892- (tag: build-1.3.60-dev-271) Do not generate accessor if private function is accessed from (4 дня назад) <Ilmir Usmanov> *b3e80e6a14- (tag: build-1.3.60-dev-269) Look for classfile in implementing modules when building inline function (4 дня назад) <Ilmir Usmanov> *58db64a478- (tag: build-1.3.60-dev-267) J2K: Fix old J2K test data's error messages which has changed due to new inference (4 дня назад) <Ilya Kirillov> *4e5e14046d- New J2K: use old J2K for evaluate expression instead of new one (4 дня назад) <Ilya Kirillov> *e795e4b73d- New J2K: add conversion of binary literals & fix conversion of octal ones (4 дня назад) <Ilya Kirillov> *72a09ab59b- New J2K: correctly convert number literals with underscores (4 дня назад) <Ilya Kirillov> *4ead820395- New J2K: correctly print comments for qualified expression (4 дня назад) <Ilya Kirillov> *2bd5a1f196- New J2K: separate nullability inference from common one & nullability bug fixes (4 дня назад) <Ilya Kirillov> *d7960caf89- New J2K: move all symbols definitions to `symbols` package (4 дня назад) <Ilya Kirillov> *f79b282c60- New J2K: add better support of implicit functional interfaces (4 дня назад) <Ilya Kirillov> *96ca4712a0- New J2K: consider in-context declarations while performing conversion on copy-paste plain text conversion (4 дня назад) <Ilya Kirillov> *c865d74965- New J2K: remove unused dependencies from nj2k modules (4 дня назад) <Ilya Kirillov> *1bbdd0bf15- New J2K: remove unused classes (4 дня назад) <Ilya Kirillov> *6e04b1549c- New J2K: remove JKVisitor with type parameters (4 дня назад) <Ilya Kirillov> *9c8905ccb6- (tag: build-1.3.60-dev-265) Patch serializable class with addtional annotation (4 дня назад) <Leonid Startsev> *3896992b12- Fixes for IR serialization plugin (4 дня назад) <Leonid Startsev> *6494227c64- Change order in SerializableProperties initialization logic (4 дня назад) <Leonid Startsev> *822b4556e3- Rewrite IDE check whether serialization plugin is enabled (4 дня назад) <Leonid Startsev> *2381aa330a- (tag: build-1.3.60-dev-261) FIR: fix delegate expression consistency tests (4 дня назад) <Mikhail Glukhikh> *d32e5065c5- FIR: implementation of delegateProvider in delegate resolve (4 дня назад) <Mikhail Glukhikh> *213f951da3- FIR: partial implementation of delegate resolve #KT-32217 Fixed (4 дня назад) <Mikhail Glukhikh> *63b7fa70f9- FIR2IR: add extension receiver parameters to functions (4 дня назад) <Mikhail Glukhikh> *be3fe9495c- (tag: build-1.3.60-dev-255) Report non-incremental annotation processors correctly (5 дней назад) <Ivan Gavrilovic> *ad352355de- KT-23880: Enable incremental APT mode with KAPT by default (5 дней назад) <Ivan Gavrilovic> *a108af76d6- Mark property as output instead of local state when needed (5 дней назад) <Ivan Gavrilovic> *5a2ff86691- Handle classpath snapshot changes better (5 дней назад) <Ivan Gavrilovic> *f66b475867- (tag: build-1.3.60-dev-253) Create wrapped receiver descriptors where needed (5 дней назад) <Georgy Bronnikov> *46b98a1e98- (tag: build-1.3.60-dev-247) [JS BE] Make sourceMap generation more precise (5 дней назад) <Roman Artemev> *12a1b0296b- (tag: build-1.3.60-dev-244) Clean up useless code (5 дней назад) <Kirill Shmakov> *d3bc2ec855- (tag: build-1.3.60-dev-239) Remove internal jdk to fix flaky MavenUpdateConfigurationQuickFixTest (5 дней назад) <Nikolay Krasko> *6176373713- Test data update for JavaWithGroovyInvoke since 183 (5 дней назад) <Nikolay Krasko> *5f9660cd33- (tag: build-1.3.60-dev-229, tag: build-1.3.60-dev-227, tag: build-1.3.60-dev-224) `KtLightParameter` introduced as interface (5 дней назад) <Nicolay Mitropolsky> *50158e508a- `org.jetbrains.kotlin.asJava.elements.LightParameter` converted to Kotlin (5 дней назад) <Nicolay Mitropolsky> *7dcd3849e0- `org.jetbrains.kotlin.asJava.elements.LightParameter` converted to Kotlin: Rename .java to .kt (5 дней назад) <Nicolay Mitropolsky> *8982a49dcb- renaming `KtLightParameter` to `KtLightParameterImpl` (5 дней назад) <Nicolay Mitropolsky> *4a20a440a7- (tag: build-1.3.60-dev-222, tag: build-1.3.60-dev-221) Cleanup: remove redundant semicolon (5 дней назад) <Anton Yalyshev> *6d53151256- Add statistics (FUS) collector for IDE Settings. At the moment - New Inference only. (5 дней назад) <Anton Yalyshev> *56b6b957d1- (tag: build-1.3.60-dev-210) Generate line numbers for RHS of elvis expression if both LHS and RHS (6 дней назад) <Ilmir Usmanov> *1f36f60f43- (tag: build-1.3.60-dev-209) JVM IR: remove CrIrType, use class container in callable reference lowerings (6 дней назад) <Alexander Udalov>
Kotlin/Native
Kotlin/Native is an LLVM backend for the Kotlin compiler, runtime implementation, and native code generation facility using the LLVM toolchain.
Kotlin/Native is primarily designed to allow compilation for platforms where virtual machines are not desirable or possible (such as iOS or embedded targets), or where a developer is willing to produce a reasonably-sized self-contained program without the need to ship an additional execution runtime.
Prerequisites:
- install JDK for your platform, instead of JRE. The build requires
tools.jar, which is not included in JRE; - on macOS install Xcode 10.2
- on Fedora 26+
yum install ncurses-compat-libsmay be needed - on recent Ubuntu
apt install libncurses5is needed
To compile from sources use following steps:
First, download dependencies:
./gradlew dependencies:update
Then, build the compiler and libraries:
./gradlew bundle
To build with experimental targets support compile with -Porg.jetbrains.kotlin.native.experimentalTargets.
The build can take about an hour on a Macbook Pro. To run a shorter build with only the host compiler and libraries, run:
./gradlew dist distPlatformLibs
To include Kotlin compiler in composite build and build
against it, use the kotlinProjectPath project property:
./gradlew dist -PkotlinProjectPath=path/to/kotlin/project
To include Kotlin/Native Shared in a composite build and build against
it, use the sharedProjectPath project property:
./gradlew dist -PsharedProjectPath=path/to/kotlin/native/shared
It's possible to include in a composite build both Kotlin compiler and Kotlin/Native Shared simultaneously.
After that, you should be able to compile your programs like this:
export PATH=./dist/bin:$PATH
kotlinc hello.kt -o hello
For an optimized compilation, use -opt:
kotlinc hello.kt -o hello -opt
For tests, use:
./gradlew backend.native:tests:run
To generate interoperability stubs, create a library definition file
(refer to samples/tetris/.../sdl.def), and run the cinterop tool like this:
cinterop -def lib.def
See the provided samples and INTEROP.md for more details.
The Interop tool generates a library in the .klib library format. See LIBRARIES.md
for more details on this file format.