import{_ as t,r as i,o as p,c,b as n,d as s,a as e,w as l,e as r}from"./app-Th5ZUiPV.js";const d={},u=r('<h1 id="快速开始" tabindex="-1"><a class="header-anchor" href="#快速开始" aria-hidden="true">#</a> 快速开始</h1><blockquote><p>集成 <code>Hikage</code> 到你的项目中。</p></blockquote><h2 id="项目要求" tabindex="-1"><a class="header-anchor" href="#项目要求" aria-hidden="true">#</a> 项目要求</h2><p>项目需要使用 <code>Android Studio</code> 或 <code>IntelliJ IDEA</code> 创建且类型为 Android 或 Kotlin Multiplatform 项目并已集成 Kotlin 环境依赖。</p>',4),h={href:"https://developer.android.com/studio",target:"_blank",rel:"noopener noreferrer"},m={href:"https://www.jetbrains.com/idea",target:"_blank",rel:"noopener noreferrer"},y=n("li",null,[n("p",null,"Kotlin 1.9.0+、Gradle 8+、Java 17+、Android Gradle Plugin 8+")],-1),v=n("h3",{id:"配置存储库",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#配置存储库","aria-hidden":"true"},"#"),s(" 配置存储库")],-1),A=n("p",null,[n("code",null,"Hikage"),s(" 的依赖发布在 "),n("strong",null,"Maven Central"),s(" 和我们的公共存储库中，你可以使用如下方式配置存储库。")],-1),b={href:"https://github.com/HighCapable/SweetDependency",target:"_blank",rel:"noopener noreferrer"},D=r(`<h4 id="sweetdependency-推荐" tabindex="-1"><a class="header-anchor" href="#sweetdependency-推荐" aria-hidden="true">#</a> SweetDependency (推荐)</h4><p>在你的项目 <code>SweetDependency</code> 配置文件中配置存储库。</p><div class="language-yaml line-numbers-mode" data-ext="yml"><pre class="shiki github-dark-dimmed" style="background-color:#22272e;" tabindex="0"><code><span class="line"><span style="color:#8DDB8C;">repositories</span><span style="color:#ADBAC7;">:</span></span>
<span class="line"><span style="color:#ADBAC7;">  </span><span style="color:#8DDB8C;">google</span><span style="color:#ADBAC7;">:</span></span>
<span class="line"><span style="color:#ADBAC7;">  </span><span style="color:#8DDB8C;">maven-central</span><span style="color:#ADBAC7;">:</span></span>
<span class="line"><span style="color:#ADBAC7;">  </span><span style="color:#768390;"># (可选) 你可以添加此 URL 以使用我们的公共存储库</span></span>
<span class="line"><span style="color:#ADBAC7;">  </span><span style="color:#768390;"># 当 Sonatype-OSS 发生故障无法发布依赖时，此存储库作为备选进行添加</span></span>
<span class="line"><span style="color:#ADBAC7;">  </span><span style="color:#768390;"># 详情请前往：https://github.com/HighCapable/maven-repository</span></span>
<span class="line"><span style="color:#ADBAC7;">  </span><span style="color:#8DDB8C;">highcapable-maven-releases</span><span style="color:#ADBAC7;">:</span></span>
<span class="line"><span style="color:#ADBAC7;">    </span><span style="color:#768390;"># 中国大陆用户请将下方的 &quot;raw.githubusercontent.com&quot; 修改为 &quot;raw.gitmirror.com&quot;</span></span>
<span class="line"><span style="color:#ADBAC7;">    </span><span style="color:#8DDB8C;">url</span><span style="color:#ADBAC7;">: </span><span style="color:#96D0FF;">https://raw.githubusercontent.com/HighCapable/maven-repository/main/repository/releases</span></span>
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h4 id="传统方式" tabindex="-1"><a class="header-anchor" href="#传统方式" aria-hidden="true">#</a> 传统方式</h4><p>在你的项目 <code>build.gradle.kts</code> 中配置存储库。</p><div class="language-kotlin line-numbers-mode" data-ext="kt"><pre class="shiki github-dark-dimmed" style="background-color:#22272e;" tabindex="0"><code><span class="line"><span style="color:#DCBDFB;">repositories</span><span style="color:#ADBAC7;"> {</span></span>
<span class="line"><span style="color:#ADBAC7;">    </span><span style="color:#DCBDFB;">google</span><span style="color:#ADBAC7;">()</span></span>
<span class="line"><span style="color:#ADBAC7;">    </span><span style="color:#DCBDFB;">mavenCentral</span><span style="color:#ADBAC7;">()</span></span>
<span class="line"><span style="color:#ADBAC7;">    </span><span style="color:#768390;">// (可选) 你可以添加此 URL 以使用我们的公共存储库</span></span>
<span class="line"><span style="color:#ADBAC7;">    </span><span style="color:#768390;">// 当 Sonatype-OSS 发生故障无法发布依赖时，此存储库作为备选进行添加</span></span>
<span class="line"><span style="color:#ADBAC7;">    </span><span style="color:#768390;">// 详情请前往：https://github.com/HighCapable/maven-repository</span></span>
<span class="line"><span style="color:#ADBAC7;">    </span><span style="color:#768390;">// 中国大陆用户请将下方的 &quot;raw.githubusercontent.com&quot; 修改为 &quot;raw.gitmirror.com&quot;</span></span>
<span class="line"><span style="color:#ADBAC7;">    </span><span style="color:#DCBDFB;">maven</span><span style="color:#ADBAC7;">(</span><span style="color:#96D0FF;">&quot;https://raw.githubusercontent.com/HighCapable/maven-repository/main/repository/releases&quot;</span><span style="color:#ADBAC7;">)</span></span>
<span class="line"><span style="color:#ADBAC7;">}</span></span>
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="配置-java-版本" tabindex="-1"><a class="header-anchor" href="#配置-java-版本" aria-hidden="true">#</a> 配置 Java 版本</h3><p>在你的项目 <code>build.gradle.kts</code> 中修改 Kotlin 的 Java 版本为 17 及以上。</p><div class="language-kotlin line-numbers-mode" data-ext="kt"><pre class="shiki github-dark-dimmed" style="background-color:#22272e;" tabindex="0"><code><span class="line"><span style="color:#DCBDFB;">android</span><span style="color:#ADBAC7;"> {</span></span>
<span class="line"><span style="color:#ADBAC7;">    </span><span style="color:#DCBDFB;">compileOptions</span><span style="color:#ADBAC7;"> {</span></span>
<span class="line"><span style="color:#ADBAC7;">        sourceCompatibility </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> JavaVersion.VERSION_17</span></span>
<span class="line"><span style="color:#ADBAC7;">        targetCompatibility </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> JavaVersion.VERSION_17</span></span>
<span class="line"><span style="color:#ADBAC7;">    }</span></span>
<span class="line"><span style="color:#ADBAC7;">    </span><span style="color:#DCBDFB;">kotlinOptions</span><span style="color:#ADBAC7;"> {</span></span>
<span class="line"><span style="color:#ADBAC7;">        jvmTarget </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">&quot;17&quot;</span></span>
<span class="line"><span style="color:#ADBAC7;">    }</span></span>
<span class="line"><span style="color:#ADBAC7;">}</span></span>
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="功能一览" tabindex="-1"><a class="header-anchor" href="#功能一览" aria-hidden="true">#</a> 功能一览</h2><p>整个项目分为多个模块，你可以选择你希望引入的模块作为依赖应用到你的项目中，但一定要包含 <strong>hikage-core</strong> 模块。</p><p>你可以点击下方对应的模块前往查看详细的功能介绍。</p>`,12),g=n("h2",{id:"demo",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#demo","aria-hidden":"true"},"#"),s(" Demo")],-1),B={href:"https://github.com/BetterAndroid/Hikage/tree/main/samples",target:"_blank",rel:"noopener noreferrer"};function C(_,k){const o=i("ExternalLinkIcon"),a=i("RouterLink");return p(),c("div",null,[u,n("ul",null,[n("li",null,[n("p",null,[s("Android Studio (建议从 "),n("a",h,[s("这里"),e(o)]),s(" 获取最新版本)")])]),n("li",null,[n("p",null,[s("IntelliJ IDEA (建议从 "),n("a",m,[s("这里"),e(o)]),s(" 获取最新版本)")])]),y]),v,A,n("p",null,[s("我们推荐使用 Kotlin DSL 作为 Gradle 构建脚本语言并推荐使用 "),n("a",b,[s("SweetDependency"),e(o)]),s(" 来管理依赖。")]),D,n("ul",null,[n("li",null,[e(a,{to:"/zh-cn/library/hikage-core.html"},{default:l(()=>[s("hikage-core")]),_:1})]),n("li",null,[e(a,{to:"/zh-cn/library/hikage-compiler.html"},{default:l(()=>[s("hikage-compiler")]),_:1})]),n("li",null,[e(a,{to:"/zh-cn/library/hikage-extension.html"},{default:l(()=>[s("hikage-extension")]),_:1})]),n("li",null,[e(a,{to:"/zh-cn/library/hikage-extension-betterandroid.html"},{default:l(()=>[s("hikage-extension-betterandroid")]),_:1})]),n("li",null,[e(a,{to:"/zh-cn/library/hikage-extension-compose.html"},{default:l(()=>[s("hikage-extension-compose")]),_:1})]),n("li",null,[e(a,{to:"/zh-cn/library/hikage-widget-androidx.html"},{default:l(()=>[s("hikage-widget-androidx")]),_:1})]),n("li",null,[e(a,{to:"/zh-cn/library/hikage-widget-material.html"},{default:l(()=>[s("hikage-widget-material")]),_:1})])]),g,n("p",null,[s("你可以在 "),n("a",B,[s("这里"),e(o)]),s(" 找到一些示例，查看对应的演示项目来更好地了解这些功能的运作方式，快速地挑选出你需要的功能。")])])}const x=t(d,[["render",C],["__file","quick-start.html.vue"]]);export{x as default};
