mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-09-01 16:25:31 +08:00
docs: update Java requirement description
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
|
||||
- Java 11 and above (Since API `1.0.80`)
|
||||
|
||||
- Java 17 and above (Since API `1.2.0`)
|
||||
|
||||
## Automatically Build Project
|
||||
|
||||
`YukiHookAPI` provides an automated build tool that can help you quickly build an Android standard project template with Xposed Module dependencies, and use the built template to start the next step directly.
|
||||
@@ -194,18 +196,18 @@ We recommend using [SweetDependency](https://github.com/HighCapable/SweetDepende
|
||||
|
||||
#### 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"
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -215,11 +217,11 @@ 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'
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -228,6 +230,8 @@ android {
|
||||
|
||||
Since API **1.0.80**, the Java version used by Kotlin defaults to 11, and versions 1.8 and below are no longer supported.
|
||||
|
||||
Since API **1.2.0**, the Java version used by Kotlin defaults to 17, and versions 11 and below are no longer supported.
|
||||
|
||||
:::
|
||||
|
||||
### Use as Xposed Module
|
||||
|
@@ -18,6 +18,8 @@
|
||||
|
||||
- Java 11 及以上 (Since API `1.0.80`)
|
||||
|
||||
- Java 17 及以上 (Since API `1.2.0`)
|
||||
|
||||
## 自动构建项目
|
||||
|
||||
`YukiHookAPI` 提供了一个自动化构建工具,它可以帮助你快速构建一个拥有 Xposed 模块依赖的 Android 标准项目模板,使用构建好的模板即可直接开始下一步工作。
|
||||
@@ -193,18 +195,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"
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -214,11 +216,11 @@ 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'
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -227,6 +229,8 @@ android {
|
||||
|
||||
自 API **1.0.80** 版本后 Kotlin 使用的 Java 版本默认为 11,不再支持 1.8 及以下版本。
|
||||
|
||||
自 API **1.2.0** 版本后 Kotlin 使用的 Java 版本默认为 17,不再支持 11 及以下版本。
|
||||
|
||||
:::
|
||||
|
||||
### 作为 Xposed 模块使用
|
||||
|
Reference in New Issue
Block a user