mirror of
https://github.com/BetterAndroid/PanguText.git
synced 2025-12-13 21:11:30 +08:00
19 lines
6.9 KiB
JavaScript
19 lines
6.9 KiB
JavaScript
import{_ as r,r as l,o as p,c,a as e,b as n,d as s,w as t,e as i}from"./app-feHnNzNt.js";const d={},u=i('<h1 id="quick-start" tabindex="-1"><a class="header-anchor" href="#quick-start" aria-hidden="true">#</a> Quick Start</h1><blockquote><p>Integrate <code>PanguText</code> into your project.</p></blockquote><h2 id="project-requirements" tabindex="-1"><a class="header-anchor" href="#project-requirements" aria-hidden="true">#</a> Project Requirements</h2><p>The project needs to be created using <code>Android Studio</code> or <code>IntelliJ IDEA</code> and be of type Android or Kotlin Multiplatform project with integrated Kotlin environment dependencies.</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"},v=e("li",null,[e("p",null,"Kotlin 1.9.0+, Gradle 8+, Java 17+, Android Gradle Plugin 8+")],-1),b=i(`<h3 id="configure-repositories" tabindex="-1"><a class="header-anchor" href="#configure-repositories" aria-hidden="true">#</a> Configure Repositories</h3><p>The dependencies of <code>PanguText</code> are published in <strong>Maven Central</strong> and our public repository. You can use the following method to configure repositories.</p><p>We recommend using Kotlin DSL as the Gradle build script language.</p><p>Configure repositories in your project's <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;">// (Optional) You can add this URL to use our public repository</span></span>
|
|
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// When Sonatype-OSS fails and cannot publish dependencies, this repository is added as a backup</span></span>
|
|
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// For details, please visit: https://github.com/HighCapable/maven-repository</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;">"https://raw.githubusercontent.com/HighCapable/maven-repository/main/repository/releases"</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></div><h3 id="configure-java-version" tabindex="-1"><a class="header-anchor" href="#configure-java-version" aria-hidden="true">#</a> Configure Java Version</h3><p>Modify the Java version of Kotlin in your project's <code>build.gradle.kts</code> to 17 or above.</p><blockquote><p>Kotlin DSL</p></blockquote><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;">"17"</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="functional-overview" tabindex="-1"><a class="header-anchor" href="#functional-overview" aria-hidden="true">#</a> Functional Overview</h2><p>The project is divided into multiple modules: Android platform and Jetpack Compose (multiplatform). You can choose the module you wish to include as a dependency in your project.</p><p>Click the corresponding module below to view detailed feature descriptions.</p>`,12),y=e("h2",{id:"demo",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#demo","aria-hidden":"true"},"#"),n(" Demo")],-1),A=e("p",null,"You can find some examples below. Check out the corresponding demo projects to get a better understanding of how these features work and quickly select the functionality you need.",-1),g={href:"https://github.com/BetterAndroid/PanguText/tree/main/demo-android",target:"_blank",rel:"noopener noreferrer"},C={href:"https://github.com/BetterAndroid/PanguText/tree/main/demo-compose",target:"_blank",rel:"noopener noreferrer"};function f(D,B){const a=l("ExternalLinkIcon"),o=l("RouterLink");return p(),c("div",null,[u,e("ul",null,[e("li",null,[e("p",null,[n("Android Studio (It is recommended to get the latest version from "),e("a",h,[n("here"),s(a)]),n(")")])]),e("li",null,[e("p",null,[n("IntelliJ IDEA (It is recommended to get the latest version from "),e("a",m,[n("here"),s(a)]),n(")")])]),v]),b,e("ul",null,[e("li",null,[s(o,{to:"/en/library/android.html"},{default:t(()=>[n("Android")]),_:1})]),e("li",null,[s(o,{to:"/en/library/compose.html"},{default:t(()=>[n("Jetpack Compose")]),_:1})])]),y,A,e("ul",null,[e("li",null,[e("a",g,[n("Android"),s(a)])]),e("li",null,[e("a",C,[n("Jetpack Compose (Coming soon)"),s(a)])])])])}const k=r(d,[["render",f],["__file","quick-start.html.vue"]]);export{k as default};
|