{"id":5641,"date":"2019-08-22T23:25:01","date_gmt":"2019-08-22T19:25:01","guid":{"rendered":"https:\/\/blog.jetbrains.com\/kotlin\/?p=7309"},"modified":"2020-06-25T17:14:02","modified_gmt":"2020-06-25T13:14:02","slug":"kotlin-1-3-50-released","status":"publish","type":"kotlin","link":"https:\/\/blog.jetbrains.com\/ja\/kotlin\/2019\/08\/kotlin-1-3-50-released","title":{"rendered":"Kotlin 1.3.50 released"},"content":{"rendered":"<p>We\u2019re happy to announce the release of Kotlin 1.3.50 today. In addition to the quality and tooling improvements, the main focus for this version has been on:<\/p>\n<ul>\n<li>Designing a new Duration and Time Measurement API (available for preview).<\/li>\n<li>Working on an improved Java-to-Kotlin converter.<\/li>\n<li>Experimental generation of external declarations for npm dependencies in Gradle Kotlin\/JS projects (using Dukat).<\/li>\n<li>A separate plugin for debugging Kotlin\/Native code in IntelliJ IDEA Ultimate.<\/li>\n<li>Java compilation support in multiplatform projects.<\/li>\n<\/ul>\n<p>You can find the complete list of changes in the <a href=\"https:\/\/github.com\/JetBrains\/kotlin\/blob\/1.3.50\/ChangeLog.md\" target=\"_blank\" rel=\"noopener\">change log<\/a>. As always, we\u2019d like to thank our <a href=\"#external-contributions\">external contributors<\/a>. Now let\u2019s dive into the details!<\/p>\n<h2 id=\"npe-optimizations\">Null-check optimizations planned for Kotlin 1.4<\/h2>\n<p>As you probably know, Kotlin decreases the possibility of <code>NullPointerException<\/code>s by providing support for nullable types. However, because of interoperability with Java code, it\u2019s impossible to avoid NPEs completely. To help developers better understand the source of a nullability problem if it occurs, Kotlin compiler throws different types of runtime exceptions with clear error messages instead of pure NPEs. It turned out that this approach has its disadvantages: it reduces possible null check optimizations that can be performed either by the Kotlin compiler or by various kinds of bytecode processing tools, such as the Android <a href=\"https:\/\/developer.android.com\/studio\/build\/shrink-code\" target=\"_blank\" rel=\"noopener\">R8 optimizer<\/a>.<\/p>\n<p><!--more--><\/p>\n<p>To solve this, starting from Kotlin 1.4, all runtime null checks will throw a <code>java.lang.NullPointerException<\/code> instead of a <code>KotlinNullPointerException<\/code>, <code>IllegalStateException<\/code>, <code>IllegalArgumentException<\/code>, and <code>TypeCastException<\/code>. This applies to: the <code>!!<\/code> operator, parameter null checks in the method preamble, platform-typed expression null checks, and the <code>as<\/code> operator with a non-null type. This doesn\u2019t apply to <code>lateinit<\/code> null checks and explicit library function calls like <code>checkNotNull<\/code> or <code>requireNotNull<\/code>.<\/p>\n<p>Note that from a developer&#8217;s perspective, things won\u2019t change that much: the Kotlin code will throw exceptions with the same error messages as before. <em>The type<\/em> of exception changes, but the information passed stays the same. For instance, the following code currently throws an <code>IllegalStateException<\/code> with the error message \u201cJavaCode.getNull() must not be null\u201d:<\/p>\n<pre class=\"kotlin-code\" data-highlight-only=\"true\" theme=\"idea\" indent=\"4\" style=\"visibility: hidden; padding: 36px 0;\">\r\nfun main() {\r\n    duplicate(JavaCode.getNull())  \/\/ 1\r\n}\r\n\r\nfun duplicate(s: String) = s + s\r\n<\/pre>\n<pre class=\"kotlin-code\" data-highlight-only=\"true\" theme=\"idea\" indent=\"4\" style=\"visibility: hidden; padding: 36px 0;\">\r\npublic class JavaCode {\r\n    public static String getNull() { return null; }\r\n}\r\n<\/pre>\n<p>Right before the <code>duplicate<\/code> function call at line <code>1<\/code>, a special check is generated which throws this exception if the expression <code>JavaCode.getNull()<\/code> stores <code>null<\/code>. Starting with Kotlin 1.4, this code will throw a <code>NullPointerException<\/code> instead with the same message, \u201cJavaCode.getNull() must not be null\u201d.<\/p>\n<p>After this change of behavior, the optimizers will be able to decrease the total number of null-checks present in the bytecode by removing repetitive null-checks when possible: since all checks throw the same NPE exception, only one can remain. During such optimizations, the specific helpful messages of NPEs can be lost, but that\u2019s the price to be paid for the gained performance benefits. Note that these optimizations are still to be implemented in the corresponding tools, and when implemented, there will be more details about that, but the change of the exception type makes it possible in the future.<\/p>\n<h2>Standard library changes<\/h2>\n<p>Note that all new functions are added to the standard library in the &#8220;experimental&#8221; state.<\/p>\n<h3 id=\"time-measurement-api\">Duration and time measurement API<\/h3>\n<p>A new duration and time measurement API is available for preview. Duration can be measured in a variety of units: seconds, milliseconds, nanoseconds, etc. The confusion between different units is a known source of bugs: if the API expects the duration stored as primitive value like <code>Long<\/code>, one can erroneously pass the value in the wrong unit, and unfortunately the type system doesn\u2019t help prevent that. Creating a regular class to store duration solves this problem, but brings another one: additional allocations.<\/p>\n<p>Inline classes provide a very elegant solution to that: they bring both type system guarantees and an allocation-free approach. Now the API can use the <code>Duration<\/code> type, and all the clients will need to specify the time in the desired units explicitly. Since <code>Duration<\/code> is declared as an inline class, no extra allocations are happening under the hood:<\/p>\n<pre class=\"kotlin-code\" theme=\"idea\" indent=\"4\" style=\"visibility: hidden; padding: 36px 0;\">\r\nimport kotlinx.coroutines.delay\r\nimport kotlin.time.*\r\n\r\n@ExperimentalTime\r\nsuspend fun greetAfterTimeout(duration: Duration) {\r\n    delay(duration.toLongMilliseconds())\r\n    println(&quot;Hi!&quot;)\r\n}\r\n\r\n@UseExperimental(ExperimentalTime::class)\r\nsuspend fun main() {\r\n    greetAfterTimeout(100.milliseconds)\r\n    greetAfterTimeout(1.seconds)\r\n}\r\n<\/pre>\n<p>This release brings support for <code>MonoClock<\/code> which represents the <em>monotonic clock<\/em>. The recommended approach to measuring time duration from a given point in your program is to use the monotonic clock, which doesn\u2019t depend on the system time. System time might be changed outside, and that might lead to erroneous behavior. The monotonic clock can only measure time difference between given time points, but doesn\u2019t know the \u201ccurrent time.\u201d<\/p>\n<p>The <code>Clock<\/code> interface provides a general API for measuring time intervals. <code>MonoClock<\/code> is an object implementing <code>Clock<\/code>; it provides the default source of monotonic time on different platforms.<\/p>\n<p>When using the <code>Clock<\/code> interface, you explicitly mark the time of action start, and later the time elapsed from the start point. It is especially convenient if you want to start and finish measuring time from different functions:<\/p>\n<pre class=\"kotlin-code\" theme=\"idea\" indent=\"4\" style=\"visibility: hidden; padding: 36px 0;\">\r\nimport kotlin.time.*\r\n\r\n@UseExperimental(ExperimentalTime::class)\r\nfun main() {\r\n    val clock = MonoClock\r\n    val mark = clock.markNow() \/\/ might be inside the first function\r\n    Thread.sleep(10)           \/\/ action\r\n    println(mark.elapsedNow()) \/\/ might be inside the second function\r\n}\r\n<\/pre>\n<p>The <code>measureTimedValue<\/code> function allows you to measure the duration of a given action and get its result together with the duration of the elapsed time interval. It measures the elapsed time with <code>MonoClock<\/code>.<\/p>\n<pre class=\"kotlin-code\" theme=\"idea\" indent=\"4\" style=\"visibility: hidden; padding: 36px 0;\">\r\nimport kotlin.time.*\r\n\r\n@UseExperimental(ExperimentalTime::class)\r\nfun main() {\r\n    val (value, duration) = measureTimedValue {\r\n        Thread.sleep(100)\r\n        42\r\n    }\r\n    println(value)     \/\/ 42\r\n    println(duration)  \/\/ e.g. 103 ms\r\n}\r\n<\/pre>\n<p>For more details about the implementation of the <code>Duration<\/code> class and the details of the <code>Clock<\/code> interface and <code>MonoClock<\/code> implementations for different platforms, please refer to the corresponding <a href=\"https:\/\/github.com\/Kotlin\/KEEP\/blob\/durations\/proposals\/stdlib\/durations-and-clocks.md\" target=\"_blank\" rel=\"noopener\">KEEP<\/a>. Note that this API is experimental and is subject to change based on your feedback. You will need to explicitly give your consent to use it by applying the corresponding <a href=\"https:\/\/kotlinlang.org\/docs\/reference\/experimental.html\" target=\"_blank\" rel=\"noopener\">annotations<\/a>.<\/p>\n<p>We\u2019re looking forward to your feedback!<\/p>\n<h3>Functions for bit manipulation<\/h3>\n<p>The standard library now contains an API for bit manipulation (as usual, in the experimental state initially):<\/p>\n<pre class=\"kotlin-code\" theme=\"idea\" indent=\"4\" style=\"visibility: hidden; padding: 36px 0;\">\r\n@UseExperimental(ExperimentalStdlibApi::class)\r\nfun main() {\r\n    val number = &quot;1010000&quot;.toInt(radix = 2)\r\n    println(number.countOneBits())\r\n    println(number.countTrailingZeroBits())\r\n    println(number.takeHighestOneBit().toString(2))\r\n    println(number.rotateRight(3).toString(2))\r\n    println(number.rotateLeft(3).toString(2))\r\n}\r\n<\/pre>\n<p>Note that similar extension functions for Int, Long, Short, Byte, and their unsigned counterparts have been added.<\/p>\n<h2>IntelliJ IDEA support<\/h2>\n<h3>Improved Java to Kotlin converter<\/h3>\n<p>We plan to improve the Java-to-Kotlin converter to minimize the amount of \u201cred code\u201d one has to fix manually after the conversion. As the current converter almost always generates non-nullable types, you need to fix the nullability issues by hand afterward. It can often lead to runtime errors from nullability mismatch later.<\/p>\n<p>The new, improved version of the Java-to-Kotlin converter tries to infer nullability more correctly based on the Java type usages in the code. Note that there\u2019s no goal to produce 100% error-free code. The goal is to decrease the number of compilation errors and to make the produced Kotlin code more convenient to work with. The new converter fixes many other known bugs, too; for instance, it now correctly handles implicit Java type casts.<\/p>\n<p>In the future, the new converter is going to become the default one. In this release, it\u2019s available for preview. To turn it on, specify the <code>Use New J2K (experimental)<\/code> flag in settings.<\/p>\n<p>Please give it a try and share your feedback with us!<\/p>\n<h3>Debugging improvements<\/h3>\n<p>We&#8217;ve improved how the Kotlin \u201cVariables\u201d view chooses the variables to display. As there\u2019s a lot of additional technical information in the bytecode, the Kotlin \u201cVariables\u201d view highlights only the relevant variables. Now it works better when you set a breakpoint inside a lambda (either inlined or non-inlined). Local variables inside the lambda, as well as captured variables from the outer context and parameters of the outer function, are correctly displayed:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2019\/08\/kotlin-debug_lambda_variables.png\" alt=\"debug_lambda_variables\" width=\"600\" class=\"alignnone size-full wp-image-7312\" \/><\/p>\n<p>You can now set a breakpoint at the end of the function, if needed:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2019\/08\/kotlin-end_of_function_breakpoint.png\" alt=\"end_of_function_breakpoint\" width=\"600\" class=\"alignnone size-full wp-image-7313\" \/><\/p>\n<p>Support for the \u201cEvaluate expression\u201d functionality in the debugger was improved for many non-trivial language features, such as local extension functions or accessors of member extension properties. Also, you can now modify variables via \u201cEvaluate expression\u201d:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-7314\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2019\/08\/kotlin-evaluate_expression2.png\" onmouseover=\"this.src='https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2019\/08\/kotlin-evaluate_expression2.gif';\"\nonmouseout=\"this.src='https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2019\/08\/kotlin-evaluate_expression2.png';\" alt=\"\" width=\"600\" \/><\/p>\n<p>Note that, alternatively, you can modify variables in the \u201cVariables\u201d view directly.<\/p>\n<h3>New intentions and inspections<\/h3>\n<p>New intentions and inspections have been added. One of the goals of intentions is to help you learn how to write idiomatic Kotlin code. The following intention, for instance, suggests using the <code>indices<\/code> property rather than building a range of indices manually:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-7314\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2019\/08\/kotlin-indices2.png\" onmouseover=\"this.src='https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2019\/08\/kotlin-indices-gif.gif';\"\nonmouseout=\"this.src='https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2019\/08\/kotlin-indices2.png';\" alt=\"\" width=\"600\" \/><\/p>\n<p>If the index isn\u2019t used, the loop can be automatically replaced with a for loop over elements.<\/p>\n<p>IntelliJ IDEA now:<\/p>\n<ul>\n<li>Can automatically replace the <code>lateinit<\/code> property of a primitive type with the <code>by Delegates.notNull()<\/code> syntax.<\/li>\n<li>Can convert a regular property to a lazy one and back.<\/li>\n<li>Detects usages of Java methods for array comparison (like <code>Arrays.equals()<\/code> or <code>Array.deepEquals()<\/code>) and suggest replacing them with their Kotlin counterparts (like <code>contentEquals<\/code> and <code>contentDeepEquals<\/code>).<\/li>\n<li>Highlights the deprecated import in the completion list.<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2019\/08\/kotlin-deprecated_imports.png\" alt=\"deprecated_imports\" width=\"600\" class=\"alignnone size-full wp-image-7316\" \/><\/p>\n<p>The general performance of IDE actions has been improved, and several known situations that were causing the UI to freeze (such as calling the \u201cMove\u201d refactoring on a file with a huge number of usages) have been fixed.<\/p>\n<h2>Kotlin\/JS<\/h2>\n<p>This update adds support for building and running Kotlin\/JS Gradle projects using the <code>org.jetbrains.kotlin.js<\/code> plugin on Windows. Just like on other platforms, you can build and run your projects using Gradle tasks, dependencies from NPM required in your Gradle configuration are resolved and included, you can try out your applications using webpack-dev-server (e.g. by invoking the <code>browserRun<\/code> Gradle task), and more. As with the other platforms, all of this can be used without having to manually install and manage a node, npm, or yarn distribution.<\/p>\n<p>Under the hood, there have also been a series of performance improvements for Kotlin\/JS, improving the incremental compilation time for projects. This means that you can expect speedups of up to 30% when compared to 1.3.41.<\/p>\n<p>Our improved integration with NPM means that projects are now resolved lazily and in parallel, and support for projects with transitive dependencies between compilations in the same project has been added.<\/p>\n<p>The new version also brings with it changes in the structure and naming of generated artifacts. Generated artifacts are now bundled in the distributions folder, and they include the version number of the project and <code>archiveBaseName<\/code> (which defaults to the project name), e.g. <code>projectName-1.0-SNAPSHOT.js<\/code>.<\/p>\n<h3 id=\"dukat\">Dukat<\/h3>\n<p><a href=\"https:\/\/github.com\/Kotlin\/dukat\" target=\"_blank\" rel=\"noopener\">Dukat<\/a> allows the automatic conversion of TypeScript declaration files (<code>.d.ts<\/code>) into Kotlin external declarations (and thus replaces the <code>ts2kt<\/code> command-line tool). This makes it more comfortable to use libraries from the JavaScript ecosystem in a type-safe manner in Kotlin, by drastically reducing the need for manually writing wrappers for JS libraries.<\/p>\n<p>Kotlin\/JS now ships with experimental support for dukat integration for Gradle projects. With this integration, by running the build task in Gradle, typesafe wrappers are <em>automatically<\/em> generated for npm dependencies and can be used from Kotlin.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2019\/08\/kotlin-kotlin-dukat-preview-1.png\" alt=\"kotlin-dukat-preview\" width=\"902\" height=\"542\" class=\"alignnone size-full wp-image-7362\" onmouseover=\"this.src='https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2019\/08\/kotlin-kotlin-dukat-video.gif';\" onmouseout=\"this.src='https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2019\/08\/kotlin-kotlin-dukat-preview-1.png';\"\/><\/p>\n<p>Because dukat is still in a very early stage, its integration is disabled by default. Add the <code>kotlin.js.experimental.generateKotlinExternals=true<\/code> line into the <code>gradle.properties<\/code> file in a project root directory to turn on dukat for your project. We&#8217;ve prepared an <a href=\"https:\/\/github.com\/JetBrains\/kotlin-js-demo-1.3.50\" target=\"_blank\" rel=\"noopener\">example project<\/a> for it too, which demonstrates the use of dukat in Kotlin\/JS projects. Try it out and share your <a href=\"https:\/\/github.com\/kotlin\/dukat\/issues\" target=\"_blank\" rel=\"noopener\">feedback<\/a> with us.<\/p>\n<h2>Kotlin\/Native<\/h2>\n<p>It was not easy but possible to notice that the version of Kotlin\/Native differed from the version of Kotlin. Not anymore! The version schemes for Kotlin and Kotlin\/Native are now aligned. This release uses version 1.3.50 for both Kotlin and Kotlin\/Native binaries, reducing the complexity.<\/p>\n<p>This release brings more pre-imported Apple frameworks for all platforms, including macOS and iOS. The Kotlin\/Native compiler now includes actual bitcode in produced frameworks.<\/p>\n<p>Several improvements have been made for interop. We now support the <code>kotlin.Deprecated<\/code> annotation when producing a framework, and the generated Objective-C headers code will not have warnings. The <code>getOriginalKotlinClass()<\/code> function is added into the standard library to get a <code>KClass<\/code> from an Objective-C class or protocols.<\/p>\n<p>The standard library has been updated to support the <code>kotlin.reflect.typeOf()<\/code> function for Kotlin\/Native types. The new function <code>executeAfter()<\/code> is added to the <code>Worker<\/code> type to execute actions after a delay. In addition, you can call the <code>processQueue()<\/code> function on the <code>Worker<\/code> to process the tasks queue explicitly.<\/p>\n<p>The older functions <code>ByteArray.stringFromUtf8()<\/code> and <code>ByteArray.stringFromUtf8OrThrow()<\/code> are now deprecated. In the previous release, we added the <code>ByteArray.decodeToString()<\/code> function (in the <code>kotlin.text<\/code> package) to convert a UTF-8 string to a Kotlin string. That function does not support NULL-terminated strings, so to fix that, in 1.3.50 we&#8217;ve added a new function to deal with NULL-terminated UTF-8 strings easily. The <code>ByteArray.toKString()<\/code> function (from the <code>kotlinx.cinterop<\/code> package) can be used to turn a NULL-terminated UTF-8 string into a Kotlin string. You can pass start and end indices to the function if needed.<\/p>\n<p>We\u2019ve deprecated and removed the <code>kotlin-platform-native<\/code> Gradle plugin in favor of the <code>kotlin-multiplatform<\/code> Gradle plugin, so now you can easily benefit from all multiplatform project features. Check out the <a href=\"https:\/\/github.com\/JetBrains\/kotlin-native\/blob\/master\/GRADLE_PLUGIN.md\" target=\"_blank\" rel=\"noopener\">documentation<\/a> for the migration guide and more info<\/p>\n<p>Finally, we are happy to share that the Kotlin\/Native compiler and the interop tool performance has been improved in this release.<\/p>\n<h2>Multiplatform Projects<\/h2>\n<p>Java compilation can now be included in Kotlin\/JVM targets of a multiplatform project by calling the newly added <code>withJava()<\/code> function of the DSL. It will configure Java plugin to use the <code>src\/&lt;targetName&gt;Main\/java<\/code> and <code>src\/&lt;targetName&gt;Test\/java<\/code> paths by default. Here is a full example to create a Kotlin\/JVM target with enabled Java compilation:<\/p>\n<pre class=\"kotlin-code\" data-highlight-only=\"true\" theme=\"idea\" indent=\"4\" style=\"visibility: hidden; padding: 36px 0;\">\r\nplugins { \r\n    kotlin(&quot;multiplatform&quot;) version &quot;1.3.50&quot;\r\n}\r\nkotlin {\r\n    jvm {\r\n        withJava()\r\n    }\r\n}\r\n<\/pre>\n<p>Kotlin&#8217;s New Project wizard now generates Gradle Kotlin DSL for new projects.<\/p>\n<p>Debugging Kotlin\/Native code in IntelliJ IDEA Ultimate is now supported too! Try installing the new <a href=\"https:\/\/plugins.jetbrains.com\/plugin\/12775-native-debug-for-intellij\" target=\"_blank\" rel=\"noopener\">Native Debug for IntelliJ IDEA Ultimate<\/a> plugin. It should detect Kotlin\/Native run configurations and the debug action is supported:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2019\/08\/kotlin-debugging-kotlin-native-1.3.50.png\" alt=\"debugging-kotlin-native-1.3.50\" width=\"1620\" height=\"1516\" class=\"alignnone size-full wp-image-7335\" \/><\/p>\n<h2>Scripting<\/h2>\n<p>This release adds multiple features and improvements in scripting and REPL support. Using Kotlin as a scripting language for your application is even easier! Now the scripting support works out of the box: we\u2019ve published a default JSR-223 implementation library, so to add Kotlin scripting support for your application, you only need to add <code>kotlin-scripting-jsr223<\/code> as a dependency and use the <code>javax.script<\/code> API with Kotlin.<\/p>\n<p>Properties that are set via the JSR-223 API are now accessible from scripts as regular Kotlin properties (before, that you had to use the <code>bindings<\/code> map):<\/p>\n<pre class=\"kotlin-code\" data-highlight-only=\"true\" theme=\"idea\" indent=\"4\" style=\"visibility: hidden; padding: 36px 0;\">\r\nval engine = ScriptEngineManager().getEngineByExtension(&quot;kts&quot;)!!\r\nengine.put(&quot;z&quot;, 42)\r\nengine.eval(&quot;&quot;&quot;println(&quot;answer = $z&quot;)&quot;&quot;&quot;)\r\n<\/pre>\n<p><a href=\"https:\/\/github.com\/Kotlin\/KEEP\/blob\/master\/proposals\/scripting-support.md#kotlin-main-kts\" target=\"_blank\" rel=\"noopener\">The <code>kotlin-main-kts<\/code> artifact<\/a>, which was introduced in Kotlin 1.3 to simplify the creation and usage of the basic utility scripts, can now be used as a JSR-223 host as well. In addition to the annotations like <code>Repository<\/code> and <code>DependsOn<\/code> for resolving dependencies, it now supports the <code>@Import<\/code> annotation instructing the scripting compiler to &#8220;import&#8221; another script into the current one:<\/p>\n<pre class=\"kotlin-code\" data-highlight-only=\"true\" theme=\"idea\" indent=\"4\" style=\"visibility: hidden; padding: 36px 0;\">\r\n\/\/ common.main.kts:\r\nval foo = &quot;common foo&quot;\r\n<\/pre>\n<pre class=\"kotlin-code\" data-highlight-only=\"true\" theme=\"idea\" indent=\"4\" style=\"visibility: hidden; padding: 36px 0;\">\r\n\/\/ script.main.kts:\r\n@file:Import(&quot;common.main.kts&quot;)\r\nval bar = &quot;bar with $foo&quot;\r\n<\/pre>\n<p>Read more about scripting in <a href=\"https:\/\/github.com\/Kotlin\/KEEP\/blob\/master\/proposals\/scripting-support.md\" target=\"_blank\" rel=\"noopener\">KEEP-75<\/a>. You can find <a href=\"https:\/\/github.com\/JetBrains\/kotlin\/tree\/master\/libraries\/examples\/scripting\" target=\"_blank\" rel=\"noopener\">examples<\/a> in the Kotlin repository. Please share your feedback in the #scripting channel on the Kotlin Slack!<\/p>\n<h2>How to update<\/h2>\n<p>As always, you can <strong>try Kotlin online<\/strong> at <a href=\"http:\/\/play.kotl.in\/\" target=\"_blank\" rel=\"noopener\">play.kotl.in<\/a>.<\/p>\n<ul>\n<li><strong>In Maven, Gradle, and npm<\/strong>: Use <code>1.3.50<\/code> as the version for the compiler and the standard library. See the docs <a href=\"http:\/\/kotlinlang.org\/docs\/reference\/using-gradle.html\" target=\"_blank\" rel=\"noopener\">here<\/a>.<\/li>\n<li><strong>In IntelliJ IDEA<\/strong> and <strong>Android Studio<\/strong>: Update the Kotlin plugin to version 1.3.50. Use <em>Tools | Kotlin | Configure Kotlin Plugin Updates<\/em> and click the \u201cCheck for updates now\u201d button.<\/li>\n<li><strong>In Eclipse<\/strong>: Install the plugin using the <a href=\"https:\/\/marketplace.eclipse.org\/content\/kotlin-plugin-eclipse\" target=\"_blank\" rel=\"noopener\">Marketplace<\/a>.<\/li>\n<li><strong>The command-line compiler<\/strong> can be downloaded from the <a href=\"https:\/\/github.com\/JetBrains\/kotlin\/releases\/tag\/v1.3.50\" target=\"_blank\" rel=\"noopener\">Github release page<\/a>.<\/li>\n<\/ul>\n<p>If you run into any problems with the new release, you\u2019re welcome to ask for help on the <a href=\"https:\/\/discuss.kotlinlang.org\/\" target=\"_blank\" rel=\"noopener\">forums<\/a>, on Slack (get an invite <a href=\"http:\/\/slack.kotlinlang.org\/\" target=\"_blank\" rel=\"noopener\">here<\/a>), or to report issues in the <a href=\"https:\/\/youtrack.jetbrains.com\/issues\/KT\" target=\"_blank\" rel=\"noopener\">issue tracker<\/a>.<\/p>\n<p>Let\u2019s Kotlin!<\/p>\n<h2 id=\"external-contributions\">External Contributions<\/h2>\n<p>We want to especially thank <a href=\"http:\/\/github.com\/t-kameyama\" target=\"_blank\" rel=\"noopener\">Toshiaki Kameyama<\/a> for his ongoing work on providing many useful intentions and inspections for IntelliJ IDEA.<\/p>\n<p>We\u2019d like to thank all our external contributors whose pull requests were included in this release:<br \/>\n* <a href=\"https:\/\/github.com\/sfs\" target=\"_blank\" rel=\"noopener\">Steven Sch\u00e4fer<\/a><br \/>\n* <a href=\"https:\/\/github.com\/pyos\" target=\"_blank\" rel=\"noopener\">pyos<\/a><br \/>\n* <a href=\"https:\/\/github.com\/gavra0\" target=\"_blank\" rel=\"noopener\">Ivan Gavrilovic<\/a><br \/>\n* <a href=\"https:\/\/github.com\/madsager\" target=\"_blank\" rel=\"noopener\">Mads Ager<\/a><br \/>\n* <a href=\"https:\/\/github.com\/ting-yuan\" target=\"_blank\" rel=\"noopener\">Ting-Yuan Huang<\/a><br \/>\n* <a href=\"https:\/\/github.com\/ilgonmic\" target=\"_blank\" rel=\"noopener\">ilgonmic<\/a><br \/>\n* <a href=\"https:\/\/github.com\/neetopia\" target=\"_blank\" rel=\"noopener\">Jiaxiang Chen<\/a><br \/>\n* Mark Punzalan<br \/>\n* Jake Wharton<br \/>\n* Jeffrey van Gogh<br \/>\n* Peter Xu<br \/>\n* Amaury<br \/>\n* Benjamin Orsini<br \/>\n* Dereck Bridie<br \/>\n* Eduard Wolf<br \/>\n* George Gastaldi<br \/>\n* Juan Chen<br \/>\n* Kevin Peek<br \/>\n* KilianCallebaut<br \/>\n* Louis CAD<br \/>\n* Martin Petrov<br \/>\n* <a href=\"https:\/\/github.com\/inktomi\" target=\"_blank\" rel=\"noopener\">Matthew Runo<\/a><br \/>\n* <a href=\"https:\/\/github.com\/ajalt\" target=\"_blank\" rel=\"noopener\">AJ Alt<\/a><br \/>\n* Ty Smith<br \/>\n* ghedeon<br \/>\n* technoir<br \/>\n* <a href=\"https:\/\/github.com\/Dattish\" target=\"_blank\" rel=\"noopener\">Dat Trieu<\/a><\/p>\n","protected":false},"author":42,"featured_media":0,"comment_status":"open","ping_status":"open","template":"","categories":[896,907],"tags":[91],"cross-post-tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/kotlin\/5641"}],"collection":[{"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/kotlin"}],"about":[{"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/types\/kotlin"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/users\/42"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/comments?post=5641"}],"version-history":[{"count":0,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/kotlin\/5641\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/media?parent=5641"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/categories?post=5641"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/tags?post=5641"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/cross-post-tag?post=5641"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}