diff --git a/app/build.gradle.kts b/app/build.gradle.kts index dd88a19a..aa69bd50 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -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) } diff --git a/app/src/androidTest/java/com/threegap/bitnagil/ExampleInstrumentedTest.kt b/app/src/androidTest/java/com/threegap/bitnagil/ExampleInstrumentedTest.kt deleted file mode 100644 index bc5d327f..00000000 --- a/app/src/androidTest/java/com/threegap/bitnagil/ExampleInstrumentedTest.kt +++ /dev/null @@ -1,22 +0,0 @@ -package com.threegap.bitnagil - -import androidx.test.ext.junit.runners.AndroidJUnit4 -import androidx.test.platform.app.InstrumentationRegistry -import org.junit.Assert.assertEquals -import org.junit.Test -import org.junit.runner.RunWith - -/** - * Instrumented test, which will execute on an Android device. - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -@RunWith(AndroidJUnit4::class) -class ExampleInstrumentedTest { - @Test - fun useAppContext() { - // Context of the app under test. - val appContext = InstrumentationRegistry.getInstrumentation().targetContext - assertEquals("com.threegap.bitnagil", appContext.packageName) - } -} diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index d6c0fc2e..2e5d6cea 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -2,7 +2,10 @@ + + - Greeting( - name = "Android", - modifier = Modifier.padding(innerPadding), - ) - } + MainScreen( + navigator = mainNavigator, + ) } } } } - -@Composable -fun Greeting( - name: String, - modifier: Modifier = Modifier, -) { - Text( - text = "Hello $name!", - modifier = modifier, - ) -} - -@Preview(showBackground = true) -@Composable -fun GreetingPreview() { - BitnagilTheme { - Greeting("Android") - } -} diff --git a/app/src/main/java/com/threegap/bitnagil/MainNavHost.kt b/app/src/main/java/com/threegap/bitnagil/MainNavHost.kt new file mode 100644 index 00000000..a9f96acc --- /dev/null +++ b/app/src/main/java/com/threegap/bitnagil/MainNavHost.kt @@ -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 { + LoginScreen( + onLoginClick = { navigator.navController.navigate(Route.Home) }, + ) + } + + composable { + HomeScreen() + } + } +} diff --git a/app/src/main/java/com/threegap/bitnagil/MainNavigator.kt b/app/src/main/java/com/threegap/bitnagil/MainNavigator.kt new file mode 100644 index 00000000..efd9f459 --- /dev/null +++ b/app/src/main/java/com/threegap/bitnagil/MainNavigator.kt @@ -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) + } diff --git a/app/src/main/java/com/threegap/bitnagil/MainScreen.kt b/app/src/main/java/com/threegap/bitnagil/MainScreen.kt new file mode 100644 index 00000000..9793f010 --- /dev/null +++ b/app/src/main/java/com/threegap/bitnagil/MainScreen.kt @@ -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), + ) + } +} diff --git a/app/src/main/java/com/threegap/bitnagil/Route.kt b/app/src/main/java/com/threegap/bitnagil/Route.kt new file mode 100644 index 00000000..9ba31063 --- /dev/null +++ b/app/src/main/java/com/threegap/bitnagil/Route.kt @@ -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 +} diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 84ac9a81..eecd23b5 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,3 +1,3 @@ - Bitnagil + 빛나길 diff --git a/app/src/test/java/com/threegap/bitnagil/ExampleUnitTest.kt b/app/src/test/java/com/threegap/bitnagil/ExampleUnitTest.kt deleted file mode 100644 index 3fd01a66..00000000 --- a/app/src/test/java/com/threegap/bitnagil/ExampleUnitTest.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.threegap.bitnagil - -import org.junit.Assert.assertEquals -import org.junit.Test - -/** - * Example local unit test, which will execute on the development machine (host). - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -class ExampleUnitTest { - @Test - fun addition_isCorrect() { - assertEquals(4, 2 + 2) - } -} diff --git a/build-logic/convention/.gitignore b/build-logic/convention/.gitignore new file mode 100644 index 00000000..42afabfd --- /dev/null +++ b/build-logic/convention/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/build-logic/convention/build.gradle.kts b/build-logic/convention/build.gradle.kts new file mode 100644 index 00000000..440de1fb --- /dev/null +++ b/build-logic/convention/build.gradle.kts @@ -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) +} + +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" + } + } +} diff --git a/build-logic/convention/src/main/java/com/threegap/bitnagil/convention/AndroidApplicationPlugin.kt b/build-logic/convention/src/main/java/com/threegap/bitnagil/convention/AndroidApplicationPlugin.kt new file mode 100644 index 00000000..60a3e7eb --- /dev/null +++ b/build-logic/convention/src/main/java/com/threegap/bitnagil/convention/AndroidApplicationPlugin.kt @@ -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 { + 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().named("libs") + extensions.configure { + 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 + } + } + } +} diff --git a/build-logic/convention/src/main/java/com/threegap/bitnagil/convention/AndroidComposePlugin.kt b/build-logic/convention/src/main/java/com/threegap/bitnagil/convention/AndroidComposePlugin.kt new file mode 100644 index 00000000..a68c09c6 --- /dev/null +++ b/build-logic/convention/src/main/java/com/threegap/bitnagil/convention/AndroidComposePlugin.kt @@ -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 { + override fun apply(target: Project): Unit = with(target) { + pluginManager.apply { + apply("org.jetbrains.kotlin.plugin.compose") + } + + extensions.configure { + configureComposeAndroid(this) + } + } +} diff --git a/build-logic/convention/src/main/java/com/threegap/bitnagil/convention/AndroidLibraryPlugin.kt b/build-logic/convention/src/main/java/com/threegap/bitnagil/convention/AndroidLibraryPlugin.kt new file mode 100644 index 00000000..3f40ef0d --- /dev/null +++ b/build-logic/convention/src/main/java/com/threegap/bitnagil/convention/AndroidLibraryPlugin.kt @@ -0,0 +1,22 @@ +package com.threegap.bitnagil.convention + +import com.android.build.gradle.LibraryExtension +import com.threegap.bitnagil.convention.extension.configureKotlinAndroid +import com.threegap.bitnagil.convention.extension.configureKotlinCoroutine +import org.gradle.api.Plugin +import org.gradle.api.Project +import org.gradle.kotlin.dsl.configure + +class AndroidLibraryPlugin : Plugin { + override fun apply(target: Project): Unit = with(target) { + pluginManager.apply { + apply("com.android.library") + apply("org.jetbrains.kotlin.android") + } + + extensions.configure { + configureKotlinAndroid(this) + configureKotlinCoroutine(this) + } + } +} diff --git a/build-logic/convention/src/main/java/com/threegap/bitnagil/convention/HiltPlugin.kt b/build-logic/convention/src/main/java/com/threegap/bitnagil/convention/HiltPlugin.kt new file mode 100644 index 00000000..7cfb8942 --- /dev/null +++ b/build-logic/convention/src/main/java/com/threegap/bitnagil/convention/HiltPlugin.kt @@ -0,0 +1,22 @@ +package com.threegap.bitnagil.convention + +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 + +class HiltPlugin : Plugin { + override fun apply(target: Project): Unit = with(target) { + pluginManager.apply { + apply("dagger.hilt.android.plugin") + apply("com.google.devtools.ksp") + } + + val libs = extensions.getByType().named("libs") + dependencies { + "implementation"(libs.findLibrary("hilt.android").get()) + "ksp"(libs.findLibrary("hilt.compiler").get()) + } + } +} diff --git a/build-logic/convention/src/main/java/com/threegap/bitnagil/convention/KotlinJvmPlugin.kt b/build-logic/convention/src/main/java/com/threegap/bitnagil/convention/KotlinJvmPlugin.kt new file mode 100644 index 00000000..7308a7f1 --- /dev/null +++ b/build-logic/convention/src/main/java/com/threegap/bitnagil/convention/KotlinJvmPlugin.kt @@ -0,0 +1,28 @@ +package com.threegap.bitnagil.convention + +import org.gradle.api.JavaVersion +import org.gradle.api.Plugin +import org.gradle.api.Project +import org.gradle.api.plugins.JavaPluginExtension +import org.gradle.kotlin.dsl.configure +import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension + +class KotlinJvmPlugin : Plugin { + override fun apply(target: Project): Unit = with(target) { + with(target) { + pluginManager.apply { + apply("java-library") + apply("org.jetbrains.kotlin.jvm") + } + } + + extensions.configure { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + + extensions.configure { + jvmToolchain(17) + } + } +} diff --git a/build-logic/convention/src/main/java/com/threegap/bitnagil/convention/extension/ComposeAndroid.kt b/build-logic/convention/src/main/java/com/threegap/bitnagil/convention/extension/ComposeAndroid.kt new file mode 100644 index 00000000..71d62325 --- /dev/null +++ b/build-logic/convention/src/main/java/com/threegap/bitnagil/convention/extension/ComposeAndroid.kt @@ -0,0 +1,29 @@ +package com.threegap.bitnagil.convention.extension + +import com.android.build.api.dsl.CommonExtension +import org.gradle.api.Project +import org.gradle.api.artifacts.VersionCatalogsExtension +import org.gradle.kotlin.dsl.getByType +import org.gradle.kotlin.dsl.dependencies +import org.jetbrains.kotlin.compose.compiler.gradle.ComposeCompilerGradlePluginExtension + +internal fun Project.configureComposeAndroid(commonExtension: CommonExtension<*, *, *, *, *, *>) { + val libs = extensions.getByType().named("libs") + + commonExtension.apply { + buildFeatures { + compose = true + } + + extensions.getByType().apply { + includeSourceInformation.set(true) + } + + dependencies { + "implementation"(platform(libs.findLibrary("compose.bom").get())) + "implementation"(libs.findBundle("compose").get()) + "implementation"(libs.findBundle("compose.lifecycle").get()) + "debugImplementation"(libs.findBundle("compose.debug").get()) + } + } +} diff --git a/build-logic/convention/src/main/java/com/threegap/bitnagil/convention/extension/KotlinAndroid.kt b/build-logic/convention/src/main/java/com/threegap/bitnagil/convention/extension/KotlinAndroid.kt new file mode 100644 index 00000000..5cf17dc0 --- /dev/null +++ b/build-logic/convention/src/main/java/com/threegap/bitnagil/convention/extension/KotlinAndroid.kt @@ -0,0 +1,64 @@ +package com.threegap.bitnagil.convention.extension + +import com.android.build.api.dsl.CommonExtension +import org.gradle.api.JavaVersion +import org.gradle.api.Project +import org.gradle.api.artifacts.VersionCatalogsExtension +import org.gradle.kotlin.dsl.getByType +import org.gradle.kotlin.dsl.withType +import org.gradle.kotlin.dsl.provideDelegate +import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + +internal fun Project.configureKotlinAndroid(commonExtension: CommonExtension<*, *, *, *, *, *>) { + val libs = extensions.getByType().named("libs") + + commonExtension.apply { + compileSdk = libs.findVersion("compileSdk").get().requiredVersion.toInt() + + defaultConfig { + minSdk = libs.findVersion("minSdk").get().requiredVersion.toInt() + vectorDrawables.useSupportLibrary = true + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + + buildTypes { + getByName("debug") { + isMinifyEnabled = false + } + + getByName("release") { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + + packaging { + resources { + excludes.add("META-INF/AL2.0") + excludes.add("META-INF/LGPL2.1") + } + } + + tasks.withType().configureEach { + compilerOptions { + jvmTarget.set(JvmTarget.JVM_17) + + val warningsAsErrors: String? by project + allWarningsAsErrors.set(warningsAsErrors.toBoolean()) + freeCompilerArgs.addAll( + listOf( + "-opt-in=kotlin.RequiresOptIn", + ) + ) + } + } + } +} diff --git a/build-logic/convention/src/main/java/com/threegap/bitnagil/convention/extension/KotlinCoroutine.kt b/build-logic/convention/src/main/java/com/threegap/bitnagil/convention/extension/KotlinCoroutine.kt new file mode 100644 index 00000000..cc1140d3 --- /dev/null +++ b/build-logic/convention/src/main/java/com/threegap/bitnagil/convention/extension/KotlinCoroutine.kt @@ -0,0 +1,17 @@ +package com.threegap.bitnagil.convention.extension + +import com.android.build.api.dsl.CommonExtension +import org.gradle.api.Project +import org.gradle.api.artifacts.VersionCatalogsExtension +import org.gradle.kotlin.dsl.getByType +import org.gradle.kotlin.dsl.dependencies + +internal fun Project.configureKotlinCoroutine(commonExtension: CommonExtension<*, *, *, *, *, *>) { + val libs = extensions.getByType().named("libs") + + commonExtension.apply { + dependencies { + "implementation"(libs.findBundle("coroutine").get()) + } + } +} diff --git a/build-logic/gradle.properties b/build-logic/gradle.properties new file mode 100644 index 00000000..c6cd2a7e --- /dev/null +++ b/build-logic/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.parallel=true +org.gradle.caching=true +org.gradle.configureondemand=true diff --git a/build-logic/settings.gradle.kts b/build-logic/settings.gradle.kts new file mode 100644 index 00000000..8c574c9a --- /dev/null +++ b/build-logic/settings.gradle.kts @@ -0,0 +1,15 @@ +enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") +dependencyResolutionManagement { + repositories { + google() + mavenCentral() + } + versionCatalogs { + create("libs") { + from(files("../gradle/libs.versions.toml")) + } + } +} + +rootProject.name = "build-logic" +include(":convention") diff --git a/build.gradle.kts b/build.gradle.kts index 4e189eb8..61c5f6f6 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,11 +1,18 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { alias(libs.plugins.android.application) apply false + alias(libs.plugins.android.library) apply false + alias(libs.plugins.compose.compiler) apply false alias(libs.plugins.kotlin.android) apply false - alias(libs.plugins.kotlin.compose) apply false - alias(libs.plugins.ktlint.gradle) apply false + alias(libs.plugins.kotlin.jvm) apply false + alias(libs.plugins.kotlin.serialization) apply false + alias(libs.plugins.ksp) apply false + alias(libs.plugins.hilt) apply false + alias(libs.plugins.ktlint) apply false } -subprojects { - apply(plugin = "org.jlleitschuh.gradle.ktlint") -} \ No newline at end of file +allprojects { + apply { + plugin(rootProject.libs.plugins.ktlint.get().pluginId) + } +} diff --git a/core/datastore/.gitignore b/core/datastore/.gitignore new file mode 100644 index 00000000..42afabfd --- /dev/null +++ b/core/datastore/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/core/datastore/build.gradle.kts b/core/datastore/build.gradle.kts new file mode 100644 index 00000000..6212c41d --- /dev/null +++ b/core/datastore/build.gradle.kts @@ -0,0 +1,13 @@ +plugins { + alias(libs.plugins.bitnagil.android.library) + alias(libs.plugins.bitnagil.android.hilt) + alias(libs.plugins.kotlin.serialization) +} + +android { + namespace = "com.threegap.bitnagil.datastore" +} + +dependencies { + implementation(libs.androidx.datastore) +} diff --git a/core/datastore/consumer-rules.pro b/core/datastore/consumer-rules.pro new file mode 100644 index 00000000..e69de29b diff --git a/core/datastore/proguard-rules.pro b/core/datastore/proguard-rules.pro new file mode 100644 index 00000000..481bb434 --- /dev/null +++ b/core/datastore/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/core/datastore/src/main/AndroidManifest.xml b/core/datastore/src/main/AndroidManifest.xml new file mode 100644 index 00000000..8bdb7e14 --- /dev/null +++ b/core/datastore/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + diff --git a/core/datastore/src/main/java/com/threegap/bitnagil/datastore/.gitkeep b/core/datastore/src/main/java/com/threegap/bitnagil/datastore/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/core/designsystem/.gitignore b/core/designsystem/.gitignore new file mode 100644 index 00000000..42afabfd --- /dev/null +++ b/core/designsystem/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/core/designsystem/build.gradle.kts b/core/designsystem/build.gradle.kts new file mode 100644 index 00000000..b099b8d3 --- /dev/null +++ b/core/designsystem/build.gradle.kts @@ -0,0 +1,11 @@ +plugins { + alias(libs.plugins.bitnagil.android.library) + alias(libs.plugins.bitnagil.android.compose.library) +} + +android { + namespace = "com.threegap.bitnagil.designsystem" +} + +dependencies { +} diff --git a/core/designsystem/consumer-rules.pro b/core/designsystem/consumer-rules.pro new file mode 100644 index 00000000..e69de29b diff --git a/core/designsystem/proguard-rules.pro b/core/designsystem/proguard-rules.pro new file mode 100644 index 00000000..481bb434 --- /dev/null +++ b/core/designsystem/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/core/designsystem/src/main/AndroidManifest.xml b/core/designsystem/src/main/AndroidManifest.xml new file mode 100644 index 00000000..8bdb7e14 --- /dev/null +++ b/core/designsystem/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + diff --git a/app/src/main/java/com/threegap/bitnagil/ui/theme/Color.kt b/core/designsystem/src/main/java/com/threegap/bitnagil/designsystem/Color.kt similarity index 85% rename from app/src/main/java/com/threegap/bitnagil/ui/theme/Color.kt rename to core/designsystem/src/main/java/com/threegap/bitnagil/designsystem/Color.kt index 1a6c279f..c6873010 100644 --- a/app/src/main/java/com/threegap/bitnagil/ui/theme/Color.kt +++ b/core/designsystem/src/main/java/com/threegap/bitnagil/designsystem/Color.kt @@ -1,4 +1,4 @@ -package com.threegap.bitnagil.ui.theme +package com.threegap.bitnagil.designsystem import androidx.compose.ui.graphics.Color diff --git a/app/src/main/java/com/threegap/bitnagil/ui/theme/Theme.kt b/core/designsystem/src/main/java/com/threegap/bitnagil/designsystem/Theme.kt similarity index 97% rename from app/src/main/java/com/threegap/bitnagil/ui/theme/Theme.kt rename to core/designsystem/src/main/java/com/threegap/bitnagil/designsystem/Theme.kt index 8f7aaa98..36e41d40 100644 --- a/app/src/main/java/com/threegap/bitnagil/ui/theme/Theme.kt +++ b/core/designsystem/src/main/java/com/threegap/bitnagil/designsystem/Theme.kt @@ -1,4 +1,4 @@ -package com.threegap.bitnagil.ui.theme +package com.threegap.bitnagil.designsystem import android.os.Build import androidx.compose.foundation.isSystemInDarkTheme diff --git a/app/src/main/java/com/threegap/bitnagil/ui/theme/Type.kt b/core/designsystem/src/main/java/com/threegap/bitnagil/designsystem/Type.kt similarity index 93% rename from app/src/main/java/com/threegap/bitnagil/ui/theme/Type.kt rename to core/designsystem/src/main/java/com/threegap/bitnagil/designsystem/Type.kt index 809ea05d..2297913d 100644 --- a/app/src/main/java/com/threegap/bitnagil/ui/theme/Type.kt +++ b/core/designsystem/src/main/java/com/threegap/bitnagil/designsystem/Type.kt @@ -1,4 +1,4 @@ -package com.threegap.bitnagil.ui.theme +package com.threegap.bitnagil.designsystem import androidx.compose.material3.Typography import androidx.compose.ui.text.TextStyle diff --git a/core/network/.gitignore b/core/network/.gitignore new file mode 100644 index 00000000..42afabfd --- /dev/null +++ b/core/network/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/core/network/build.gradle.kts b/core/network/build.gradle.kts new file mode 100644 index 00000000..cc198564 --- /dev/null +++ b/core/network/build.gradle.kts @@ -0,0 +1,12 @@ +plugins { + alias(libs.plugins.bitnagil.android.library) + alias(libs.plugins.bitnagil.android.hilt) + alias(libs.plugins.kotlin.serialization) +} + +android { + namespace = "com.threegap.bitnagil.network" +} + +dependencies { +} diff --git a/core/network/consumer-rules.pro b/core/network/consumer-rules.pro new file mode 100644 index 00000000..e69de29b diff --git a/core/network/proguard-rules.pro b/core/network/proguard-rules.pro new file mode 100644 index 00000000..481bb434 --- /dev/null +++ b/core/network/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/core/network/src/main/AndroidManifest.xml b/core/network/src/main/AndroidManifest.xml new file mode 100644 index 00000000..8bdb7e14 --- /dev/null +++ b/core/network/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + diff --git a/core/network/src/main/java/com/threegap/bitnagil/network/.gitkeep b/core/network/src/main/java/com/threegap/bitnagil/network/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/data/.gitignore b/data/.gitignore new file mode 100644 index 00000000..42afabfd --- /dev/null +++ b/data/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/data/build.gradle.kts b/data/build.gradle.kts new file mode 100644 index 00000000..8e64a81d --- /dev/null +++ b/data/build.gradle.kts @@ -0,0 +1,18 @@ +plugins { + alias(libs.plugins.bitnagil.android.library) + alias(libs.plugins.bitnagil.android.hilt) + alias(libs.plugins.kotlin.serialization) +} + +android { + namespace = "com.threegap.bitnagil.data" +} + +dependencies { + implementation(projects.core.network) + + implementation(platform(libs.okhttp.bom)) + implementation(libs.bundles.okhttp) + implementation(platform(libs.retrofit.bom)) + implementation(libs.bundles.retrofit) +} diff --git a/data/consumer-rules.pro b/data/consumer-rules.pro new file mode 100644 index 00000000..e69de29b diff --git a/data/proguard-rules.pro b/data/proguard-rules.pro new file mode 100644 index 00000000..481bb434 --- /dev/null +++ b/data/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/data/src/main/AndroidManifest.xml b/data/src/main/AndroidManifest.xml new file mode 100644 index 00000000..8bdb7e14 --- /dev/null +++ b/data/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + diff --git a/data/src/main/java/com/threegap/bitnagil/data/datasource/.gitkeep b/data/src/main/java/com/threegap/bitnagil/data/datasource/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/data/src/main/java/com/threegap/bitnagil/data/di/.gitkeep b/data/src/main/java/com/threegap/bitnagil/data/di/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/data/src/main/java/com/threegap/bitnagil/data/mapper/.gitkeep b/data/src/main/java/com/threegap/bitnagil/data/mapper/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/data/src/main/java/com/threegap/bitnagil/data/repositoryimpl/.gitkeep b/data/src/main/java/com/threegap/bitnagil/data/repositoryimpl/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/data/src/main/java/com/threegap/bitnagil/data/service/.gitkeep b/data/src/main/java/com/threegap/bitnagil/data/service/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/domain/.gitignore b/domain/.gitignore new file mode 100644 index 00000000..42afabfd --- /dev/null +++ b/domain/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/domain/build.gradle.kts b/domain/build.gradle.kts new file mode 100644 index 00000000..577e127e --- /dev/null +++ b/domain/build.gradle.kts @@ -0,0 +1,7 @@ +plugins { + alias(libs.plugins.bitnagil.kotlin) +} + +dependencies { + implementation(libs.kotlinx.coroutines.core) +} diff --git a/domain/src/main/java/com/threegap/bitnagil/domain/model/.gitkeep b/domain/src/main/java/com/threegap/bitnagil/domain/model/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/domain/src/main/java/com/threegap/bitnagil/domain/repository/.gitkeep b/domain/src/main/java/com/threegap/bitnagil/domain/repository/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/domain/src/main/java/com/threegap/bitnagil/domain/usecase/.gitkeep b/domain/src/main/java/com/threegap/bitnagil/domain/usecase/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 9cd16449..f5ba23ce 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,34 +1,184 @@ [versions] +## SDK versions +compileSdk = "35" +minSdk = "28" +targetSdk = "35" + +## App Versioning +versionCode = "1" +versionName = "1.0" + +# Android Gradle Plugin androidGradlePlugin = "8.10.1" + +# Formatting Plugin +ktlint = "12.3.0" + +# AndroidX +androidxCore = "1.16.0" +androidxLifecycle = "2.9.1" +androidxActivity = "1.10.1" +androidxDatastore = "1.1.7" +androidxAppcompat = "1.7.1" + +# Kotlin kotlin = "2.1.20" -coreKtx = "1.16.0" +kotlinxCoroutines = "1.10.2" +kotlinxSerializationJson = "1.8.1" + +# Ksp +ksp = "2.1.20-1.0.32" + +# Hilt +hilt = "2.56.2" +hiltNavigationCompose = "1.2.0" + +# Compose +composeBom = "2025.06.00" +composeNavigation = "2.9.0" + +# Network +okhttp = "4.11.0" +retrofit = "2.11.0" + +# Test junit = "4.13.2" junitVersion = "1.2.1" espressoCore = "3.6.1" -lifecycleRuntimeKtx = "2.9.1" -activityCompose = "1.10.1" -composeBom = "2025.06.00" -ktlint = "12.3.0" + +## Other +material = "1.12.0" +orbit = "6.1.0" +javax = "1" [libraries] -androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } +## Android Gradle Plugin +android-gradle-plugin = { group = "com.android.tools.build", name = "gradle", version.ref = "androidGradlePlugin" } +kotlin-gradle-plugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" } +compose-compiler-gradle-plugin = { group = "org.jetbrains.kotlin", name = "compose-compiler-gradle-plugin", version.ref = "kotlin" } + +## Androidx Core +androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "androidxAppcompat" } +androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "androidxActivity" } +androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "androidxCore" } +androidx-datastore = { group = "androidx.datastore", name = "datastore-preferences", version.ref = "androidxDatastore" } +androidx-lifecycle-compose = { group = "androidx.lifecycle", name = "lifecycle-runtime-compose", version.ref = "androidxLifecycle" } +androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "androidxLifecycle" } +androidx-lifecycle-viewmodel-ktx = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version.ref = "androidxLifecycle" } +androidx-lifecycle-viewmodel-compose = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-compose", version.ref = "androidxLifecycle" } + +## Compose +compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" } +compose-ui = { group = "androidx.compose.ui", name = "ui" } +compose-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" } +compose-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" } +compose-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" } +compose-foundation = { group = "androidx.compose.foundation", name = "foundation" } +compose-material3 = { group = "androidx.compose.material3", name = "material3" } +compose-runtime = { group = "androidx.compose.runtime", name = "runtime" } +compose-navigation = { group = "androidx.navigation", name = "navigation-compose", version.ref = "composeNavigation" } +compose-hilt-navigation = { group = "androidx.hilt", name = "hilt-navigation-compose", version.ref = "hiltNavigationCompose" } +compose-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" } +compose-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" } + +## Kotlin +kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "kotlinxCoroutines" } +kotlinx-coroutines-android = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-android", version.ref = "kotlinxCoroutines" } +kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinxSerializationJson" } + +## Hilt +hilt-android = { group = "com.google.dagger", name = "hilt-android", version.ref = "hilt" } +hilt-compiler = { group = "com.google.dagger", name = "hilt-android-compiler", version.ref = "hilt" } +javax-inject = { group = "javax.inject", name = "javax.inject", version.ref = "javax" } + +# Orbit +orbit-core = { group = "org.orbit-mvi", name = "orbit-core", version.ref = "orbit" } +orbit-compose = { group = "org.orbit-mvi", name = "orbit-compose", version.ref = "orbit" } +orbit-viewmodel = { group = "org.orbit-mvi", name = "orbit-viewmodel", version.ref = "orbit" } + +## retrofit +retrofit-bom = { group = "com.squareup.retrofit2", name = "retrofit-bom", version.ref = "retrofit" } +retrofit = { group = "com.squareup.retrofit2", name = "retrofit" } +retrofit-kotlin-serialization-converter = { group = "com.squareup.retrofit2", name = "converter-kotlinx-serialization" } + +## okhttp +okhttp-bom = { group = "com.squareup.okhttp3", name = "okhttp-bom", version.ref = "okhttp" } +okhttp = { group = "com.squareup.okhttp3", name = "okhttp" } +okhttp-logging-interceptor = { group = "com.squareup.okhttp3", name = "logging-interceptor" } + +## Test junit = { group = "junit", name = "junit", version.ref = "junit" } androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" } androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" } -androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" } -androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" } -androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" } -androidx-ui = { group = "androidx.compose.ui", name = "ui" } -androidx-ui-graphics = { group = "androidx.compose.ui", name = "ui-graphics" } -androidx-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" } -androidx-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" } -androidx-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" } -androidx-ui-test-junit4 = { group = "androidx.compose.ui", name = "ui-test-junit4" } -androidx-material3 = { group = "androidx.compose.material3", name = "material3" } + +## Other +material = { group = "com.google.android.material", name = "material", version.ref = "material" } + +[bundles] +androidx-core = [ + "androidx-core-ktx", + "androidx-appcompat", + "androidx-lifecycle-runtime-ktx", + "androidx-lifecycle-viewmodel-ktx" +] + +compose = [ + "compose-ui", + "compose-ui-graphics", + "compose-ui-tooling-preview", + "compose-foundation", + "compose-material3", + "compose-navigation", + "compose-hilt-navigation", + "compose-runtime", + "androidx-activity-compose" +] + +compose-lifecycle = [ + "androidx-lifecycle-compose", + "androidx-lifecycle-viewmodel-compose" +] + +compose-debug = [ + "compose-ui-tooling", + "compose-ui-test-manifest" +] + +coroutine = [ + "kotlinx-coroutines-android", + "kotlinx-coroutines-core" +] + +okhttp = [ + "okhttp", + "okhttp-logging-interceptor" +] + +retrofit = [ + "retrofit", + "retrofit-kotlin-serialization-converter" +] + +orbit = [ + "orbit-core", + "orbit-compose", + "orbit-viewmodel" +] [plugins] android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" } +android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" } kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } -kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } -ktlint-gradle = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint" } +kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } +kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } +compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } +ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } +hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" } +ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint" } +# Custom Plugins +bitnagil-android-application = { id = "bitnagil.android.application", version = "unspecified" } +bitnagil-android-library = { id = "bitnagil.android.library", version = "unspecified" } +bitnagil-android-compose-library = { id = "bitnagil.android.compose.library", version = "unspecified" } +bitnagil-android-hilt = { id = "bitnagil.android.hilt", version = "unspecified" } +bitnagil-kotlin = { id = "bitnagil.kotlin", version = "unspecified" } diff --git a/presentation/.gitignore b/presentation/.gitignore new file mode 100644 index 00000000..42afabfd --- /dev/null +++ b/presentation/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/presentation/build.gradle.kts b/presentation/build.gradle.kts new file mode 100644 index 00000000..5d6b9a1e --- /dev/null +++ b/presentation/build.gradle.kts @@ -0,0 +1,15 @@ +plugins { + alias(libs.plugins.bitnagil.android.library) + alias(libs.plugins.bitnagil.android.compose.library) +} + +android { + namespace = "com.threegap.bitnagil.presentation" +} + +dependencies { + implementation(projects.core.designsystem) + + implementation(libs.bundles.androidx.core) + implementation(libs.bundles.orbit) +} diff --git a/presentation/consumer-rules.pro b/presentation/consumer-rules.pro new file mode 100644 index 00000000..e69de29b diff --git a/presentation/proguard-rules.pro b/presentation/proguard-rules.pro new file mode 100644 index 00000000..481bb434 --- /dev/null +++ b/presentation/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/presentation/src/main/AndroidManifest.xml b/presentation/src/main/AndroidManifest.xml new file mode 100644 index 00000000..8bdb7e14 --- /dev/null +++ b/presentation/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + diff --git a/presentation/src/main/java/com/threegap/bitnagil/presentation/home/HomeScreen.kt b/presentation/src/main/java/com/threegap/bitnagil/presentation/home/HomeScreen.kt new file mode 100644 index 00000000..9f8b3b5c --- /dev/null +++ b/presentation/src/main/java/com/threegap/bitnagil/presentation/home/HomeScreen.kt @@ -0,0 +1,35 @@ +package com.threegap.bitnagil.presentation.home + +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.tooling.preview.Preview +import com.threegap.bitnagil.designsystem.BitnagilTheme + +@Composable +fun HomeScreen(modifier: Modifier = Modifier) { + Column( + verticalArrangement = Arrangement.Center, + horizontalAlignment = Alignment.CenterHorizontally, + modifier = + modifier + .fillMaxSize() + .background(Color.White), + ) { + Text(text = "여긴 홈 화면") + } +} + +@Preview +@Composable +private fun HomeScreenPreview() { + BitnagilTheme { + HomeScreen() + } +} diff --git a/presentation/src/main/java/com/threegap/bitnagil/presentation/login/LoginScreen.kt b/presentation/src/main/java/com/threegap/bitnagil/presentation/login/LoginScreen.kt new file mode 100644 index 00000000..c6c2f00c --- /dev/null +++ b/presentation/src/main/java/com/threegap/bitnagil/presentation/login/LoginScreen.kt @@ -0,0 +1,52 @@ +package com.threegap.bitnagil.presentation.login + +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.height +import androidx.compose.material3.Button +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.dp +import com.threegap.bitnagil.designsystem.BitnagilTheme + +@Composable +fun LoginScreen( + onLoginClick: () -> Unit, + modifier: Modifier = Modifier, +) { + Column( + verticalArrangement = Arrangement.Center, + horizontalAlignment = Alignment.CenterHorizontally, + modifier = + modifier + .fillMaxSize() + .background(Color.White), + ) { + Text(text = "여긴 로그인 화면") + + Spacer(modifier = Modifier.height(10.dp)) + + Button( + onClick = onLoginClick, + ) { + Text("로그인 버튼 눌러보던가") + } + } +} + +@Preview +@Composable +private fun LoginScreenPreview() { + BitnagilTheme { + LoginScreen( + onLoginClick = {}, + ) + } +} diff --git a/settings.gradle.kts b/settings.gradle.kts index 50bcef18..d21f0d65 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,4 +1,6 @@ +enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") pluginManagement { + includeBuild("build-logic") repositories { google { content { @@ -11,6 +13,8 @@ pluginManagement { gradlePluginPortal() } } + +@Suppress("UnstableApiUsage") dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { @@ -21,3 +25,9 @@ dependencyResolutionManagement { rootProject.name = "Bitnagil" include(":app") +include(":core:datastore") +include(":core:designsystem") +include(":core:network") +include(":data") +include(":domain") +include(":presentation")