Skip to content

Commit

Permalink
Merge pull request #64 from Toongether/release-0.2
Browse files Browse the repository at this point in the history
[Release] 툰게더 0.2.0 배포하기
  • Loading branch information
SeokgyuYun authored Sep 16, 2023
2 parents fc3b3df + 0e6b2ef commit e8590cf
Show file tree
Hide file tree
Showing 208 changed files with 7,562 additions and 1,048 deletions.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
# toongether-android
# 툰게더 Android
![Toongether](https://hosting.toongether.kr/github-thumbnail.png)

작가에게는 연재의 기회를, 독자에게는 다양한 재미를 제공하는 `툰게더`는 팀 프로그래스에서 개발하는 `웹툰 자유 연재 서비스`입니다.

## 🪶 :: 주요 서비스 기능
- 웹툰 작품 열람
- 웹툰 요일별 연재 및 관리
- 단편 웹툰 게시
- 작가 중심의 커뮤니티

현재 `프리 릴리즈` 상태로, 사용자들의 피드백을 기반으로 기능을 개선 및 추가해나갈 계획입니다.

## 📝 :: 상세 기술 스택
- Environment: `Android Studio`, `Kotlin`
- App: `Jetpack Compose`, `Hilt`, `DataStore`, `Retrofit`, `Coroutine`, `OrbitMVI`, `Kotlin Serialization`
- Architecture: `MVI`
25 changes: 5 additions & 20 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@ plugins {
id("toongether.android.application")
id("toongether.android.application.compose")
id("toongether.android.hilt")
id("toongether.kotlin.code")
}

android {
namespace = "kr.toongether.android"

defaultConfig {
applicationId = "kr.toongether.android"
versionCode = 1
versionName = "0.1"
versionCode = 2
versionName = "0.2.0"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand All @@ -37,27 +36,13 @@ android {

dependencies {

implementation(libs.core.ktx)
implementation(libs.lifecycle.runtime.ktx)
implementation(libs.activity.compose)
implementation(libs.ui)
implementation(libs.ui.graphics)
implementation(libs.ui.tooling.preview)
implementation(libs.material3)
implementation(libs.androidx.navigation.compose)
implementation(libs.navigation.animation)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.test.ext.junit)
androidTestImplementation(libs.espresso.core)
androidTestImplementation(libs.ui.test.junit4)
debugImplementation(libs.ui.tooling)
debugImplementation(libs.ui.test.manifest)

implementation(project(":core:designsystem"))
implementation(project(":feature:home"))
implementation(project(":feature:series"))
implementation(project(":feature:shorts"))
implementation(project(":feature:community"))
implementation(project(":feature:my"))
implementation(project(":feature:comic"))
implementation(project(":feature:auth:login"))
implementation(project(":feature:auth:signup"))
implementation(project(":feature:episode"))
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import androidx.annotation.StringRes
import androidx.compose.ui.graphics.vector.ImageVector
import kr.toongether.android.R
import kr.toongether.designsystem.icon.ToongetherIcons
import kr.toongether.designsystem.icon.icons.Community
import kr.toongether.designsystem.icon.icons.Home
import kr.toongether.designsystem.icon.icons.My
import kr.toongether.designsystem.icon.icons.Series
Expand All @@ -26,10 +25,6 @@ enum class NavigationDestination(
icon = ToongetherIcons.Shorts,
iconTextId = R.string.shorts
),
COMMUNITY(
icon = ToongetherIcons.Community,
iconTextId = R.string.community
),
MY(
icon = ToongetherIcons.My,
iconTextId = R.string.my
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,25 @@ package kr.toongether.android.navigation
import androidx.compose.animation.ExperimentalAnimationApi
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.navigation.compose.navigation
import com.google.accompanist.navigation.animation.AnimatedNavHost
import kr.toongether.android.ui.ToongetherAppState
import kr.toongether.comic.navigation.comicScreen
import kr.toongether.community.navigation.communityScreen
import kr.toongether.episode.navigatoin.episodeScreen
import kr.toongether.home.navigation.HomeRoute
import kr.toongether.home.navigation.homeScreen
import kr.toongether.login.navigation.loginScreen
import kr.toongether.my.navigation.myScreen
import kr.toongether.my.navigation.settingScreen
import kr.toongether.series.navigation.seriesScreen
import kr.toongether.shorts.navigation.ShortsRoute
import kr.toongether.shorts.navigation.shortsScreen
import kr.toongether.signup.navigation.signupScreen

@OptIn(ExperimentalAnimationApi::class)
@Composable
fun ToongetherNavHost(
appState: ToongetherAppState,
modifier: Modifier = Modifier,
startDestination: String = ShortsRoute
startDestination: String = HomeRoute
) {
val navController = appState.navController

Expand All @@ -29,10 +31,13 @@ fun ToongetherNavHost(
modifier = modifier
) {
homeScreen()
seriesScreen()
seriesScreen(navController)
shortsScreen(navController)
communityScreen()
myScreen()
myScreen(navController)
comicScreen(navController)
loginScreen(navController)
signupScreen(navController)
episodeScreen(navController)
settingScreen(navController)
}
}
4 changes: 1 addition & 3 deletions app/src/main/java/kr/toongether/android/ui/ToongetherApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Surface
Expand All @@ -26,7 +25,6 @@ import kr.toongether.designsystem.component.ToongetherNavigationBarItem
import kr.toongether.designsystem.theme.Gray
import kr.toongether.designsystem.theme.pretendard

@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun ToongetherApp(
appState: ToongetherAppState = rememberToongetherAppState()
Expand All @@ -49,7 +47,7 @@ fun ToongetherApp(
Modifier
.fillMaxSize()
.background(Color.Black)
.padding(paddingValues)
.padding(bottom = paddingValues.calculateBottomPadding())
} else {
Modifier
.fillMaxSize()
Expand Down
11 changes: 6 additions & 5 deletions app/src/main/java/kr/toongether/android/ui/ToongetherAppState.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ import androidx.navigation.compose.currentBackStackEntryAsState
import androidx.navigation.navOptions
import com.google.accompanist.navigation.animation.rememberAnimatedNavController
import kr.toongether.android.navigation.NavigationDestination
import kr.toongether.comic.navigation.ComicRoute
import kr.toongether.community.navigation.navigateToCommunity
import kr.toongether.home.navigation.HomeRoute
import kr.toongether.home.navigation.navigateToHome
import kr.toongether.my.navigation.MyRoute
import kr.toongether.my.navigation.navigateToMy
import kr.toongether.series.navigation.SeriesRoute
import kr.toongether.series.navigation.navigateToSeries
import kr.toongether.shorts.navigation.ShortsRoute
import kr.toongether.shorts.navigation.navigateToShorts

@OptIn(ExperimentalAnimationApi::class)
Expand All @@ -40,8 +42,8 @@ class ToongetherAppState(

val isShowBottomBar: Boolean
@Composable get() = when (currentDestination?.route) {
ComicRoute -> false
else -> true
HomeRoute, SeriesRoute, ShortsRoute, MyRoute -> true
else -> false
}

fun navigateToNavigationDestination(navigationDestination: NavigationDestination) {
Expand All @@ -57,7 +59,6 @@ class ToongetherAppState(
NavigationDestination.HOME -> navController.navigateToHome(navOptions)
NavigationDestination.SERIES -> navController.navigateToSeries(navOptions)
NavigationDestination.SHORTS -> navController.navigateToShorts(navOptions)
NavigationDestination.COMMUNITY -> navController.navigateToCommunity(navOptions)
NavigationDestination.MY -> navController.navigateToMy(navOptions)
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<string name="series">연재</string>
<string name="shorts">단편</string>
<string name="community">커뮤니티</string>
<string name="my">마이</string>
<string name="my">MY</string>
<string name="title_series">연재 웹툰</string>
<string name="title_shorts">단편 웹툰</string>
<string name="title_my">마이 페이지</string>
Expand Down
8 changes: 8 additions & 0 deletions build-logic/convention/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,13 @@ gradlePlugin {
id = "toongether.kotlin.code"
implementationClass = "KotlinCodeConventionPlugin"
}
register("") {
id = "toongether.kotlin.code"
implementationClass = "KotlinCodeConventionPlugin"
}
register("androidFeature") {
id = "toongether.android.feature"
implementationClass = "AndroidFeatureConventionPlugin"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ import org.gradle.kotlin.dsl.getByType
class AndroidApplicationComposeConventionPlugin : Plugin<Project> {
override fun apply(target: Project) {
with(target) {
pluginManager.apply("com.android.application")
with(pluginManager) {
apply("com.android.application")
apply("toongether.kotlin.code")
}
val extension = extensions.getByType<ApplicationExtension>()

configureAndroidCompose(extension)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class AndroidApplicationConventionPlugin : Plugin<Project> {
with(pluginManager) {
apply("com.android.application")
apply("org.jetbrains.kotlin.android")
apply("toongether.kotlin.code")
}

extensions.configure<ApplicationExtension> {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import com.android.build.gradle.LibraryExtension
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.artifacts.VersionCatalogsExtension
import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.dependencies
import org.gradle.kotlin.dsl.getByType
import org.gradle.kotlin.dsl.kotlin

class AndroidFeatureConventionPlugin : Plugin<Project> {
override fun apply(target: Project) {
with(target) {
pluginManager.apply {
apply("toongether.android.library")
apply("toongether.android.hilt")
apply("toongether.kotlin.code")
}
extensions.configure<LibraryExtension> {
defaultConfig {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
}

val libs = extensions.getByType<VersionCatalogsExtension>().named("libs")

dependencies {
add("implementation", project(":core:model"))
add("implementation", project(":core:ui"))
add("implementation", project(":core:designsystem"))
add("implementation", project(":core:data"))
add("implementation", project(":core:domain"))

add("testImplementation", kotlin("test"))
add("androidTestImplementation", kotlin("test"))

add("implementation", libs.findLibrary("androidx.hilt.navigation.compose").get())
add("implementation", libs.findLibrary("androidx.lifecycle.runtimeCompose").get())
add("implementation", libs.findLibrary("androidx.lifecycle.viewModelCompose").get())
add("implementation", libs.findLibrary("orbit.mvi.viewmodel").get())
add("implementation", libs.findLibrary("orbit.mvi.compose").get())

add("implementation", libs.findLibrary("kotlinx.coroutines.android").get())

add("testImplementation", libs.findLibrary("junit4").get())
add("androidTestImplementation", libs.findLibrary("androidx.test.runner").get())
add("androidTestImplementation", libs.findLibrary("androidx.test.espresso.core").get())
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,21 @@ import com.android.build.gradle.LibraryExtension
import kr.toongether.android.configureAndroidCompose
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.artifacts.VersionCatalogsExtension
import org.gradle.kotlin.dsl.dependencies
import org.gradle.kotlin.dsl.getByType
import org.gradle.kotlin.dsl.kotlin

class AndroidLibraryComposeConventionPlugin : Plugin<Project> {
override fun apply(target: Project) {
with(target) {
pluginManager.apply("com.android.library")
with(pluginManager) {
apply("com.android.library")
apply("toongether.kotlin.code")
}
val extension = extensions.getByType<LibraryExtension>()
configureAndroidCompose(extension)

}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,24 @@ class AndroidLibraryConventionPlugin : Plugin<Project> {
with(pluginManager) {
apply("com.android.library")
apply("org.jetbrains.kotlin.android")
apply("toongether.kotlin.code")
}

extensions.configure<LibraryExtension> {
configureKotlinAndroid(this)
defaultConfig.targetSdk = 33
}

val libs = extensions.getByType<VersionCatalogsExtension>().named("libs")
configurations.configureEach {
resolutionStrategy {
force(libs.findLibrary("junit4").get())
}
}
dependencies {
add("androidTestImplementation", kotlin("test"))
add("testImplementation", kotlin("test"))
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,18 @@ internal fun Project.configureAndroidCompose(
}

dependencies {
val bom = libs.findLibrary("compose-bom").get()
val bom = libs.findLibrary("androidx-compose-bom").get()
add("implementation", platform(bom))
add("androidTestImplementation", platform(bom))

add("implementation", libs.findLibrary("androidx.compose.material3").get())
add("implementation", libs.findLibrary("androidx.compose.material").get())
add("implementation", libs.findLibrary("androidx.navigation.compose").get())
add("implementation", libs.findLibrary("navigation.animation").get())

add("androidTestImplementation", libs.findLibrary("androidx.test.espresso.core").get())
add("androidTestImplementation", libs.findLibrary("androidx.test.runner").get())
add("androidTestImplementation", libs.findLibrary("androidx.test.ext").get())
}
}

Expand Down
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ plugins {
alias(libs.plugins.detekt) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.serialization) apply false
}
6 changes: 5 additions & 1 deletion core/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@ plugins {

android {
namespace = "kr.toongether.common"
}

}
dependencies {
implementation(libs.retrofit.core)
implementation(libs.kotlinx.datetime)
}
Loading

0 comments on commit e8590cf

Please sign in to comment.