{"id":129685,"date":"2021-03-31T07:15:16","date_gmt":"2021-03-31T06:15:16","guid":{"rendered":"https:\/\/blog.jetbrains.com\/?post_type=kotlin&#038;p=129685"},"modified":"2021-04-14T09:18:22","modified_gmt":"2021-04-14T08:18:22","slug":"kotlin-1-5-0-m2-kotlin-1-5-0","status":"publish","type":"kotlin","link":"https:\/\/blog.jetbrains.com\/zh-hans\/kotlin\/2021\/03\/kotlin-1-5-0-m2-kotlin-1-5-0\/","title":{"rendered":"Kotlin 1.5.0-M2 \u53d1\u5e03\u4e86\u2014\u2014\u786e\u4fdd\u5e73\u6ed1\u8fc1\u79fb\u81f3 Kotlin 1.5.0"},"content":{"rendered":"<p>Kotlin 1.5.0-M2 \u662f Kotlin 1.5.0 \u5728\u8fd9\u4e2a\u6625\u5929\u7684\u6700\u540e\u4e00\u4e2a\u91cc\u7a0b\u7891\u7248\u672c\u3002 \u56e0\u6b64\uff0c\u8fd9\u662f\u786e\u4fdd\u60a8\u7684\u9879\u76ee\u80fd\u4e0e Kotlin 1.5.0 \u6210\u529f\u5408\u7528\u7684\u6700\u540e\u65f6\u673a\u3002<\/p>\n<p align=\"center\"><a class=\"jb-download-button\" title=\"Install\" href=\"https:\/\/kotlinlang.org\/docs\/install-eap-plugin.html\" target=\"_blank\" rel=\"noopener\">\u5b89\u88c5 1.5.0-M2<\/a><\/p>\n<p>\u5982\u679c\u73b0\u5728\u5c31\u8fc1\u79fb\u60a8\u7684\u9879\u76ee\uff0c\u90a3\u4e48\u53ef\u4ee5\u8282\u7701\u60a8\u672a\u6765\uff08Kotlin 1.5.0 \u63a8\u51fa\u65f6\uff09\u7684\u65f6\u95f4\u548c\u7cbe\u529b\uff0c\u8fd8\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u5728\u6b63\u5f0f\u53d1\u5e03\u524d\u63d0\u4f9b\u7d27\u6025\u4fee\u590d\u3002<\/p>\n<p>\u4f8b\u5982\uff0c\u5982\u679c\u60a8\u8bd5\u7528\u5728 1.5.0 \u4e2d\u6210\u4e3a\u9ed8\u8ba4\u7684 <a href=\"https:\/\/blog.jetbrains.com\/kotlin\/2021\/02\/the-jvm-backend-is-in-beta-let-s-make-it-stable-together\/\">\u65b0\u7684 JVM IR \u540e\u7aef<\/a>\uff0c <strong>\u5e76\u4e14\u73b0\u5728\u53d1\u73b0\u4e86\u4efb\u4f55\u95ee\u9898\uff0c\u6211\u4eec\u90fd\u4f1a\u52aa\u529b\u5728\u6b63\u5f0f\u53d1\u5e03\u524d\u63d0\u4f9b\u4fee\u590d<\/strong>\u3002 \u60a8\u53ef\u4ee5\u5411\u6211\u4eec\u7684<a href=\"https:\/\/kotl.in\/issue\" target=\"_blank\" rel=\"noopener\">\u95ee\u9898\u8ddf\u8e2a\u5668<\/a>\uff08YouTrack\uff09\u62a5\u544a\u6240\u9047\u5230\u7684\u4efb\u4f55\u95ee\u9898\u3002<\/p>\n<div style=\"background-color: #f1f6fe; margin-bottom: 2px; padding: 5px; margin-right: 0%; font-size: ; line-height: ; text-align: left;min-height: px;\">\n<strong>\u8bf7\u6ce8\u610f\uff0c<\/strong><a href=\"https:\/\/developer.android.com\/jetpack\/compose\" target=\"_blank\" rel=\"noopener\">Jetpack Compose<\/a> \u53ea\u9002\u7528\u4e8e\u65b0\u7684 JVM IR \u540e\u7aef\u3002 \u56e0\u6b64\uff0c\u5982\u679c\u60a8\u8bd5\u7528\u8fc7 Jetpack Compose\uff0c\u90a3\u4e48\u60a8\u5df2\u7ecf\u5728\u7528\u65b0\u7248\u540e\u7aef\u4e86\u3002\n<\/div>\n<h2>\u4e50\u4eab\u9884\u89c8\u7248\u7684\u7b80\u5316\u914d\u7f6e<\/h2>\n<p>\u5f80\uff0c\u5982\u679c\u60a8\u51b3\u5b9a\u5728\u73b0\u6709\u9879\u76ee\u4e2d\u4f7f\u7528\u9884\u89c8\u7248\uff0c\u90a3\u4e48\u5fc5\u987b\u5728 Gradle \u6587\u4ef6\u4e2d\u6307\u5b9a\u989d\u5916\u7684 Bintray \u5b58\u50a8\u5e93\u3002 \u73b0\u5728\uff0c\u6240\u6709 Kotlin \u9884\u89c8\u7248\u6784\u4ef6\u90fd\u5b58\u50a8\u5728 Maven Central\uff0c\u5e76\u4e14<strong>\u65e0\u9700\u624b\u52a8\u6dfb\u52a0\u5b58\u50a8\u5e93<\/strong>\u3002<\/p>\n<p>\u7701\u65f6\u7701\u529b\uff01 \u5982\u9700\u4f7f\u7528 M2 \u7248\u672c\uff0c\u5c06\u9879\u76ee\u4e2d\u7684 Kotlin \u7248\u672c\u53f7\u6539\u4e3a <code>1.5.0-M2<\/code>\uff0c\u5e76\u5728\u5fc5\u8981\u65f6\u8c03\u6574\u5e93\u4f9d\u8d56\u5373\u53ef\u3002<\/p>\n<p align=\"center\"><a class=\"jb-download-button\" title=\"Install\" href=\"https:\/\/kotlinlang.org\/docs\/install-eap-plugin.html\" target=\"_blank\" rel=\"noopener\">\u5b89\u88c5 1.5.0-M2<\/a><\/p>\n<h2>\u5206\u4eab\u60a8\u4f7f\u7528\u65b0\u8bed\u8a00\u7279\u6027\u7684\u771f\u5b9e\u6848\u4f8b<\/h2>\n<p>\u60a8\u662f\u5426\u6709\u5df2\u7ecf\u6709\u673a\u4f1a\u6765\u6d4b\u8bd5 Kotlin 1.4.30 \u4e2d\u7684\u5b9e\u9a8c\u6027\u8bed\u8a00\u7279\u6027\uff1f<\/p>\n<ul>\n<li><a href=\"https:\/\/kotl.in\/inline-classes\" target=\"_blank\" rel=\"noopener\">\u6539\u8fdb\u540e\u7684\u5185\u8054\u7c7b<\/a><\/li>\n<li><a href=\"https:\/\/kotl.in\/sealed-interfaces\" target=\"_blank\" rel=\"noopener\">\u5bc6\u5c01\u63a5\u53e3<\/a><\/li>\n<li><a href=\"https:\/\/kotl.in\/jvm-records\" target=\"_blank\" rel=\"noopener\">JVM \u8bb0\u5f55\uff08record\uff09\u7c7b\u578b<\/a><\/li>\n<\/ul>\n<p>\u5982\u679c\u8fd8\u6ca1\u6709\uff0c\u4e0d\u59a8\u73b0\u5728\u4e00\u8bd5\uff01 \u5982\u679c\u60a8\u5df2\u7ecf\u5728\u7528\u4e86\u6216\u8005\u521a\u521a\u5b9e\u9a8c\u8fc7\uff0c\u90a3\u4e48\u53ef\u4ee5\u4e3a\u6211\u4eec\u63d0\u4f9b\u4e00\u4e2a\u597d\u7684\u7528\u4f8b\u3002 &#x1f609; \u8fd9\u662f\u4e2a\u4e0d\u7528\u4fdd\u5b88\u7684\u79d8\u5bc6\uff0c <a href=\"https:\/\/surveys.jetbrains.com\/s3\/real-world-examples-for-new-language-features-kotlin\" target=\"_blank\" rel=\"noopener\">\u5206\u4eab\u7ed9\u6211\u4eec\u5427<\/a>!<\/p>\n<p>\u6211\u4eec\u7684\u6587\u6863\u56e2\u961f\u7ecf\u5e38\u4f1a\u6536\u5230\u8fd9\u6837\u7684\u53cd\u9988 &#x1f5e3;:<\/p>\n<blockquote>\n<p><em>&quot;Please add more samples to documentation&quot;.<\/em><\/p>\n<p><em>&quot;It\u2019s not clear without real-world examples&quot;.<\/em><\/p>\n<p><em>&quot;Could you provide samples with detailed explanations?&quot;<\/em><\/p>\n<\/blockquote>\n<p>\u8bf7\u5e2e\u52a9\u6211\u4eec\u5728\u8bed\u8a00\u6587\u6863\u4e2d\u63d0\u4f9b\u66f4\u591a\u771f\u5b9e\u793a\u4f8b\uff0c\u8ba9\u5176\u6709\u52a9\u4e8e\u50cf\u60a8\u4e00\u6837\u7684\u5f00\u53d1\u4eba\u5458\u3002<\/p>\n<p align=\"center\"><a class=\"jb-download-button\" title=\"youtube\" href=\"https:\/\/surveys.jetbrains.com\/s3\/real-world-examples-for-new-language-features-kotlin\" target=\"_blank\" rel=\"noopener\">\u5206\u4eab\u8bed\u8a00\u7279\u6027\u6837\u4f8b<\/a><\/p>\n<h2>\u522b\u9519\u8fc7 Kotlin 1.5.0 \u76f8\u5173\u89c6\u9891<\/h2>\n<p><a href=\"https:\/\/www.youtube.com\/channel\/UCP7uiEZIqci43m22KDl0sNw\" target=\"_blank\" rel=\"noopener\">Kotlin YouTube \u9891\u9053 <\/a> \u53ef\u4f9b\u559c\u6b22\u770b\u89c6\u9891\u7684\u4eba\u4f7f\u7528\u3002 \u6211\u4eec\u6b63\u5728\u4e0d\u65ad\u5411\u9891\u9053\u66f4\u65b0\u89c6\u9891\uff0c\u5e76\u4e14\u8ba1\u5212\u53d1\u5e03\u4e00\u4e2a\u81f4\u529b\u4e8e <strong>Kotlin 1.5.0<\/strong> \u7684\u89c6\u9891\u4e13\u8f91\u3002\u5373\u523b\u62a2\u5148\u89c2\u770b\u5427&#x1f3a5;!<\/p>\n<p align=\"center\"><a class=\"jb-download-button\" title=\"youtube\" href=\"https:\/\/www.youtube.com\/channel\/UCP7uiEZIqci43m22KDl0sNw\" target=\"_blank\" rel=\"noopener\">\u8ba2\u9605 Kotlin YouTube<\/a><\/p>\n<hr \/>\n<p>\u8fd8\u6ca1\u6709\u4f7f\u7528 Kotlin 1.5.0 \u6765\u9a8c\u8bc1\u60a8\u7684\u9879\u76ee\u5417\uff1f \u4e0d\u59a8<a href=\"https:\/\/kotlinlang.org\/docs\/install-eap-plugin.html\" target=\"_blank\" rel=\"noopener\">\u9a6c\u4e0a\u5b89\u88c5 1.5.0-M2<\/a> \u4ee5\u907f\u514d\u4ee5\u540e\u9047\u5230\u95ee\u9898\u3002<\/p>\n<div style=\"background-color: #f1f6fe;\"> \u7279\u522b\u611f\u8c22\u7531\u6765\u81ea Kotlin \u793e\u533a\u7684 <B>Jia Yanwei (hltj)<\/B> \u4e3a\u672c\u7bc7\u535a\u6587\u63d0\u4f9b\u4e2d\u6587\u8bd1\u6587\u3002<\/div>\n","protected":false},"author":814,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","categories":[],"tags":[],"cross-post-tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/kotlin\/129685"}],"collection":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/kotlin"}],"about":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/types\/kotlin"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/users\/814"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/comments?post=129685"}],"version-history":[{"count":6,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/kotlin\/129685\/revisions"}],"predecessor-version":[{"id":136310,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/kotlin\/129685\/revisions\/136310"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/media?parent=129685"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/categories?post=129685"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/tags?post=129685"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/cross-post-tag?post=129685"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}