Kotlin 1.3.40 发布,为 Kotlin/JS 增加对主流打包工具的支持

栏目: 软件资讯 · 发布时间: 6年前

内容简介:Kotlin 1.3.40 已发布,除了针对稳定性以及工具方面的改进外,此版本值得关注的更新包括: 为 Kotlin/JS 提供 Gradle 对 NPM, Yarn 和 Webpack 的支持 针对多平台项目改进测试运行器 新的类型接口 改进 Kotlin/N...

Kotlin 1.3.40 已发布,除了针对稳定性以及 工具 方面的改进外,此版本值得关注的更新包括:

  • 为 Kotlin/JS 提供 Gradle 对 NPM, Yarn 和 Webpack 的支持
  • 针对多平台项目改进测试运行器
  • 新的类型接口
  • 改进 Kotlin/Native 的性能和互操作性
  • 一些添加到标准库的实验阶段新函数
  • ……

简单介绍如下:

对 NPM 和 Webpack 的实验性支持

此功能有助于简化使用 Node.js、NPM、Yarn 或 Webpack 的 JavaScript 项目的开发。团队为 Kotlin/JS 和多平台 Gradle 插件添加了辅助任务以简化集成的过程。此插件会为项目生成一个临时的 package.json,它将下载并使用 Yarn 来自动管理 NPM 依赖,Webpack 将在幕后使用,以加入所有依赖项。

该插件将 Gradle 项目中声明的所有 Kotlin/JS 依赖项附加到自动维护的 node_modules 文件夹中。现在也支持在 Gradle 脚本中添加 NPM 依赖。

dependencies {
    implementation(npm("react", "16.8.3"))
}

标准库中的实验性函数

  • ByteArray.decodeToString 和 String.encodeToByteArray
  • CharArray.concatToString 和 String.toCharArray

还有一个添加在 JVM 之上的函数为 capitalize,它将Locale对象作为参数。

升级方法

  • In Maven, Gradle, and npm: Use 1.3.40 as the version for the compiler and the standard library. See the docs here.
  • In IntelliJ IDEA and Android Studio: Update the Kotlin plugin to version 1.3.40. Use Tools | Kotlin | Configure Kotlin Plugin Updates and click the “Check for updates now” button.
  • In Eclipse: Install the plugin using Marketplace.
  • The command-line compiler can be downloaded from the Github release page.

以上所述就是小编给大家介绍的《Kotlin 1.3.40 发布,为 Kotlin/JS 增加对主流打包工具的支持》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

The Art of Computer Programming, Volumes 1-3 Boxed Set

The Art of Computer Programming, Volumes 1-3 Boxed Set

Donald E. Knuth / Addison-Wesley Professional / 1998-10-15 / USD 199.99

This multivolume work is widely recognized as the definitive description of classical computer science. The first three volumes have for decades been an invaluable resource in programming theory and p......一起来看看 《The Art of Computer Programming, Volumes 1-3 Boxed Set》 这本书的介绍吧!

MD5 加密
MD5 加密

MD5 加密工具

html转js在线工具
html转js在线工具

html转js在线工具