From ace340bed67571ba79eb463b005aa712c58a3d9a Mon Sep 17 00:00:00 2001 From: SOR <3272194354@qq.com> Date: Fri, 9 Oct 2026 21:14:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=20Kotlin=20=E8=BF=9B?= =?UTF-8?q?=E9=98=B6=E4=B8=AD=E7=9A=84=E5=BA=8F=E5=88=97=E5=8C=96=E4=B8=8E?= =?UTF-8?q?=20Maven=20=E5=8F=91=E5=B8=83=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Learning/成为Kotlin超人.md | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/Learning/成为Kotlin超人.md b/Learning/成为Kotlin超人.md index 702e35f..7f848ec 100644 --- a/Learning/成为Kotlin超人.md +++ b/Learning/成为Kotlin超人.md @@ -11,10 +11,29 @@ ## JSON 序列化 -## Kotlin 协程 +Kotlin-serialization 是最佳选择,它需要加载一个 gradle 插件,注意要与你的 Kotlin 版本一致: + +```kotlin +plugins { + kotlin("jvm") version "2.3.20" + kotlin("plugin.serialization") version "2.3.20" +} +``` + +## Kotlin 协程与多线程细节 ## 不依赖 Springboot web 的网络 api ## 加载动态链接库(JNA) -## 将 jar 文件上传至 Maven 仓库 \ No newline at end of file +## 将 jar 包上传至 Maven 仓库 + +这需要一个 gradle 插件: + +```kotlin +plugins { + id("com.vanniktech.maven.publish") version "0.37.0" +} +``` + +具体的写法可以参考 [FFmpeg-Kit_KMP](https://github.com/SOR2171/FFmpeg-Kit_KMP/blob/main/settings.gradle.kts) 的 gradle 配置。 \ No newline at end of file