import{_ as o,r as i,o as p,c,b as n,d as s,e,a as l}from"./app-Un_zyw_U.js";const r={},t=l('

快速开始

集成 YukiReflection 到你的项目中。

环境要求

项目要求

项目需要使用 Android StudioIntelliJ IDEA 创建且类型为 Java 或 Android 项目并已集成 Kotlin 环境依赖。

集成依赖

',7),d={href:"https://github.com/HighCapable/SweetDependency",target:"_blank",rel:"noopener noreferrer"},u=l(`

SweetDependency (推荐)

在你的项目 SweetDependency 配置文件中添加存储库和依赖。

示例如下

repositories:
  # MavenCentral 有 2 小时缓存,若无法集成最新版本请添加
  sonatype-oss-releases:

libraries:
  com.highcapable.yukireflection:
    api:
      version: +
  ...

添加完成后运行一次 Gradle Sync,所有依赖版本将自动装配。

接下来,在你的项目 build.gradle.kts 中部署依赖。

示例如下

dependencies {
    implementation(com.highcapable.yukireflection.api)
    // ...
}

传统方式

在你的项目 build.gradle.ktsbuild.gradle 中添加存储库。

Kotlin DSL

repositories {
    google()
    mavenCentral()
    // MavenCentral 有 2 小时缓存,若无法集成最新版本请添加此地址
    maven { url("https://s01.oss.sonatype.org/content/repositories/releases/") }
}

Groovy DSL

repositories {
    google()
    mavenCentral()
    // MavenCentral 有 2 小时缓存,若无法集成最新版本请添加此地址
    maven { url 'https://s01.oss.sonatype.org/content/repositories/releases/' }
}

在你的项目 build.gradle.ktsbuild.gradle 中添加依赖。

Kotlin DSL

dependencies {
    implementation("com.highcapable.yukireflection:api:<yuki-version>")
    // ...
}

Groovy DSL

dependencies {
    implementation 'com.highcapable.yukireflection:api:<yuki-version>'
    // ...
}

请将 <yuki-version> 修改为 这里 的最新版本。

`,20),v={class:"custom-container danger"},A=n("p",{class:"custom-container-title"},"特别注意",-1),y={href:"https://github.com/HighCapable/YukiHookAPI",target:"_blank",rel:"noopener noreferrer"},b=n("strong",null,"YukiReflection",-1),m=n("strong",null,"YukiHookAPI",-1),D=n("strong",null,"YukiHookAPI",-1),h={href:"https://highcapable.github.io/YukiHookAPI/zh-cn/",target:"_blank",rel:"noopener noreferrer"},B=n("p",null,[n("strong",null,"YukiHookAPI"),s(" 将在 "),n("strong",null,"2.0.0"),s(" 版本完全分离 "),n("strong",null,"YukiReflection"),s(",届时你可以同时与 "),n("strong",null,"YukiHookAPI"),s(" 使用。")],-1),C=l(`

配置 Java 版本

在你的项目 build.gradle.ktsbuild.gradle 中修改 Kotlin 的 Java 版本为 17 及以上。

Kotlin DSL

android {
    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_17
        targetCompatibility = JavaVersion.VERSION_17
    }
    kotlinOptions {
        jvmTarget = "17"
    }
}

Groovy DSL

android {
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
    }
    kotlinOptions {
        jvmTarget = '17'
    }
}

注意

自 API 1.0.3 版本后 Kotlin 使用的 Java 版本默认为 17,不再支持 11 及以下版本。

`,7);function k(g,_){const a=i("ExternalLinkIcon");return p(),c("div",null,[t,n("p",null,[s("我们推荐使用 Kotlin DSL 作为 Gradle 构建脚本语言并推荐使用 "),n("a",d,[s("SweetDependency"),e(a)]),s(" 来管理依赖。")]),u,n("div",v,[A,n("p",null,[s("如果你的项目目前正在使用 "),n("a",y,[s("YukiHookAPI"),e(a)]),s(" 的 1.x.x 版本,请不要重复集成 "),b,s(",因为 "),m,s(" 已经包含了其中的功能且存在针对相关功能的改动,重复集成会造成功能性冲突引发异常,此时你应该前往 "),D,s(" 的 "),n("a",h,[s("文档"),e(a)]),s(" 查看对应的使用教程。")]),B]),C])}const x=o(r,[["render",k],["__file","quick-start.html.vue"]]);export{x as default};