Skip to content

Commit

Permalink
부산대 Android_김현민 6주차 과제 Step0 (kakao-tech-campus-2nd-step2#8)
Browse files Browse the repository at this point in the history
* Initial commit

* Initial commit

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Docs: Update README.md

* Feat: Create item_view

* Feat: Modify main view

* Feat: Implement search list

* Feat: Complete saved element view

* Feat: Complete save action

* Feat: Add persistent save function

* 부산대 Android_김현민_2주차_과제_Step1 (kakao-tech-campus-2nd-step2#2)

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Design: Modify save element design

* Update README.md

* Initial commit

* Fix: Fix Week2 error

* Docs: Update README.md

Step1 README

* Feat: Add initial settings

* Feat: Add Document data class

* Feat: Add RetrofitService interface

* Refactor: Delete DB code

* Feat: Add search function using API

* Feat: Separate CategoryGroupCode

* Docs: Update step2 README.md

* Feat: complete initial project setup

* Feat: Add mapview and map function

* Fix: resolve errors

* Chore: Update network security configuration

* Fix: Resolve windows emulator issue

* Style: Update mapview design

* 부산대 Android_김현민 3주차 과제 Step0 (kakao-tech-campus-2nd-step2#19)

* Initial commit

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Docs: Update README.md

* Feat: Create item_view

* Feat: Modify main view

* Feat: Implement search list

* Feat: Complete saved element view

* Feat: Complete save action

* Feat: Add persistent save function

* 부산대 Android_김현민_2주차_과제_Step1 (kakao-tech-campus-2nd-step2#2)

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Design: Modify save element design

* Update README.md

---------

Co-authored-by: MyStoryG <[email protected]>

* Fix: Reflect feedback

* Fix: Resolve error

* 부산대 Android_김현민 4주차 과제 Step0 (kakao-tech-campus-2nd-step2#16)

* Initial commit

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Docs: Update README.md

* Feat: Create item_view

* Feat: Modify main view

* Feat: Implement search list

* Feat: Complete saved element view

* Feat: Complete save action

* Feat: Add persistent save function

* 부산대 Android_김현민_2주차_과제_Step1 (kakao-tech-campus-2nd-step2#2)

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Design: Modify save element design

* Update README.md

* Initial commit

* Fix: Fix Week2 error

* Docs: Update README.md

Step1 README

* Feat: Add initial settings

* Feat: Add Document data class

* Feat: Add RetrofitService interface

* Refactor: Delete DB code

* Feat: Add search function using API

* Feat: Separate CategoryGroupCode

* Docs: Update step2 README.md

* Feat: complete initial project setup

* Feat: Add mapview and map function

* Fix: resolve errors

* Chore: Update network security configuration

* Fix: Resolve windows emulator issue

* Style: Update mapview design

* 부산대 Android_김현민 3주차 과제 Step0 (kakao-tech-campus-2nd-step2#19)

* Initial commit

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Docs: Update README.md

* Feat: Create item_view

* Feat: Modify main view

* Feat: Implement search list

* Feat: Complete saved element view

* Feat: Complete save action

* Feat: Add persistent save function

* 부산대 Android_김현민_2주차_과제_Step1 (kakao-tech-campus-2nd-step2#2)

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Design: Modify save element design

* Update README.md

---------

Co-authored-by: MyStoryG <[email protected]>

* Fix: Reflect feedback

* Fix: Resolve error

---------

Co-authored-by: MyStoryG <[email protected]>

* Docs: Update README.md

* Feat: Add location marker

* Feat: Add camera movement function

* Feat: Add bottom sheet dialog

* Feat: Add initial camera location function

* Refactor: Resolve initial camera issue and search issue

* Feat: Add map error event

* Design: Modify UI design

* Refactor: Separate function and write annotations

* Docs: Update README.md

* Feat: Add save item click function

* Feat: Add keyword search function

* Refactor: Reflect step1 feedback

* Initial commit

* Feat: Add dependencies

* Test: Add map activity ui test

* Test: Add main activity ui test

* Test: Add main activity unit test

* Test: Add map activity unit test

* 부산대 Android_김현민 4주차 과제 Step1 (kakao-tech-campus-2nd-step2#33)

* Initial commit

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Docs: Update README.md

* Feat: Create item_view

* Feat: Modify main view

* Feat: Implement search list

* Feat: Complete saved element view

* Feat: Complete save action

* Feat: Add persistent save function

* 부산대 Android_김현민_2주차_과제_Step1 (kakao-tech-campus-2nd-step2#2)

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Design: Modify save element design

* Update README.md

* Initial commit

* Fix: Fix Week2 error

* Docs: Update README.md

Step1 README

* Feat: Add initial settings

* Feat: Add Document data class

* Feat: Add RetrofitService interface

* Refactor: Delete DB code

* Feat: Add search function using API

* Feat: Separate CategoryGroupCode

* Docs: Update step2 README.md

* Feat: complete initial project setup

* Feat: Add mapview and map function

* Fix: resolve errors

* Chore: Update network security configuration

* Fix: Resolve windows emulator issue

* Style: Update mapview design

* 부산대 Android_김현민 3주차 과제 Step0 (kakao-tech-campus-2nd-step2#19)

* Initial commit

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Docs: Update README.md

* Feat: Create item_view

* Feat: Modify main view

* Feat: Implement search list

* Feat: Complete saved element view

* Feat: Complete save action

* Feat: Add persistent save function

* 부산대 Android_김현민_2주차_과제_Step1 (kakao-tech-campus-2nd-step2#2)

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Design: Modify save element design

* Update README.md

---------

Co-authored-by: MyStoryG <[email protected]>

* Fix: Reflect feedback

* Fix: Resolve error

* Docs: Update README.md

* Feat: Add location marker

* Feat: Add camera movement function

* Feat: Add bottom sheet dialog

* Feat: Add initial camera location function

* Refactor: Resolve initial camera issue and search issue

* Feat: Add map error event

* Design: Modify UI design

* Refactor: Separate function and write annotations

* Docs: Update README.md

* Feat: Add save item click function

* Feat: Add keyword search function

* Update README.md

---------

Co-authored-by: MyStoryG <[email protected]>

* Fix: Fix conflict error

* Chore: Add dependency and grouping

* 부산대 Android_김현민 5주차 과제 Step0 (kakao-tech-campus-2nd-step2#6)

* Initial commit

* Initial commit

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Docs: Update README.md

* Feat: Create item_view

* Feat: Modify main view

* Feat: Implement search list

* Feat: Complete saved element view

* Feat: Complete save action

* Feat: Add persistent save function

* 부산대 Android_김현민_2주차_과제_Step1 (kakao-tech-campus-2nd-step2#2)

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Design: Modify save element design

* Update README.md

* Initial commit

* Fix: Fix Week2 error

* Docs: Update README.md

Step1 README

* Feat: Add initial settings

* Feat: Add Document data class

* Feat: Add RetrofitService interface

* Refactor: Delete DB code

* Feat: Add search function using API

* Feat: Separate CategoryGroupCode

* Docs: Update step2 README.md

* Feat: complete initial project setup

* Feat: Add mapview and map function

* Fix: resolve errors

* Chore: Update network security configuration

* Fix: Resolve windows emulator issue

* Style: Update mapview design

* 부산대 Android_김현민 3주차 과제 Step0 (kakao-tech-campus-2nd-step2#19)

* Initial commit

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Docs: Update README.md

* Feat: Create item_view

* Feat: Modify main view

* Feat: Implement search list

* Feat: Complete saved element view

* Feat: Complete save action

* Feat: Add persistent save function

* 부산대 Android_김현민_2주차_과제_Step1 (kakao-tech-campus-2nd-step2#2)

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Design: Modify save element design

* Update README.md

---------

Co-authored-by: MyStoryG <[email protected]>

* Fix: Reflect feedback

* Fix: Resolve error

* 부산대 Android_김현민 4주차 과제 Step0 (kakao-tech-campus-2nd-step2#16)

* Initial commit

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Docs: Update README.md

* Feat: Create item_view

* Feat: Modify main view

* Feat: Implement search list

* Feat: Complete saved element view

* Feat: Complete save action

* Feat: Add persistent save function

* 부산대 Android_김현민_2주차_과제_Step1 (kakao-tech-campus-2nd-step2#2)

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Design: Modify save element design

* Update README.md

* Initial commit

* Fix: Fix Week2 error

* Docs: Update README.md

Step1 README

* Feat: Add initial settings

* Feat: Add Document data class

* Feat: Add RetrofitService interface

* Refactor: Delete DB code

* Feat: Add search function using API

* Feat: Separate CategoryGroupCode

* Docs: Update step2 README.md

* Feat: complete initial project setup

* Feat: Add mapview and map function

* Fix: resolve errors

* Chore: Update network security configuration

* Fix: Resolve windows emulator issue

* Style: Update mapview design

* 부산대 Android_김현민 3주차 과제 Step0 (kakao-tech-campus-2nd-step2#19)

* Initial commit

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Docs: Update README.md

* Feat: Create item_view

* Feat: Modify main view

* Feat: Implement search list

* Feat: Complete saved element view

* Feat: Complete save action

* Feat: Add persistent save function

* 부산대 Android_김현민_2주차_과제_Step1 (kakao-tech-campus-2nd-step2#2)

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Design: Modify save element design

* Update README.md

---------

Co-authored-by: MyStoryG <[email protected]>

* Fix: Reflect feedback

* Fix: Resolve error

---------

Co-authored-by: MyStoryG <[email protected]>

* Docs: Update README.md

* Feat: Add location marker

* Feat: Add camera movement function

* Feat: Add bottom sheet dialog

* Feat: Add initial camera location function

* Refactor: Resolve initial camera issue and search issue

* Feat: Add map error event

* Design: Modify UI design

* Refactor: Separate function and write annotations

* Docs: Update README.md

* Feat: Add save item click function

* Feat: Add keyword search function

* Refactor: Reflect step1 feedback

* Feat: Add dependencies

* Test: Add map activity ui test

* Test: Add main activity ui test

* Test: Add main activity unit test

* Test: Add map activity unit test

* 부산대 Android_김현민 4주차 과제 Step1 (kakao-tech-campus-2nd-step2#33)

* Initial commit

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Docs: Update README.md

* Feat: Create item_view

* Feat: Modify main view

* Feat: Implement search list

* Feat: Complete saved element view

* Feat: Complete save action

* Feat: Add persistent save function

* 부산대 Android_김현민_2주차_과제_Step1 (kakao-tech-campus-2nd-step2#2)

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Design: Modify save element design

* Update README.md

* Initial commit

* Fix: Fix Week2 error

* Docs: Update README.md

Step1 README

* Feat: Add initial settings

* Feat: Add Document data class

* Feat: Add RetrofitService interface

* Refactor: Delete DB code

* Feat: Add search function using API

* Feat: Separate CategoryGroupCode

* Docs: Update step2 README.md

* Feat: complete initial project setup

* Feat: Add mapview and map function

* Fix: resolve errors

* Chore: Update network security configuration

* Fix: Resolve windows emulator issue

* Style: Update mapview design

* 부산대 Android_김현민 3주차 과제 Step0 (kakao-tech-campus-2nd-step2#19)

* Initial commit

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Docs: Update README.md

* Feat: Create item_view

* Feat: Modify main view

* Feat: Implement search list

* Feat: Complete saved element view

* Feat: Complete save action

* Feat: Add persistent save function

* 부산대 Android_김현민_2주차_과제_Step1 (kakao-tech-campus-2nd-step2#2)

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Design: Modify save element design

* Update README.md

---------

Co-authored-by: MyStoryG <[email protected]>

* Fix: Reflect feedback

* Fix: Resolve error

* Docs: Update README.md

* Feat: Add location marker

* Feat: Add camera movement function

* Feat: Add bottom sheet dialog

* Feat: Add initial camera location function

* Refactor: Resolve initial camera issue and search issue

* Feat: Add map error event

* Design: Modify UI design

* Refactor: Separate function and write annotations

* Docs: Update README.md

* Feat: Add save item click function

* Feat: Add keyword search function

* Update README.md

---------

Co-authored-by: MyStoryG <[email protected]>

* Fix: Fix conflict error

* Chore: Add dependency and grouping

---------

Co-authored-by: MyStoryG <[email protected]>

* Chore: Edit grouping

* Refactor: Change database to Room

* Fix: Resolve data integrity error

* Refactor: Apply dependency injection

dependency injection about network

* Refactor: Apply dependency injection

dependency injection about map utility

* Refactor: Apply dependency injection

dependency injection about map search service

* Chore: Edit grouping

* Refactor: Apply dependency injection

dependency injection about search save service

* Refactor: Apply dependency injection

dependency injection about bottomsheet

* Fix: Remove test code error

Resolve errors caused by code modification during refactoring process

* Refactor: Reflect step1 feedback

* Chore: Add initial settings

* Refactor: Apply databinding in MainActivity

* Refactor: Apply MVVM in error activity

Utilize LiveData and DataBinding

* 부산대 Android_김현민 5주차 과제 Step1 (kakao-tech-campus-2nd-step2#25)

* Initial commit

* Initial commit

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Docs: Update README.md

* Feat: Create item_view

* Feat: Modify main view

* Feat: Implement search list

* Feat: Complete saved element view

* Feat: Complete save action

* Feat: Add persistent save function

* 부산대 Android_김현민_2주차_과제_Step1 (kakao-tech-campus-2nd-step2#2)

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Design: Modify save element design

* Update README.md

* Initial commit

* Fix: Fix Week2 error

* Docs: Update README.md

Step1 README

* Feat: Add initial settings

* Feat: Add Document data class

* Feat: Add RetrofitService interface

* Refactor: Delete DB code

* Feat: Add search function using API

* Feat: Separate CategoryGroupCode

* Docs: Update step2 README.md

* Feat: complete initial project setup

* Feat: Add mapview and map function

* Fix: resolve errors

* Chore: Update network security configuration

* Fix: Resolve windows emulator issue

* Style: Update mapview design

* 부산대 Android_김현민 3주차 과제 Step0 (kakao-tech-campus-2nd-step2#19)

* Initial commit

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Docs: Update README.md

* Feat: Create item_view

* Feat: Modify main view

* Feat: Implement search list

* Feat: Complete saved element view

* Feat: Complete save action

* Feat: Add persistent save function

* 부산대 Android_김현민_2주차_과제_Step1 (kakao-tech-campus-2nd-step2#2)

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Design: Modify save element design

* Update README.md

---------

Co-authored-by: MyStoryG <[email protected]>

* Fix: Reflect feedback

* Fix: Resolve error

* 부산대 Android_김현민 4주차 과제 Step0 (kakao-tech-campus-2nd-step2#16)

* Initial commit

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Docs: Update README.md

* Feat: Create item_view

* Feat: Modify main view

* Feat: Implement search list

* Feat: Complete saved element view

* Feat: Complete save action

* Feat: Add persistent save function

* 부산대 Android_김현민_2주차_과제_Step1 (kakao-tech-campus-2nd-step2#2)

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Design: Modify save element design

* Update README.md

* Initial commit

* Fix: Fix Week2 error

* Docs: Update README.md

Step1 README

* Feat: Add initial settings

* Feat: Add Document data class

* Feat: Add RetrofitService interface

* Refactor: Delete DB code

* Feat: Add search function using API

* Feat: Separate CategoryGroupCode

* Docs: Update step2 README.md

* Feat: complete initial project setup

* Feat: Add mapview and map function

* Fix: resolve errors

* Chore: Update network security configuration

* Fix: Resolve windows emulator issue

* Style: Update mapview design

* 부산대 Android_김현민 3주차 과제 Step0 (kakao-tech-campus-2nd-step2#19)

* Initial commit

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Docs: Update README.md

* Feat: Create item_view

* Feat: Modify main view

* Feat: Implement search list

* Feat: Complete saved element view

* Feat: Complete save action

* Feat: Add persistent save function

* 부산대 Android_김현민_2주차_과제_Step1 (kakao-tech-campus-2nd-step2#2)

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Design: Modify save element design

* Update README.md

---------

Co-authored-by: MyStoryG <[email protected]>

* Fix: Reflect feedback

* Fix: Resolve error

---------

Co-authored-by: MyStoryG <[email protected]>

* Docs: Update README.md

* Feat: Add location marker

* Feat: Add camera movement function

* Feat: Add bottom sheet dialog

* Feat: Add initial camera location function

* Refactor: Resolve initial camera issue and search issue

* Feat: Add map error event

* Design: Modify UI design

* Refactor: Separate function and write annotations

* Docs: Update README.md

* Feat: Add save item click function

* Feat: Add keyword search function

* Refactor: Reflect step1 feedback

* Feat: Add dependencies

* Test: Add map activity ui test

* Test: Add main activity ui test

* Test: Add main activity unit test

* Test: Add map activity unit test

* 부산대 Android_김현민 4주차 과제 Step1 (kakao-tech-campus-2nd-step2#33)

* Initial commit

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Docs: Update README.md

* Feat: Create item_view

* Feat: Modify main view

* Feat: Implement search list

* Feat: Complete saved element view

* Feat: Complete save action

* Feat: Add persistent save function

* 부산대 Android_김현민_2주차_과제_Step1 (kakao-tech-campus-2nd-step2#2)

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Design: Modify save element design

* Update README.md

* Initial commit

* Fix: Fix Week2 error

* Docs: Update README.md

Step1 README

* Feat: Add initial settings

* Feat: Add Document data class

* Feat: Add RetrofitService interface

* Refactor: Delete DB code

* Feat: Add search function using API

* Feat: Separate CategoryGroupCode

* Docs: Update step2 README.md

* Feat: complete initial project setup

* Feat: Add mapview and map function

* Fix: resolve errors

* Chore: Update network security configuration

* Fix: Resolve windows emulator issue

* Style: Update mapview design

* 부산대 Android_김현민 3주차 과제 Step0 (kakao-tech-campus-2nd-step2#19)

* Initial commit

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Docs: Update README.md

* Feat: Create item_view

* Feat: Modify main view

* Feat: Implement search list

* Feat: Complete saved element view

* Feat: Complete save action

* Feat: Add persistent save function

* 부산대 Android_김현민_2주차_과제_Step1 (kakao-tech-campus-2nd-step2#2)

* Docs: Update README.md

* Feat: Complete search screen layout

* Feat: Add data to the database

* Design: Modify save element design

* Update README.md

---------

Co-authored-by: MyStoryG <[email protected]>

* Fix: Reflect feedback

* Fix: Resolve error

* Docs: Update README.md

* Feat: Add location marker

* Feat: Add camera movement function

* Feat: Add bottom sheet dialog

* Feat: Add initial camera location function

* Refactor: Resolve initial camera issue and search issue

* Feat: Add map error event

* Design: Modify UI design

* Refactor: Separate function and write annotations

* Docs: Update README.md

* Feat: Add save item click function

* Feat: Add keyword search function

* Update README.md

---------

Co-authored-by: MyStoryG <[email protected]>

* Fix: Fix conflict error

* Chore: Add dependency and grouping

* Chore: Edit grouping

* Refactor: Change database to Room

* Fix: Resolve data integrity error

* Refactor: Apply dependency injection

dependency injection about network

* Refactor: Apply dependency injection

dependency injection about map utility

* Refactor: Apply dependency injection

dependency injection about map search service

* Chore: Edit grouping

* Refactor: Apply dependency injection

dependency injection about search save service

* Refactor: Apply dependency injection

dependency injection about bottomsheet

* Fix: Remove test code error

Resolve errors caused by code modification during refactoring process

---------

Co-authored-by: MyStoryG <[email protected]>

* Refactor: Change asynchronous to coroutine

* Refactor: Apply MVVM in map activity

Utilize LiveData and DataBinding

* Chore: Modify error activity code

* Refactor: Apply MVVM in main activity

Utilize LiveData and DataBinding

* Chore: Prepare step0

---------

Co-authored-by: MyStoryG <[email protected]>
  • Loading branch information
khyeonm and MyStoryG authored Jul 29, 2024
1 parent 2967c62 commit 3b1c629
Show file tree
Hide file tree
Showing 49 changed files with 1,645 additions and 39 deletions.
66 changes: 55 additions & 11 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties


fun getApiKey(key: String): String {
return gradleLocalProperties(rootDir, providers).getProperty(key) ?: ""
}

plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
Expand All @@ -12,14 +19,33 @@ android {
namespace = "campus.tech.kakao.map"
compileSdk = 34

dataBinding {
enable = true
}
defaultConfig {
applicationId = "campus.tech.kakao.map"
minSdk = 26
targetSdk = 34
versionCode = 1
versionName = "1.0"


ndk {
abiFilters.add("arm64-v8a")
abiFilters.add("armeabi-v7a")
abiFilters.add("x86")
abiFilters.add("x86_64")
}

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
buildConfigField("String", "KAKAO_API_KEY", getApiKey("KAKAO_API_KEY"))
buildConfigField("String", "KAKAO_REST_API_KEY", getApiKey("KAKAO_REST_API_KEY"))
// manifest에서 사용하려고 만듦
manifestPlaceholders["KAKAO_API_KEY"] = getApiKey("KAKAO_API_KEY")
}

testOptions {
animationsDisabled = true
}

buildTypes {
Expand All @@ -41,45 +67,63 @@ android {

buildFeatures {
dataBinding = true
viewBinding = true
buildConfig = true
}
}

dependencies {

implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.3")
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.8.3")
implementation("androidx.room:room-runtime:2.6.1")
implementation("androidx.activity:activity-ktx:1.9.0")
implementation("androidx.room:room-ktx:2.6.1")
testImplementation("androidx.room:room-testing:2.6.1")
// implementation("androidx.core:core-ktx:1.12.0")
implementation("androidx.core:core-ktx:1.13.1")
// implementation("androidx.appcompat:appcompat:1.6.1")
implementation("androidx.appcompat:appcompat:1.7.0")
implementation("com.google.android.material:material:1.12.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("androidx.recyclerview:recyclerview:1.3.2")
implementation("androidx.datastore:datastore-preferences:1.0.0")
implementation("com.squareup.retrofit2:retrofit:2.11.0")
implementation("com.squareup.retrofit2:converter-gson:2.11.0")
implementation("com.kakao.maps.open:android:2.9.5")
implementation("androidx.activity:activity-ktx:1.9.0")
implementation("androidx.test:core-ktx:1.6.1")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.3")
implementation("androidx.room:room-runtime:2.6.1")
kapt("androidx.room:room-compiler:2.6.1")
implementation("androidx.activity:activity:1.8.0")
// implementation("com.kakao.sdk:v2-all:2.20.3")
implementation("com.google.dagger:hilt-android:2.48.1")
kapt("com.google.dagger:hilt-compiler:2.48.1")
implementation("androidx.activity:activity-ktx:1.9.0")
implementation("androidx.room:room-ktx:2.6.1")
implementation(platform("com.google.firebase:firebase-bom:33.1.2"))
implementation("com.google.firebase:firebase-analytics-ktx")
implementation("com.google.firebase:firebase-analytics")
implementation("com.google.firebase:firebase-config-ktx:22.0.0")
implementation("com.google.firebase:firebase-messaging-ktx:24.0.0")
testImplementation("androidx.room:room-testing:2.6.1")
kapt("com.google.dagger:hilt-compiler:2.48.1")
kapt("androidx.room:room-compiler:2.6.1")
implementation("androidx.test.espresso:espresso-contrib:3.6.1")
// implementation("androidx.test:core-ktx:1.5.0")
implementation("androidx.test:core-ktx:1.6.1")
testImplementation("junit:junit:4.13.2")
testImplementation("io.mockk:mockk-android:1.13.11")
testImplementation("io.mockk:mockk-agent:1.13.11")
testImplementation("androidx.arch.core:core-testing:2.2.0")
testImplementation("org.robolectric:robolectric:4.11.1")
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3")
androidTestImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3")
debugImplementation("androidx.fragment:fragment-testing:1.8.1")
androidTestUtil("androidx.test:orchestrator:1.4.2")
// androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.ext:junit:1.2.1")
androidTestImplementation("androidx.test.ext:truth:1.5.0")
androidTestImplementation("androidx.test:core:1.5.0")
androidTestImplementation("androidx.test:runner:1.5.2")
androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1")
// androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
// androidTestImplementation("androidx.test:rules:1.5.0")
androidTestImplementation("androidx.test:rules:1.6.1")
androidTestImplementation("androidx.test.espresso:espresso-intents:3.6.1")
androidTestImplementation("com.google.dagger:hilt-android-testing:2.48.1")
testImplementation("com.google.dagger:hilt-android-testing:2.48.1")
kaptTest("com.google.dagger:hilt-android-compiler:2.48.1")
kaptAndroidTest("com.google.dagger:hilt-android-compiler:2.48.1")
androidTestImplementation("com.google.dagger:hilt-android-testing:2.48.1")
}
93 changes: 93 additions & 0 deletions app/src/androidTest/java/campus/tech/kakao/map/MainActivityTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
package campus.tech.kakao.map

import androidx.recyclerview.widget.RecyclerView
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.action.ViewActions.click
import androidx.test.espresso.action.ViewActions.replaceText
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.contrib.RecyclerViewActions
import androidx.test.espresso.intent.Intents
import androidx.test.espresso.intent.matcher.IntentMatchers
import androidx.test.espresso.matcher.ViewMatchers
import androidx.test.espresso.matcher.ViewMatchers.withEffectiveVisibility
import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.ext.junit.rules.ActivityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import campus.tech.kakao.map.ui.MainActivity
import campus.tech.kakao.map.ui.MapActivity
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith

@RunWith(AndroidJUnit4::class)
class MainActivityTest {

@get:Rule
val mainActivity = ActivityScenarioRule(MainActivity::class.java)

@Test
fun 검색창에_검색어를_입력한다(){
onView(withId(R.id.etSearch))
.perform(replaceText("입력테스트"))
.check(matches(withText("입력테스트")))
}
@Test
fun 검색창의_x버튼을_누르면_검색어가_삭제된다() {
onView(withId(R.id.etSearch))
.perform(replaceText("삭제테스트"))

onView(withId(R.id.btnClose))
.perform(click())

onView(withId(R.id.etSearch))
.check(matches(withText("")))
}
@Test
fun 장소를_선택하면_지도가_펼쳐진다() {
Intents.init()
onView(withId(R.id.etSearch)).perform(replaceText("성심당본점"))
Thread.sleep(800)
onView(withId(R.id.recyclerView))
.perform(
RecyclerViewActions.actionOnItemAtPosition<RecyclerView.ViewHolder>(
0, click()
)
)
Intents.intended(IntentMatchers.hasComponent(MapActivity::class.java.name))
Intents.release()
}

@Test
fun 검색어를_입력하면_목록이_나타난다() {
onView(withId(R.id.etSearch))
.perform(replaceText(""))

Thread.sleep(1000)

onView(withId(R.id.tvNoResult))
.check(matches(withEffectiveVisibility(ViewMatchers.Visibility.GONE)))
}


// @Test
// fun 지도화면에서_뒤로가기를_두번누르면_검색화면이_펼쳐진다() {
// Intents.init()
// onView(withId(R.id.etSearch)).perform(replaceText("성심당본점"))
// Thread.sleep(1000)
// onView(withId(R.id.recyclerView))
// .perform(
// RecyclerViewActions.actionOnItemAtPosition<RecyclerView.ViewHolder>(
// 0, click()
// )
// )
// Intents.intended(IntentMatchers.hasComponent(MapActivity::class.java.name))
//
// Thread.sleep(800)
// pressBack()
// pressBack()
//
// Intents.intended(IntentMatchers.hasComponent(MainActivity::class.java.name))
// Intents.release()
// }
}
57 changes: 57 additions & 0 deletions app/src/androidTest/java/campus/tech/kakao/map/MainUnitTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
package campus.tech.kakao.map

import android.content.Context
import android.content.SharedPreferences
import androidx.test.core.app.ActivityScenario
import androidx.test.core.app.ApplicationProvider
import androidx.test.ext.junit.runners.AndroidJUnit4
import campus.tech.kakao.map.ui.MainActivity
import org.junit.After
import org.junit.Assert.assertEquals
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith

@RunWith(AndroidJUnit4::class)
class MainUnitTest {
lateinit var sharedPreferences: SharedPreferences
@Before
fun before() {
val context = ApplicationProvider.getApplicationContext<Context>()
sharedPreferences = context.getSharedPreferences("SavedItems", Context.MODE_PRIVATE)
sharedPreferences.edit().clear().apply()
}

@After
fun after() {
sharedPreferences.edit().clear().apply()
}
// refactoring 으로 인해 오류가 떠서 주석처리
// @Test
// fun addAndRemoveSaveItem() {
// val scenario = ActivityScenario.launch(MainActivity::class.java)
//
// scenario.onActivity { activity ->
//
// activity.addSavedItem("성심당 본점")
// activity.removeSavedItem("성심당 본점")
// assertEquals(0, activity.llSave.childCount)
// }
// scenario.close()
// }
// @Test
// fun addAndLoadSaveItem() {
// val scenario = ActivityScenario.launch(MainActivity::class.java)
//
// scenario.onActivity { mainActivity ->
// mainActivity.addSavedItem("성심당")
// mainActivity.saveSavedItems()
// mainActivity.llSave.removeAllViews()
// mainActivity.loadSavedItems()
//
// assertEquals(1, mainActivity.llSave.childCount)
// }
//
// scenario.close()
// }
}
30 changes: 30 additions & 0 deletions app/src/androidTest/java/campus/tech/kakao/map/MapActivityTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package campus.tech.kakao.map

import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.action.ViewActions.click
import androidx.test.espresso.intent.Intents
import androidx.test.espresso.intent.matcher.IntentMatchers.hasComponent
import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.ext.junit.rules.ActivityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import campus.tech.kakao.map.ui.MainActivity
import campus.tech.kakao.map.ui.MapActivity
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith

@RunWith(AndroidJUnit4::class)
class MapActivityTest {
@get:Rule
val mapActivity = ActivityScenarioRule(MapActivity::class.java)

@Test
fun 지도화면에서_검색창을_누르면_목록화면으로_이동한다() {
Intents.init()
onView(withId(R.id.etSearch))
.perform(click())
Intents.intended(hasComponent(MainActivity::class.java.name))
Intents.release()
}

}
48 changes: 48 additions & 0 deletions app/src/androidTest/java/campus/tech/kakao/map/MapUnitTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package campus.tech.kakao.map

import android.content.Context
import android.content.SharedPreferences
import androidx.test.core.app.ActivityScenario
import androidx.test.core.app.ApplicationProvider
import campus.tech.kakao.map.ui.MapActivity
import org.junit.After
import org.junit.Assert.assertEquals
import org.junit.Before
import org.junit.Test

class MapUnitTest {
lateinit var sharedPreferences: SharedPreferences

@Before
fun before() {
val context = ApplicationProvider.getApplicationContext<Context>()
sharedPreferences = context.getSharedPreferences("pref", Context.MODE_PRIVATE)
sharedPreferences.edit().clear().apply()
}

@After
fun after() {
sharedPreferences.edit().clear().apply()
}

@Test
fun exitAppAndSaveLocation() {
val scenario = ActivityScenario.launch(MapActivity::class.java)

scenario.onActivity { activity ->
val latitude = 35.0
val longitude = 129.0
activity.saveData(latitude.toString(), longitude.toString())

activity.loadData()

val savedLatitude = sharedPreferences.getString("latitude", null)?.toDoubleOrNull()
val savedLongitude = sharedPreferences.getString("longitude", null)?.toDoubleOrNull()

assertEquals(latitude, savedLatitude)
assertEquals(longitude, savedLongitude)
}

scenario.close()
}
}
Loading

0 comments on commit 3b1c629

Please sign in to comment.