From 7b96661685b1e336441628963245c6a47442537d Mon Sep 17 00:00:00 2001 From: bmsk Date: Tue, 14 Nov 2023 23:09:01 +0900 Subject: [PATCH] =?UTF-8?q?[Refact]=20gradle=20=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 256 ++++++++++++++++++++++++++++++++++++-- .idea/misc.xml | 2 +- app/build.gradle | 137 -------------------- app/build.gradle.kts | 129 +++++++++++++++++++ app/proguard-rules.pro | 2 +- gradle/libs.versions.toml | 28 +++++ 6 files changed, 402 insertions(+), 152 deletions(-) delete mode 100644 app/build.gradle create mode 100644 app/build.gradle.kts create mode 100644 gradle/libs.versions.toml diff --git a/.gitignore b/.gitignore index f954096..f026d3b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ -# Created by https://www.toptal.com/developers/gitignore/api/java,androidstudio,android,windows,macos -# Edit at https://www.toptal.com/developers/gitignore?templates=java,androidstudio,android,windows,macos +# Created by https://www.toptal.com/developers/gitignore/api/windows,java,kotlin,intellij,intellij+iml,intellij+all,android,androidstudio,macos +# Edit at https://www.toptal.com/developers/gitignore?templates=windows,java,kotlin,intellij,intellij+iml,intellij+all,android,androidstudio,macos ### Android ### # Gradle files @@ -42,6 +42,233 @@ gen-external-apklibs # Replacement of .externalNativeBuild directories introduced # with Android Studio 3.5. +### Intellij ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# AWS User-specific +.idea/**/aws.xml + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# SonarLint plugin +.idea/sonarlint/ + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### Intellij Patch ### +# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 + +# *.iml +# modules.xml +# .idea/misc.xml +# *.ipr + +# Sonarlint plugin +# https://plugins.jetbrains.com/plugin/7973-sonarlint +.idea/**/sonarlint/ + +# SonarQube Plugin +# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin +.idea/**/sonarIssues.xml + +# Markdown Navigator plugin +# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced +.idea/**/markdown-navigator.xml +.idea/**/markdown-navigator-enh.xml +.idea/**/markdown-navigator/ + +# Cache file creation bug +# See https://youtrack.jetbrains.com/issue/JBR-2257 +.idea/$CACHE_FILE$ + +# CodeStream plugin +# https://plugins.jetbrains.com/plugin/12206-codestream +.idea/codestream.xml + +# Azure Toolkit for IntelliJ plugin +# https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij +.idea/**/azureSettings.xml + +### Intellij+all ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff + +# AWS User-specific + +# Generated files + +# Sensitive or high-churn files + +# Gradle + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake + +# Mongo Explorer plugin + +# File-based project format + +# IntelliJ + +# mpeltonen/sbt-idea plugin + +# JIRA plugin + +# Cursive Clojure plugin + +# SonarLint plugin + +# Crashlytics plugin (for Android Studio and IntelliJ) + +# Editor-based Rest Client + +# Android studio 3.1+ serialized cache file + +### Intellij+all Patch ### +# Ignore everything but code style settings and run configurations +# that are supposed to be shared within teams. + +.idea/* + +!.idea/codeStyles +!.idea/runConfigurations + +### Intellij+iml ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff + +# AWS User-specific + +# Generated files + +# Sensitive or high-churn files + +# Gradle + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake + +# Mongo Explorer plugin + +# File-based project format + +# IntelliJ + +# mpeltonen/sbt-idea plugin + +# JIRA plugin + +# Cursive Clojure plugin + +# SonarLint plugin + +# Crashlytics plugin (for Android Studio and IntelliJ) + +# Editor-based Rest Client + +# Android studio 3.1+ serialized cache file + +### Intellij+iml Patch ### +# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023 + +modules.xml +.idea/misc.xml +*.ipr + ### Java ### # Compiled class file *.class @@ -67,6 +294,19 @@ gen-external-apklibs hs_err_pid* replay_pid* +### Kotlin ### +# Compiled class file + +# Log file + +# BlueJ files + +# Mobile Tools for Java (J2ME) + +# Package Files # + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml + ### macOS ### # General .DS_Store @@ -141,7 +381,6 @@ $RECYCLE.BIN/ # Generated files bin/ gen/ -out/ # Gradle files .gradle @@ -163,7 +402,6 @@ proguard/ /*/*/build /*/*/production .navigation/ -*.ipr *~ *.swp @@ -181,7 +419,6 @@ proguard/ obj/ # IntelliJ IDEA -*.iws /out/ # User-specific configurations @@ -194,7 +431,6 @@ obj/ .idea/compiler.xml .idea/copyright/profiles_settings.xml .idea/encodings.xml -.idea/misc.xml .idea/modules.xml .idea/scopes/scope_settings.xml .idea/dictionaries @@ -225,22 +461,16 @@ obj/ ## Plugin-specific files: # mpeltonen/sbt-idea plugin -.idea_modules/ # JIRA plugin -atlassian-ide-plugin.xml # Mongo Explorer plugin .idea/mongoSettings.xml # Crashlytics plugin (for Android Studio and IntelliJ) -com_crashlytics_export_strings.xml -crashlytics.properties -crashlytics-build.properties -fabric.properties ### AndroidStudio Patch ### !/gradle/wrapper/gradle-wrapper.jar -# End of https://www.toptal.com/developers/gitignore/api/java,androidstudio,android,windows,macos +# End of https://www.toptal.com/developers/gitignore/api/windows,java,kotlin,intellij,intellij+iml,intellij+all,android,androidstudio,macos \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 35c7f36..93d9fd2 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,7 +1,7 @@ - + diff --git a/app/build.gradle b/app/build.gradle deleted file mode 100644 index eef0a1a..0000000 --- a/app/build.gradle +++ /dev/null @@ -1,137 +0,0 @@ -plugins { - id ("com.android.application") - id ("kotlin-android") - id 'kotlin-parcelize' - id 'kotlin-platform-android' - id 'kotlin-kapt' - id 'dagger.hilt.android.plugin' - id("com.google.devtools.ksp") version("1.8.0-1.0.9") - id 'org.jetbrains.kotlin.android' -} - -android { - namespace 'org.cazait.cazait_android' - compileSdk 33 - - defaultConfig { - applicationId "org.cazait.cazait_android" - minSdk 28 - targetSdk 33 - versionCode 1 - versionName "1.0" - - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - buildTypes { - release { - minifyEnabled 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' - } - buildToolsVersion '33.0.1' - buildFeatures { - dataBinding true - } - buildFeatures { - viewBinding true - } -} - -dependencies { - //AndroidX - implementation 'androidx.core:core-ktx:1.9.0' - implementation 'androidx.appcompat:appcompat:1.6.0' - implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - - //retrofit - implementation "com.squareup.retrofit2:retrofit:$retrofit_version" - implementation 'com.squareup.retrofit2:converter-moshi:2.9.0' - implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofit_version" - - // Add Coroutines - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutine_version" - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4' - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.8' - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-play-services:$coroutine_version" - - //okHttp - implementation "com.squareup.okhttp3:logging-interceptor:$okHttp_version" - implementation "com.squareup.okhttp3:okhttp:$okHttp_version" - - //lifecycle - implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version" - implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.databinding:databinding-runtime:7.4.0' - implementation 'com.android.car.ui:car-ui-lib:2.3.0' - androidTestImplementation "androidx.arch.core:core-testing:$arch_version" - implementation 'androidx.lifecycle:lifecycle-viewmodel-savedstate:2.5.1' - implementation 'androidx.fragment:fragment-ktx:1.5.5' - implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1") - - // splash - implementation("androidx.core:core-splashscreen:1.0.0") - - //room - implementation "androidx.room:room-ktx:$room_version" - implementation("androidx.room:room-runtime:$room_version") - annotationProcessor("androidx.room:room-compiler:$room_version") - implementation "androidx.room:room-rxjava2:$room_version" - testImplementation "androidx.room:room-testing:$room_version" - kapt("androidx.room:room-compiler:$room_version") - - // Preferences DataStore - implementation("androidx.datastore:datastore-preferences:1.0.0") - - // viewpager2 - implementation "androidx.viewpager2:viewpager2:$viewpager2_version" - - - /* Third Party Library */ - - //expandable layout - implementation 'com.github.skydoves:expandablelayout:1.0.7' - - // hilt - implementation "com.google.dagger:hilt-android:$hiltVersion" - kapt "com.google.dagger:hilt-compiler:$hiltVersion" - kapt 'androidx.hilt:hilt-compiler:1.0.0' - implementation 'androidx.hilt:hilt-navigation-compose:1.0.0' - - //naver maps - implementation "com.naver.maps:map-sdk:3.16.2" - - //location request - implementation "com.google.android.gms:play-services-location:$fused_location_provider_client_version" - - //swipe refresh - implementation "androidx.swiperefreshlayout:swiperefreshlayout:$swipe_refresh" - - // Moshi - implementation("com.squareup.moshi:moshi:$moshi_version") - // Gson - implementation 'com.squareup.retrofit2:converter-gson:2.9.0' - - // Dot Indicator - implementation 'com.tbuonomo:dotsindicator:4.3' - - // Glide - implementation 'com.github.bumptech.glide:glide:4.14.2' - annotationProcessor 'com.github.bumptech.glide:compiler:4.14.2' - - implementation 'com.google.android.material:material:1.9.0-alpha01' - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.1.5' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' -} - -kapt { - correctErrorTypes true -} \ No newline at end of file diff --git a/app/build.gradle.kts b/app/build.gradle.kts new file mode 100644 index 0000000..5a2ec63 --- /dev/null +++ b/app/build.gradle.kts @@ -0,0 +1,129 @@ +plugins { + id("com.android.application") + id("kotlin-android") + id("kotlin-parcelize") + id("kotlin-platform-android") + id("kotlin-kapt") + id("dagger.hilt.android.plugin") + id("com.google.devtools.ksp") version ("1.8.0-1.0.9") + id("org.jetbrains.kotlin.android") +} + +android { + namespace = "org.cazait.app" + compileSdk = 33 + + defaultConfig { + applicationId = "org.cazait.cazait" + minSdk = 28 + versionCode = 1 + versionName = "1.0" + } + + buildTypes { + getByName("release") { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + kotlinOptions { + jvmTarget = "17" + } + buildFeatures { + dataBinding = true + } +} + +dependencies { + //AndroidX + implementation("androidx.core:core-ktx:1.9.0") + implementation("androidx.appcompat:appcompat:1.6.0") + implementation("androidx.constraintlayout:constraintlayout:2.1.4") + + //retrofit + implementation("com.squareup.retrofit2:retrofit:2.9.0") + implementation("com.squareup.retrofit2:converter-moshi:2.9.0") + implementation("com.squareup.retrofit2:adapter-rxjava2:2.9.0") + + // Add Coroutines + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4") + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4") + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.8") + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.6.4") + + //okHttp + implementation("com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.11") + implementation("com.squareup.okhttp3:okhttp:5.0.0-alpha.11") + + //lifecycle + implementation("androidx.legacy:legacy-support-v4:1.0.0") + implementation("androidx.databinding:databinding-runtime:7.4.0") + implementation("com.android.car.ui:car-ui-lib:2.3.0") + implementation("androidx.fragment:fragment-ktx:1.5.5") + implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1") + + // splash + implementation("androidx.core:core-splashscreen:1.0.0") + + //room + implementation("androidx.room:room-ktx:2.5.0") + implementation("androidx.room:room-runtime:2.5.0") + annotationProcessor("androidx.room:room-compiler:2.5.0") + testImplementation("androidx.room:room-testing:2.5.0") + kapt("androidx.room:room-compiler:2.5.0") + + // Preferences DataStore + implementation("androidx.datastore:datastore-preferences:1.0.0") + + // viewpager2 + implementation("androidx.viewpager2:viewpager2:1.0.0") + + + /* Third Party Library */ + + //expandable layout + implementation("com.github.skydoves:expandablelayout:1.0.7") + + // hilt + implementation("com.google.dagger:hilt-android:2.44.2") + kapt("com.google.dagger:hilt-compiler:2.44.2") + kapt("androidx.hilt:hilt-compiler:1.0.0") + implementation("androidx.hilt:hilt-navigation-compose:1.0.0") + + //naver maps + implementation("com.naver.maps:map-sdk:3.16.2") + + //location request + implementation("com.google.android.gms:play-services-location:17.0.0") + + //swipe refresh + implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0") + + // Moshi + implementation("com.squareup.moshi:moshi:1.14.0") + // Gson + implementation("com.squareup.retrofit2:converter-gson:2.9.0") + + // Dot Indicator + implementation("com.tbuonomo:dotsindicator:4.3") + + // Glide + implementation("com.github.bumptech.glide:glide:4.14.2") + annotationProcessor("com.github.bumptech.glide:compiler:4.14.2") + + implementation("com.google.android.material:material:1.9.0-alpha01") + testImplementation("junit:junit:4.13.2") + androidTestImplementation("androidx.test.ext:junit:1.1.5") + androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") +} + +kapt { + correctErrorTypes = true +} \ No newline at end of file diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 481bb43..ff59496 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -1,6 +1,6 @@ # Add project specific ProGuard rules here. # You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. +# proguardFiles setting in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 0000000..f17f595 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,28 @@ +[versions] +kotlin = "1.8.20" +material = "1.8.0-rc01" +retrofit = "2.9.0" +okhttp = "5.0.0-alpha.11" + +room = "2.5.0" +viewpager2 = "1.0.0" + +lifecycle = "2.5.1" +arch = "2.1.0" + +hilt = "2.44.2" +naverMap = "3.14.0" +fusedLocation = "17.0.0" + +swipeRefresh = "1.1.0" + +moshi = "1.14.0" + +coroutine = "1.6.4" + +[libraries] + +[plugins] + +[bundles] +