From 91e18e25852b3a823ac5b53ce2a676ce40a1a7c1 Mon Sep 17 00:00:00 2001 From: Sangho Kim Date: Sun, 8 Sep 2024 23:20:22 +0900 Subject: [PATCH] =?UTF-8?q?[ADD/#123]=20feature=20=EB=AA=A8=EB=93=88=20gra?= =?UTF-8?q?dle=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle.kts | 2 +- feature/auth/build.gradle.kts | 113 ++++++++++++++++++++++------- feature/auth/consumer-rules.pro | 21 ++++++ feature/buy/build.gradle.kts | 110 +++++++++++++++++++++------- feature/buy/consumer-rules.pro | 21 ++++++ feature/main/build.gradle.kts | 100 ++++++++++++++++++------- feature/main/consumer-rules.pro | 21 ++++++ feature/sell/build.gradle.kts | 100 ++++++++++++++++++------- feature/sell/consumer-rules.pro | 21 ++++++ feature/setting/build.gradle.kts | 103 +++++++++++++++++++------- feature/setting/consumer-rules.pro | 21 ++++++ presentation/build.gradle.kts | 1 - 12 files changed, 492 insertions(+), 142 deletions(-) create mode 100644 feature/auth/consumer-rules.pro create mode 100644 feature/buy/consumer-rules.pro create mode 100644 feature/main/consumer-rules.pro create mode 100644 feature/sell/consumer-rules.pro create mode 100644 feature/setting/consumer-rules.pro diff --git a/app/build.gradle.kts b/app/build.gradle.kts index d5724cbc..de5b569e 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -75,7 +75,7 @@ dependencies { implementation(project(":core")) implementation(project(":data")) implementation(project(":domain")) - implementation(project(":presentation")) + implementation(project(":feature")) KotlinDependencies.run { implementation(kotlin) diff --git a/feature/auth/build.gradle.kts b/feature/auth/build.gradle.kts index 43c85d01..49b4a531 100644 --- a/feature/auth/build.gradle.kts +++ b/feature/auth/build.gradle.kts @@ -1,46 +1,103 @@ +import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties + plugins { - id("com.android.application") - id("org.jetbrains.kotlin.android") + id("com.android.library") + kotlin("android") + kotlin("kapt") + id("dagger.hilt.android.plugin") } android { - namespace = "com.kkkk.auth" - compileSdk = 34 + namespace = "co.orange.feature.auth" + compileSdk = Constants.compileSdk defaultConfig { - applicationId = "com.kkkk.auth" - minSdk = 28 - targetSdk = 34 - versionCode = 1 - versionName = "1.0" + minSdk = Constants.minSdk testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - } + consumerProguardFiles("consumer-rules.pro") + + buildConfigField( + "String", + "IAMPORT_CODE", + gradleLocalProperties(rootDir).getProperty("iamport.code"), + ) - buildTypes { - release { - isMinifyEnabled = false - proguardFiles( - getDefaultProguardFile("proguard-android-optimize.txt"), - "proguard-rules.pro" - ) - } + buildConfigField( + "String", + "MERCHANT_UID", + gradleLocalProperties(rootDir).getProperty("merchant.uid"), + ) } + compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = Versions.javaVersion + targetCompatibility = Versions.javaVersion } + kotlinOptions { - jvmTarget = "1.8" + jvmTarget = Versions.jvmVersion + } + + buildFeatures { + buildConfig = true + dataBinding = true + viewBinding = true } } dependencies { + implementation(project(":core")) + implementation(project(":domain")) + + KotlinDependencies.run { + implementation(kotlin) + implementation(coroutines) + implementation(jsonSerialization) + implementation(dateTime) + } - implementation(libs.androidx.core.ktx) - implementation(libs.androidx.appcompat) - implementation(libs.material) - testImplementation(libs.junit) - androidTestImplementation(libs.androidx.junit) - androidTestImplementation(libs.androidx.espresso.core) -} \ No newline at end of file + AndroidXDependencies.run { + implementation(coreKtx) + implementation(appCompat) + implementation(constraintLayout) + implementation(fragment) + implementation(startup) + implementation(legacy) + implementation(security) + implementation(hilt) + implementation(lifeCycleKtx) + implementation(lifecycleJava8) + implementation(workManager) + implementation(hiltWorkManager) + } + + KaptDependencies.run { + kapt(hiltCompiler) + kapt(hiltWorkManagerCompiler) + } + + GoogleDependencies.run { + implementation(materialDesign) + } + + TestDependencies.run { + testImplementation(jUnit) + androidTestImplementation(androidTest) + androidTestImplementation(espresso) + } + + ThirdPartyDependencies.run { + implementation(coil) + implementation(timber) + implementation(lottie) + } + + JitpackDependencies.run { + implementation(iamport) + } + + KakaoDependencies.run { + implementation(user) + } +} diff --git a/feature/auth/consumer-rules.pro b/feature/auth/consumer-rules.pro new file mode 100644 index 00000000..481bb434 --- /dev/null +++ b/feature/auth/consumer-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/feature/buy/build.gradle.kts b/feature/buy/build.gradle.kts index 6fcc4e9e..e3cf846d 100644 --- a/feature/buy/build.gradle.kts +++ b/feature/buy/build.gradle.kts @@ -1,46 +1,100 @@ +import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties + plugins { - id("com.android.application") - id("org.jetbrains.kotlin.android") + id("com.android.library") + kotlin("android") + kotlin("kapt") + id("dagger.hilt.android.plugin") } android { - namespace = "com.kkkk.buy" - compileSdk = 34 + namespace = "co.orange.feature.buy" + compileSdk = Constants.compileSdk defaultConfig { - applicationId = "com.kkkk.buy" - minSdk = 28 - targetSdk = 34 - versionCode = 1 - versionName = "1.0" + minSdk = Constants.minSdk testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - } + consumerProguardFiles("consumer-rules.pro") - buildTypes { - release { - isMinifyEnabled = false - proguardFiles( - getDefaultProguardFile("proguard-android-optimize.txt"), - "proguard-rules.pro" - ) - } + buildConfigField( + "String", + "PAYMENT_UID", + gradleLocalProperties(rootDir).getProperty("payment.uid"), + ) } + compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = Versions.javaVersion + targetCompatibility = Versions.javaVersion } + kotlinOptions { - jvmTarget = "1.8" + jvmTarget = Versions.jvmVersion + } + + buildFeatures { + buildConfig = true + dataBinding = true + viewBinding = true } } dependencies { + implementation(project(":core")) + implementation(project(":domain")) + + KotlinDependencies.run { + implementation(kotlin) + implementation(coroutines) + implementation(jsonSerialization) + implementation(dateTime) + } + + AndroidXDependencies.run { + implementation(coreKtx) + implementation(appCompat) + implementation(constraintLayout) + implementation(fragment) + implementation(startup) + implementation(legacy) + implementation(security) + implementation(hilt) + implementation(lifeCycleKtx) + implementation(lifecycleJava8) + implementation(splashScreen) + implementation(workManager) + implementation(hiltWorkManager) + } + + KaptDependencies.run { + kapt(hiltCompiler) + kapt(hiltWorkManagerCompiler) + } + + GoogleDependencies.run { + implementation(materialDesign) + } - implementation(libs.androidx.core.ktx) - implementation(libs.androidx.appcompat) - implementation(libs.material) - testImplementation(libs.junit) - androidTestImplementation(libs.androidx.junit) - androidTestImplementation(libs.androidx.espresso.core) -} \ No newline at end of file + TestDependencies.run { + testImplementation(jUnit) + androidTestImplementation(androidTest) + androidTestImplementation(espresso) + } + + ThirdPartyDependencies.run { + implementation(coil) + implementation(timber) + implementation(lottie) + } + + JitpackDependencies.run { + implementation(iamport) + } + + FirebaseDependencies.run { + implementation(platform(firebaseBom)) + implementation(crashlytics) + implementation(analytics) + } +} diff --git a/feature/buy/consumer-rules.pro b/feature/buy/consumer-rules.pro new file mode 100644 index 00000000..481bb434 --- /dev/null +++ b/feature/buy/consumer-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/feature/main/build.gradle.kts b/feature/main/build.gradle.kts index c2a2c703..3c643324 100644 --- a/feature/main/build.gradle.kts +++ b/feature/main/build.gradle.kts @@ -1,46 +1,90 @@ plugins { - id("com.android.application") - id("org.jetbrains.kotlin.android") + id("com.android.library") + kotlin("android") + kotlin("kapt") + id("dagger.hilt.android.plugin") } android { - namespace = "com.kkkk.main" - compileSdk = 34 + namespace = "co.orange.feature.main" + compileSdk = Constants.compileSdk defaultConfig { - applicationId = "com.kkkk.main" - minSdk = 28 - targetSdk = 34 - versionCode = 1 - versionName = "1.0" + minSdk = Constants.minSdk 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 + sourceCompatibility = Versions.javaVersion + targetCompatibility = Versions.javaVersion } + kotlinOptions { - jvmTarget = "1.8" + jvmTarget = Versions.jvmVersion + } + + buildFeatures { + buildConfig = true + dataBinding = true + viewBinding = true } } dependencies { + implementation(project(":core")) + implementation(project(":domain")) + + KotlinDependencies.run { + implementation(kotlin) + implementation(coroutines) + implementation(jsonSerialization) + implementation(dateTime) + } + + AndroidXDependencies.run { + implementation(coreKtx) + implementation(appCompat) + implementation(constraintLayout) + implementation(fragment) + implementation(startup) + implementation(legacy) + implementation(security) + implementation(hilt) + implementation(lifeCycleKtx) + implementation(lifecycleJava8) + implementation(splashScreen) + implementation(workManager) + implementation(hiltWorkManager) + } + + KaptDependencies.run { + kapt(hiltCompiler) + kapt(hiltWorkManagerCompiler) + } + + GoogleDependencies.run { + implementation(materialDesign) + implementation(appUpdate) + } + + TestDependencies.run { + testImplementation(jUnit) + androidTestImplementation(androidTest) + androidTestImplementation(espresso) + } - implementation(libs.androidx.core.ktx) - implementation(libs.androidx.appcompat) - implementation(libs.material) - testImplementation(libs.junit) - androidTestImplementation(libs.androidx.junit) - androidTestImplementation(libs.androidx.espresso.core) -} \ No newline at end of file + ThirdPartyDependencies.run { + implementation(coil) + implementation(timber) + implementation(lottie) + } + + FirebaseDependencies.run { + implementation(platform(firebaseBom)) + implementation(messaging) + implementation(crashlytics) + implementation(analytics) + } +} diff --git a/feature/main/consumer-rules.pro b/feature/main/consumer-rules.pro new file mode 100644 index 00000000..481bb434 --- /dev/null +++ b/feature/main/consumer-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/feature/sell/build.gradle.kts b/feature/sell/build.gradle.kts index fe31cac1..e6122485 100644 --- a/feature/sell/build.gradle.kts +++ b/feature/sell/build.gradle.kts @@ -1,46 +1,90 @@ plugins { - id("com.android.application") - id("org.jetbrains.kotlin.android") + id("com.android.library") + kotlin("android") + kotlin("kapt") + id("dagger.hilt.android.plugin") } android { - namespace = "com.kkkk.sell" - compileSdk = 34 + namespace = "co.orange.feature.sell" + compileSdk = Constants.compileSdk defaultConfig { - applicationId = "com.kkkk.sell" - minSdk = 28 - targetSdk = 34 - versionCode = 1 - versionName = "1.0" + minSdk = Constants.minSdk 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 + sourceCompatibility = Versions.javaVersion + targetCompatibility = Versions.javaVersion } + kotlinOptions { - jvmTarget = "1.8" + jvmTarget = Versions.jvmVersion + } + + buildFeatures { + buildConfig = true + dataBinding = true + viewBinding = true } } dependencies { + implementation(project(":core")) + implementation(project(":domain")) + + KotlinDependencies.run { + implementation(kotlin) + implementation(coroutines) + implementation(jsonSerialization) + implementation(dateTime) + } + + AndroidXDependencies.run { + implementation(coreKtx) + implementation(appCompat) + implementation(constraintLayout) + implementation(fragment) + implementation(startup) + implementation(legacy) + implementation(security) + implementation(hilt) + implementation(lifeCycleKtx) + implementation(lifecycleJava8) + implementation(splashScreen) + implementation(workManager) + implementation(hiltWorkManager) + } + + KaptDependencies.run { + kapt(hiltCompiler) + kapt(hiltWorkManagerCompiler) + } + + GoogleDependencies.run { + implementation(materialDesign) + implementation(mlkit) + } + + TestDependencies.run { + testImplementation(jUnit) + androidTestImplementation(androidTest) + androidTestImplementation(espresso) + } - implementation(libs.androidx.core.ktx) - implementation(libs.androidx.appcompat) - implementation(libs.material) - testImplementation(libs.junit) - androidTestImplementation(libs.androidx.junit) - androidTestImplementation(libs.androidx.espresso.core) -} \ No newline at end of file + ThirdPartyDependencies.run { + implementation(coil) + implementation(timber) + implementation(lottie) + implementation(circleIndicator) + } + + FirebaseDependencies.run { + implementation(platform(firebaseBom)) + implementation(crashlytics) + implementation(analytics) + } +} diff --git a/feature/sell/consumer-rules.pro b/feature/sell/consumer-rules.pro new file mode 100644 index 00000000..481bb434 --- /dev/null +++ b/feature/sell/consumer-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/feature/setting/build.gradle.kts b/feature/setting/build.gradle.kts index 51a128d5..65e8b063 100644 --- a/feature/setting/build.gradle.kts +++ b/feature/setting/build.gradle.kts @@ -1,46 +1,93 @@ plugins { - id("com.android.application") - id("org.jetbrains.kotlin.android") + id("com.android.library") + kotlin("android") + kotlin("kapt") + id("dagger.hilt.android.plugin") } android { - namespace = "com.kkkk.setting" - compileSdk = 34 + namespace = "co.orange.feature.setting" + compileSdk = Constants.compileSdk defaultConfig { - applicationId = "com.kkkk.setting" - minSdk = 28 - targetSdk = 34 - versionCode = 1 - versionName = "1.0" + minSdk = Constants.minSdk 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 + sourceCompatibility = Versions.javaVersion + targetCompatibility = Versions.javaVersion } + kotlinOptions { - jvmTarget = "1.8" + jvmTarget = Versions.jvmVersion + } + + buildFeatures { + buildConfig = true + dataBinding = true + viewBinding = true } } dependencies { + implementation(project(":core")) + implementation(project(":domain")) + + KotlinDependencies.run { + implementation(kotlin) + implementation(coroutines) + implementation(jsonSerialization) + implementation(dateTime) + } + + AndroidXDependencies.run { + implementation(coreKtx) + implementation(appCompat) + implementation(constraintLayout) + implementation(fragment) + implementation(webkit) + implementation(startup) + implementation(legacy) + implementation(security) + implementation(hilt) + implementation(lifeCycleKtx) + implementation(lifecycleJava8) + implementation(splashScreen) + implementation(workManager) + implementation(hiltWorkManager) + } + + KaptDependencies.run { + kapt(hiltCompiler) + kapt(hiltWorkManagerCompiler) + } - implementation(libs.androidx.core.ktx) - implementation(libs.androidx.appcompat) - implementation(libs.material) - testImplementation(libs.junit) - androidTestImplementation(libs.androidx.junit) - androidTestImplementation(libs.androidx.espresso.core) -} \ No newline at end of file + GoogleDependencies.run { + implementation(materialDesign) + } + + TestDependencies.run { + testImplementation(jUnit) + androidTestImplementation(androidTest) + androidTestImplementation(espresso) + } + + ThirdPartyDependencies.run { + implementation(coil) + implementation(timber) + implementation(lottie) + } + + KakaoDependencies.run { + implementation(user) + } + + FirebaseDependencies.run { + implementation(platform(firebaseBom)) + implementation(crashlytics) + implementation(analytics) + } +} diff --git a/feature/setting/consumer-rules.pro b/feature/setting/consumer-rules.pro new file mode 100644 index 00000000..481bb434 --- /dev/null +++ b/feature/setting/consumer-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/build.gradle.kts b/presentation/build.gradle.kts index c849d8d3..5b5c102b 100644 --- a/presentation/build.gradle.kts +++ b/presentation/build.gradle.kts @@ -4,7 +4,6 @@ plugins { id("com.android.library") kotlin("android") kotlin("kapt") - id("kotlin-parcelize") id("dagger.hilt.android.plugin") }