import{_ as i,r as o,o as p,c,a as n,b as s,d as a,w as r,e as t}from"./app-feHnNzNt.js";const d={},u=t('
集成
PanguText到你的项目中。
项目需要使用 Android Studio 或 IntelliJ IDEA 创建且类型为 Android 或 Kotlin Multiplatform 项目并已集成 Kotlin 环境依赖。
PanguText 的依赖发布在 Maven Central 和我们的公共存储库中,你可以使用如下方式配置存储库。
我们推荐使用 Kotlin DSL 作为 Gradle 构建脚本语言。
在你的项目 build.gradle.kts 中配置存储库。
repositories {
google()
mavenCentral()
// (可选) 你可以添加此 URL 以使用我们的公共存储库
// 当 Sonatype-OSS 发生故障无法发布依赖时,此存储库作为备选进行添加
// 详情请前往:https://github.com/HighCapable/maven-repository
// 中国大陆用户请将下方的 "raw.githubusercontent.com" 修改为 "raw.gitmirror.com"
maven("https://raw.githubusercontent.com/HighCapable/maven-repository/main/repository/releases")
}
在你的项目 build.gradle.kts 中修改 Kotlin 的 Java 版本为 17 及以上。
android {
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
}
整个项目分为多个模块,Android 平台与 Jetpack Compose (多平台),你可以选择你希望引入的模块作为依赖应用到你的项目中。
你可以点击下方对应的模块前往查看详细的功能介绍。
`,11),b=n("h2",{id:"demo",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#demo","aria-hidden":"true"},"#"),s(" Demo")],-1),y=n("p",null,"你可以在下方找到一些示例,查看对应的演示项目来更好地了解这些功能的运作方式,快速地挑选出你需要的功能。",-1),D={href:"https://github.com/BetterAndroid/PanguText/tree/main/demo-android",target:"_blank",rel:"noopener noreferrer"},B={href:"https://github.com/BetterAndroid/PanguText/tree/main/demo-compose",target:"_blank",rel:"noopener noreferrer"};function C(_,g){const e=o("ExternalLinkIcon"),l=o("RouterLink");return p(),c("div",null,[u,n("ul",null,[n("li",null,[n("p",null,[s("Android Studio (建议从 "),n("a",h,[s("这里"),a(e)]),s(" 获取最新版本)")])]),n("li",null,[n("p",null,[s("IntelliJ IDEA (建议从 "),n("a",m,[s("这里"),a(e)]),s(" 获取最新版本)")])]),A]),v,n("ul",null,[n("li",null,[a(l,{to:"/zh-cn/library/android.html"},{default:r(()=>[s("Android")]),_:1})]),n("li",null,[a(l,{to:"/zh-cn/library/compose.html"},{default:r(()=>[s("Jetpack Compose")]),_:1})])]),b,y,n("ul",null,[n("li",null,[n("a",D,[s("Android"),a(e)])]),n("li",null,[n("a",B,[s("Jetpack Compose (敬请期待)"),a(e)])])])])}const f=i(d,[["render",C],["__file","quick-start.html.vue"]]);export{f as default};