Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT/#175] 컴포넌트 문서화 #179

Merged
merged 13 commits into from
Aug 16, 2024
29 changes: 29 additions & 0 deletions .github/workflows/dokka.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: TerningPoint DesignSystem CI

on:
push:
branches: [ develop ]

jobs:
docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 18
uses: actions/setup-java@v4
with:
java-version: 18
distribution: "temurin"

- name: permissions
run: chmod +x gradlew

- name: Build Documentation
run: ./gradlew dokkaHtml

- name: Deploy Documentation to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
BRANCH: gh-pages
FOLDER: core/build/dokka/html
1 change: 0 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -116,5 +116,4 @@ dependencies {

// KakaoDependencies
implementation(libs.kakao.user)

}
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ plugins {
alias(libs.plugins.android.test) apply false
alias(libs.plugins.ksp) apply false
alias(libs.plugins.kotlin.parcelize) apply false
alias(libs.plugins.dokka) apply false
}

buildscript {
Expand Down
10 changes: 10 additions & 0 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.dokka)
}

android {
Expand Down Expand Up @@ -40,6 +41,15 @@ android {
}
}

tasks.dokkaHtml.configure {
dokkaSourceSets {
named("main") {
includes.from("docs.md")
noAndroidSdkLink.set(false)
}
}
}

dependencies {
// Kotlin
implementation(libs.kotlin)
Expand Down
38 changes: 38 additions & 0 deletions core/docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Package com.terning.core.designsystem.component.bottomsheet
바텀시트가 있는 패키지입니다.

# Package com.terning.core.designsystem.component.button
버튼이 있는 패키지입니다.

# Package com.terning.core.designsystem.component.datepicker
데이트 피커가 있는 패키지입니다.

# Package com.terning.core.designsystem.component.dialog
다이얼로그가 있는 패키지입니다.

# Package com.terning.core.designsystem.component.image
contentDescription을 사용하지 않는 Image가 담긴 패키지입니다.

# Package com.terning.core.designsystem.component.item
여러 화면에서 쓰이는 아이템들이 들어있는 패키지입니다.

# Package com.terning.core.designsystem.component.textfield
텍스트 필드가 있는 패키지입니다.

# Package com.terning.core.designsystem.component.topappbar
탑바가 있는 패키지입니다.

# Package com.terning.core.designsystem.theme
<terning>의 theme가 있는 패키지입니다.

# Package com.terning.core.extension
확장함수를 모아놓은 패키지입니다.

# Package com.terning.core.navigation
네비게이션 루트가 있는 패키지입니다.

# Package com.terning.core.state
기본 상태를 나타내는 파일이 있는 패키지입니다.

# Package com.terning.core.util
여러 곳에서 유용하게 쓰이는 객체를 모아놓은 패키지입니다.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,17 @@ import com.terning.core.designsystem.theme.TerningTheme
import com.terning.core.designsystem.theme.White
import com.terning.core.util.NoRippleTheme

/**
* 기본 버튼 함수입니다.
*
* @param shape 버튼의 모양을 설정합니다.
* @param style 버튼 텍스트의 스타일을 정의합니다.
* @param paddingVertical 버튼의 위아래 패딩을 설정합니다. 패딩 값은 Dp 단위입니다.
* @param text 버튼에 표시될 텍스트입니다.
* @param onButtonClick 버튼 클릭 시 호출될 콜백 함수입니다.
* @param modifier 버튼에 적용할 Modifier입니다.
* @param isEnabled 버튼의 활성화 상태를 정의합니다.
*/
@Composable
fun TerningBasicButton(
shape: Shape,
Expand Down
6 changes: 5 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ processPhoenix = "2.0.0"
## Web
browser = "1.4.0"

## dokka
dokka = "1.9.0"

[libraries]
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "androidxCore" }
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "androidxAppCompat" }
Expand Down Expand Up @@ -182,4 +185,5 @@ kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", versi
hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" }
android-test = { id = "com.android.test", version.ref = "androidGradlePlugin" }
ksp = {id = "com.google.devtools.ksp", version.ref = "ksp"}
kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlinParcelize" }
kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlinParcelize" }
dokka = {id = "org.jetbrains.dokka", version.ref = "dokka"}
Loading