From 371628a6bbc53af001c63b303f5ecbd8d8db14a1 Mon Sep 17 00:00:00 2001 From: jinukeu Date: Wed, 4 Oct 2023 15:12:48 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20presentation-compose=20=EB=AA=A8?= =?UTF-8?q?=EB=93=88=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle.kts | 2 + presentation-compose/.gitignore | 1 + presentation-compose/build.gradle.kts | 101 ++++++++++++++++++ presentation-compose/consumer-rules.pro | 0 presentation-compose/proguard-rules.pro | 21 ++++ .../ExampleInstrumentedTest.kt | 24 +++++ .../src/main/AndroidManifest.xml | 12 +++ .../presentation_compose/ExampleUnitTest.kt | 17 +++ settings.gradle.kts | 1 + 9 files changed, 179 insertions(+) create mode 100644 presentation-compose/.gitignore create mode 100644 presentation-compose/build.gradle.kts create mode 100644 presentation-compose/consumer-rules.pro create mode 100644 presentation-compose/proguard-rules.pro create mode 100644 presentation-compose/src/androidTest/java/com/plub/presentation_compose/ExampleInstrumentedTest.kt create mode 100644 presentation-compose/src/main/AndroidManifest.xml create mode 100644 presentation-compose/src/test/java/com/plub/presentation_compose/ExampleUnitTest.kt diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 9b905993d..b3d64af95 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -49,6 +49,8 @@ android { dependencies { implementation(project(":domain")) implementation(project(":data")) + implementation(project(":design-system")) + implementation(project(":presentation-compose")) implementation(AndroidX.CORE_KTX) implementation(AndroidX.APP_COMPAT) diff --git a/presentation-compose/.gitignore b/presentation-compose/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/presentation-compose/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/presentation-compose/build.gradle.kts b/presentation-compose/build.gradle.kts new file mode 100644 index 000000000..cdb150ca2 --- /dev/null +++ b/presentation-compose/build.gradle.kts @@ -0,0 +1,101 @@ +plugins { + id("com.android.library") + id("dagger.hilt.android.plugin") + kotlin("android") + kotlin("kapt") + id("androidx.navigation.safeargs.kotlin") + id("com.google.gms.google-services") + id("kotlin-parcelize") +} + +android { + namespace = "com.plub.presentation_compose" + compileSdk = 33 + + defaultConfig { + minSdk = 26 + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = "1.8" + } + buildFeatures { + viewBinding = true + } +} + +dependencies { + implementation(project(":domain")) + implementation(project(":design-system")) + + implementation(Kotlin.KOTLIN_STDLIB) + implementation(Kotlin.COROUTINES_ANDROID) + implementation(Kotlin.COROUTINES_CORE) + + implementation(AndroidX.APP_COMPAT) + implementation(AndroidX.CORE_KTX) + implementation(AndroidX.LIFECYCLE_RUNTIME_KTX) + implementation(AndroidX.CONSTRAINT_LAYOUT) + implementation(AndroidX.LIFECYCLE_VIEW_MODEL_KTX) + implementation(AndroidX.ACTIVITY_KTX) + implementation(AndroidX.FRAGMENT_KTX) + implementation(AndroidX.NAVIGATION_FRAGMENT_KTX) + implementation(AndroidX.NAVIGATION_UI_KTX) + implementation(AndroidX.LEGACY_SUPPORT) + implementation(AndroidX.RECYCLER_VIEW) + implementation(AndroidX.PAGING3_RUNTIME) + implementation(AndroidX.PAGING3_COMMON_KTX) + + implementation(Libraries.CALENDAR_VIEW) + implementation(Libraries.COIL) + implementation(Libraries.TIMBER) + implementation(Libraries.LOTTIE) + implementation(Libraries.INDICATOR) + implementation(Libraries.KAKAO) + implementation(Libraries.TED_PERMISSION) + implementation(Libraries.THREE_TEN_ABP) + implementation(Libraries.IMAGE_CROPPER) + implementation(Libraries.POWER_MENU) + + implementation(Google.MATERIAL) + implementation(Google.HILT_ANDROID) + implementation(Google.GOOGLE_PLAY_SERVICE) + implementation(Google.FLEX_BOX) + implementation(Google.FIREBASE_BOM) + implementation(Google.FCM) + implementation(Google.FCM_KTX) + + implementation(Glide.GLIDE) + implementation("com.google.android.material:material:1.9.0") + implementation("androidx.appcompat:appcompat:1.6.1") + implementation("androidx.constraintlayout:constraintlayout:2.1.4") + implementation("androidx.navigation:navigation-fragment-ktx:2.7.3") + implementation("androidx.navigation:navigation-ui-ktx:2.7.3") + annotationProcessor(Glide.GLIDE_COMPILER) + + implementation(Compose.COMPOSE_ACTIVITY) + implementation(Compose.COMPOSE_MATERIAL) + implementation(Compose.COMPOSE_PREVIEW) + implementation(Compose.COMPOSE_UI) + implementation(Compose.COMPOSE_NAV) + implementation(Compose.COMPOSE_ANI_NAV) + implementation(Compose.COMPOSE_UI_TOOL) + + kapt(Google.HILT_ANDROID_COMPILER) +} \ No newline at end of file diff --git a/presentation-compose/consumer-rules.pro b/presentation-compose/consumer-rules.pro new file mode 100644 index 000000000..e69de29bb diff --git a/presentation-compose/proguard-rules.pro b/presentation-compose/proguard-rules.pro new file mode 100644 index 000000000..481bb4348 --- /dev/null +++ b/presentation-compose/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-compose/src/androidTest/java/com/plub/presentation_compose/ExampleInstrumentedTest.kt b/presentation-compose/src/androidTest/java/com/plub/presentation_compose/ExampleInstrumentedTest.kt new file mode 100644 index 000000000..bf229951d --- /dev/null +++ b/presentation-compose/src/androidTest/java/com/plub/presentation_compose/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package com.plub.presentation_compose + +import androidx.test.platform.app.InstrumentationRegistry +import androidx.test.ext.junit.runners.AndroidJUnit4 + +import org.junit.Test +import org.junit.runner.RunWith + +import org.junit.Assert.* + +/** + * 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.plub.presentation_compose.test", appContext.packageName) + } +} \ No newline at end of file diff --git a/presentation-compose/src/main/AndroidManifest.xml b/presentation-compose/src/main/AndroidManifest.xml new file mode 100644 index 000000000..745d27581 --- /dev/null +++ b/presentation-compose/src/main/AndroidManifest.xml @@ -0,0 +1,12 @@ + + + + + + + + \ No newline at end of file diff --git a/presentation-compose/src/test/java/com/plub/presentation_compose/ExampleUnitTest.kt b/presentation-compose/src/test/java/com/plub/presentation_compose/ExampleUnitTest.kt new file mode 100644 index 000000000..db727e0cd --- /dev/null +++ b/presentation-compose/src/test/java/com/plub/presentation_compose/ExampleUnitTest.kt @@ -0,0 +1,17 @@ +package com.plub.presentation_compose + +import org.junit.Test + +import org.junit.Assert.* + +/** + * 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) + } +} \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index f490af8de..2972e5139 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -3,3 +3,4 @@ include (":app") include (":domain") include (":data") include(":design-system") +include(":presentation-compose")