From 7a49112446d3730f7aa28efc27914583119da655 Mon Sep 17 00:00:00 2001 From: fankesyooni Date: Thu, 5 Oct 2023 02:26:55 +0800 Subject: [PATCH] docs: update Java requirement description --- docs-source/src/en/guide/quick-start.md | 24 ++++++++++++++-------- docs-source/src/zh-cn/guide/quick-start.md | 24 ++++++++++++++-------- 2 files changed, 32 insertions(+), 16 deletions(-) diff --git a/docs-source/src/en/guide/quick-start.md b/docs-source/src/en/guide/quick-start.md index eefd867..cc46923 100644 --- a/docs-source/src/en/guide/quick-start.md +++ b/docs-source/src/en/guide/quick-start.md @@ -18,6 +18,8 @@ - Java 11 and above +- Java 17 and above (Since API `1.0.3`) + ## Project Requirements The project needs to be created using `Android Studio` or `IntelliJ IDEA` and the type is an Java or Android project and the Kotlin environment dependency has been integrated. @@ -120,18 +122,18 @@ In this case, you should go to the [Documentation](https://fankes.github.io/Yuki #### Configure Java Version -Modify the Java version of Kotlin in your project `build.gradle.kts` or `build.gradle` to 11 or above. +Modify the Java version of Kotlin in your project `build.gradle.kts` or `build.gradle` to 17 or above. > Kotlin DSL ```kt android { compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } kotlinOptions { - jvmTarget = "11" + jvmTarget = "17" } } ``` @@ -141,11 +143,17 @@ android { ```groovy android { compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 } kotlinOptions { - jvmTarget = '11' + jvmTarget = '17' } } -``` \ No newline at end of file +``` + +::: warning + +Since API **1.0.3**, the Java version used by Kotlin defaults to 17, and versions 11 and below are no longer supported. + +::: \ No newline at end of file diff --git a/docs-source/src/zh-cn/guide/quick-start.md b/docs-source/src/zh-cn/guide/quick-start.md index 2229c16..8ff0aa4 100644 --- a/docs-source/src/zh-cn/guide/quick-start.md +++ b/docs-source/src/zh-cn/guide/quick-start.md @@ -18,6 +18,8 @@ - Java 11 及以上 +- Java 17 及以上 (Since API `1.0.3`) + ## 项目要求 项目需要使用 `Android Studio` 或 `IntelliJ IDEA` 创建且类型为 Java 或 Android 项目并已集成 Kotlin 环境依赖。 @@ -115,18 +117,18 @@ dependencies { #### 配置 Java 版本 -在你的项目 `build.gradle.kts` 或 `build.gradle` 中修改 Kotlin 的 Java 版本为 11 及以上。 +在你的项目 `build.gradle.kts` 或 `build.gradle` 中修改 Kotlin 的 Java 版本为 17 及以上。 > Kotlin DSL ```kt android { compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } kotlinOptions { - jvmTarget = "11" + jvmTarget = "17" } } ``` @@ -136,11 +138,17 @@ android { ```groovy android { compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 } kotlinOptions { - jvmTarget = '11' + jvmTarget = '17' } } -``` \ No newline at end of file +``` + +::: warning + +自 API **1.0.3** 版本后 Kotlin 使用的 Java 版本默认为 17,不再支持 11 及以下版本。 + +::: \ No newline at end of file