-
Notifications
You must be signed in to change notification settings - Fork 1
[Feature/#1] 프로젝트 멀티모듈 환경 구축 #2
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
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
5538cf9
Init: 버전 카탈로그 정의
wjdrjs00 3d1b0ec
Init: data 모듈 생성
wjdrjs00 58eeb45
Init: domain 모듈 생성
wjdrjs00 ffe4cba
Init: presentation 모듈 생성
wjdrjs00 11f040e
Init: core 모듈 생성
wjdrjs00 b287522
Init: build-logic 모듈 생성
wjdrjs00 c8da5b5
Feat: Convention 플러그인 설정
wjdrjs00 7a683d6
Refactor: Gradle 빌드 스크립트 모듈별 의존성 분리
wjdrjs00 c89a35b
Feat: application 클래스 생성
wjdrjs00 bbc1c33
Refactor: app 모듈의 theme 관련 코드 designsystem 모듈로 이전
wjdrjs00 220ef75
Ui: 기본 화면 추가 및 네비게이션 설정
wjdrjs00 6ede6a5
Chore: app name 변경 및 권한 설정
wjdrjs00 6c84744
Chore: data 모듈 namespace 수정
wjdrjs00 7606ff4
Refactor: `MainNavigator` 생성 위치 변경
wjdrjs00 424ce9a
Chore: @Serializable 어노테이션 추가
wjdrjs00 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,59 +1,22 @@ | ||
| plugins { | ||
| alias(libs.plugins.android.application) | ||
| alias(libs.plugins.kotlin.android) | ||
| alias(libs.plugins.kotlin.compose) | ||
| alias(libs.plugins.bitnagil.android.application) | ||
| alias(libs.plugins.bitnagil.android.hilt) | ||
| alias(libs.plugins.kotlin.serialization) | ||
| } | ||
|
|
||
| android { | ||
| namespace = "com.threegap.bitnagil" | ||
| compileSdk = 35 | ||
|
|
||
| defaultConfig { | ||
| applicationId = "com.threegap.bitnagil" | ||
| minSdk = 28 | ||
| targetSdk = 35 | ||
| versionCode = 1 | ||
| versionName = "1.0" | ||
|
|
||
| testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
| } | ||
|
|
||
| buildTypes { | ||
| release { | ||
| isMinifyEnabled = false | ||
| proguardFiles( | ||
| getDefaultProguardFile("proguard-android-optimize.txt"), | ||
| "proguard-rules.pro", | ||
| ) | ||
| } | ||
| } | ||
| compileOptions { | ||
| sourceCompatibility = JavaVersion.VERSION_11 | ||
| targetCompatibility = JavaVersion.VERSION_11 | ||
| } | ||
| kotlinOptions { | ||
| jvmTarget = "11" | ||
| } | ||
| buildFeatures { | ||
| compose = true | ||
| } | ||
| } | ||
|
|
||
| dependencies { | ||
|
|
||
| implementation(libs.androidx.core.ktx) | ||
| implementation(libs.androidx.lifecycle.runtime.ktx) | ||
| implementation(libs.androidx.activity.compose) | ||
| implementation(platform(libs.androidx.compose.bom)) | ||
| implementation(libs.androidx.ui) | ||
| implementation(libs.androidx.ui.graphics) | ||
| implementation(libs.androidx.ui.tooling.preview) | ||
| implementation(libs.androidx.material3) | ||
| testImplementation(libs.junit) | ||
| androidTestImplementation(libs.androidx.junit) | ||
| androidTestImplementation(libs.androidx.espresso.core) | ||
| androidTestImplementation(platform(libs.androidx.compose.bom)) | ||
| androidTestImplementation(libs.androidx.ui.test.junit4) | ||
| debugImplementation(libs.androidx.ui.tooling) | ||
| debugImplementation(libs.androidx.ui.test.manifest) | ||
| implementation(projects.core.datastore) | ||
| implementation(projects.core.designsystem) | ||
| implementation(projects.core.network) | ||
| implementation(projects.data) | ||
| implementation(projects.domain) | ||
| implementation(projects.presentation) | ||
| } |
22 changes: 0 additions & 22 deletions
22
app/src/androidTest/java/com/threegap/bitnagil/ExampleInstrumentedTest.kt
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
app/src/main/java/com/threegap/bitnagil/BitnagilApplication.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| package com.threegap.bitnagil | ||
|
|
||
| import android.app.Application | ||
| import dagger.hilt.android.HiltAndroidApp | ||
|
|
||
| @HiltAndroidApp | ||
| class BitnagilApplication : Application() { | ||
| override fun onCreate() { | ||
| super.onCreate() | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| package com.threegap.bitnagil | ||
|
|
||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.ui.Modifier | ||
| import androidx.navigation.compose.NavHost | ||
| import androidx.navigation.compose.composable | ||
| import com.threegap.bitnagil.presentation.home.HomeScreen | ||
| import com.threegap.bitnagil.presentation.login.LoginScreen | ||
|
|
||
| @Composable | ||
| fun MainNavHost( | ||
| navigator: MainNavigator, | ||
| modifier: Modifier = Modifier, | ||
| ) { | ||
| NavHost( | ||
| navController = navigator.navController, | ||
| startDestination = navigator.startDestination, | ||
| modifier = modifier, | ||
| ) { | ||
| composable<Route.Login> { | ||
| LoginScreen( | ||
| onLoginClick = { navigator.navController.navigate(Route.Home) }, | ||
| ) | ||
| } | ||
|
|
||
| composable<Route.Home> { | ||
| HomeScreen() | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| package com.threegap.bitnagil | ||
|
|
||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.runtime.remember | ||
| import androidx.navigation.NavHostController | ||
| import androidx.navigation.compose.rememberNavController | ||
|
|
||
| class MainNavigator( | ||
| val navController: NavHostController, | ||
| ) { | ||
| val startDestination = Route.Login | ||
| } | ||
|
|
||
| @Composable | ||
| fun rememberMainNavigator(navController: NavHostController = rememberNavController()): MainNavigator = | ||
| remember(navController) { | ||
| MainNavigator(navController) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| package com.threegap.bitnagil | ||
|
|
||
| import androidx.compose.foundation.layout.fillMaxSize | ||
| import androidx.compose.foundation.layout.padding | ||
| import androidx.compose.material3.Scaffold | ||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.ui.Modifier | ||
|
|
||
| @Composable | ||
| fun MainScreen( | ||
| navigator: MainNavigator, | ||
| modifier: Modifier = Modifier, | ||
| ) { | ||
| Scaffold( | ||
| modifier = modifier.fillMaxSize(), | ||
| ) { innerPadding -> | ||
| MainNavHost( | ||
| navigator = navigator, | ||
| modifier = Modifier.padding(innerPadding), | ||
| ) | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| package com.threegap.bitnagil | ||
|
|
||
| import kotlinx.serialization.Serializable | ||
|
|
||
| @Serializable | ||
| sealed interface Route { | ||
| @Serializable | ||
| data object Login : Route | ||
|
|
||
| @Serializable | ||
| data object Home : Route | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| <resources> | ||
| <string name="app_name">Bitnagil</string> | ||
| <string name="app_name">빛나길</string> | ||
| </resources> |
16 changes: 0 additions & 16 deletions
16
app/src/test/java/com/threegap/bitnagil/ExampleUnitTest.kt
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| /build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| plugins { | ||
| `kotlin-dsl` | ||
| } | ||
|
|
||
| group = "com.threegap.bitnagil.convention" | ||
|
|
||
| java { | ||
| toolchain { | ||
| languageVersion.set(JavaLanguageVersion.of(17)) | ||
| } | ||
| } | ||
|
|
||
| kotlin { | ||
| jvmToolchain(17) | ||
| } | ||
|
|
||
| dependencies { | ||
| compileOnly(libs.android.gradle.plugin) | ||
| compileOnly(libs.kotlin.gradle.plugin) | ||
| compileOnly(libs.compose.compiler.gradle.plugin) | ||
| } | ||
|
l5x5l marked this conversation as resolved.
|
||
|
|
||
| gradlePlugin { | ||
| plugins { | ||
| register("androidApplication") { | ||
| id = "bitnagil.android.application" | ||
| implementationClass = "com.threegap.bitnagil.convention.AndroidApplicationPlugin" | ||
| } | ||
|
|
||
| register("androidLibrary") { | ||
| id = "bitnagil.android.library" | ||
| implementationClass = "com.threegap.bitnagil.convention.AndroidLibraryPlugin" | ||
| } | ||
|
|
||
| register("androidComposeLibrary") { | ||
| id = "bitnagil.android.compose.library" | ||
| implementationClass = "com.threegap.bitnagil.convention.AndroidComposePlugin" | ||
| } | ||
|
|
||
| register("androidHilt") { | ||
| id = "bitnagil.android.hilt" | ||
| implementationClass = "com.threegap.bitnagil.convention.HiltPlugin" | ||
| } | ||
|
|
||
| register("kotlin") { | ||
| id = "bitnagil.kotlin" | ||
| implementationClass = "com.threegap.bitnagil.convention.KotlinJvmPlugin" | ||
| } | ||
| } | ||
| } | ||
31 changes: 31 additions & 0 deletions
31
...gic/convention/src/main/java/com/threegap/bitnagil/convention/AndroidApplicationPlugin.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| package com.threegap.bitnagil.convention | ||
|
|
||
| import com.android.build.api.dsl.ApplicationExtension | ||
| import com.threegap.bitnagil.convention.extension.configureComposeAndroid | ||
| import com.threegap.bitnagil.convention.extension.configureKotlinAndroid | ||
| import org.gradle.api.Plugin | ||
| import org.gradle.api.Project | ||
| import org.gradle.api.artifacts.VersionCatalogsExtension | ||
| import org.gradle.kotlin.dsl.getByType | ||
| import org.gradle.kotlin.dsl.configure | ||
|
|
||
| class AndroidApplicationPlugin : Plugin<Project> { | ||
| override fun apply(target: Project): Unit = with(target) { | ||
| pluginManager.apply { | ||
| apply("com.android.application") | ||
| apply("org.jetbrains.kotlin.android") | ||
| apply("org.jetbrains.kotlin.plugin.compose") | ||
| } | ||
|
|
||
| val libs = extensions.getByType<VersionCatalogsExtension>().named("libs") | ||
| extensions.configure<ApplicationExtension> { | ||
| configureKotlinAndroid(this) | ||
| configureComposeAndroid(this) | ||
| with(defaultConfig) { | ||
| targetSdk = libs.findVersion("targetSdk").get().requiredVersion.toInt() | ||
| versionCode = libs.findVersion("versionCode").get().requiredVersion.toInt() | ||
| versionName = libs.findVersion("versionName").get().requiredVersion | ||
| } | ||
| } | ||
| } | ||
| } |
19 changes: 19 additions & 0 deletions
19
...d-logic/convention/src/main/java/com/threegap/bitnagil/convention/AndroidComposePlugin.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| package com.threegap.bitnagil.convention | ||
|
|
||
| import com.android.build.gradle.LibraryExtension | ||
| import com.threegap.bitnagil.convention.extension.configureComposeAndroid | ||
| import org.gradle.api.Plugin | ||
| import org.gradle.api.Project | ||
| import org.gradle.kotlin.dsl.configure | ||
|
|
||
| class AndroidComposePlugin : Plugin<Project> { | ||
| override fun apply(target: Project): Unit = with(target) { | ||
| pluginManager.apply { | ||
| apply("org.jetbrains.kotlin.plugin.compose") | ||
| } | ||
|
|
||
| extensions.configure<LibraryExtension> { | ||
| configureComposeAndroid(this) | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.