-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/jaino/#14 #21
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
43cfd51
[CHORE] #14 : ksp + hilt 종속성 및 플러그인 구현
jeongjaino 77572e2
[CHORE] #14 : hilt 커스텀 플러그인 생성
jeongjaino 250070c
[CHORE] #14 : domain 모듈 생성
jeongjaino 0567f4f
[CHORE] #14 : domain model 모듈 생성
jeongjaino 960fc93
[CHORE] #14 : network 모듈 생성
jeongjaino 66e9386
[CHORE] #14 : build gradle hilt 플러그인 추가
jeongjaino 604c77f
[CHORE] #14 : Hilt Application setup
jeongjaino 1c9286f
[FEATURE] #14 : Network / Firebase DI Module 구현
jeongjaino 11713b5
[FEATURE] #14 : Network / Firebase DI Module 구현
jeongjaino 1990f96
[FEATURE] #14 : Auth DataSource 구현 및 로그인 로직 구현
jeongjaino 01a6687
[FEATURE] #14 : Auth Repository 구현
jeongjaino 9ef517d
[FEATURE] #14 : Repository DI Module 구현
jeongjaino a06cbb7
[FEATURE] #14 : Domain SignInUseCase 구현
jeongjaino fd443ca
[CHORE] #14 : feature Module model, domain 종속성 추가
jeongjaino 9800c6c
[STYLE] #14 : 사용하지 않는 파라미터 삭제
jeongjaino 96e69ce
[CHORE] #14 : Model Module Test Runner 삭제
jeongjaino 117fe37
[STYLE] #14 : 잘못된 임포트 수정
jeongjaino ffcab56
[CHORE] #14 : Ktlint Plugin 임시 삭제
jeongjaino fe5ecea
[CHORE] #14 : app 모듈 Ktlint 적용
jeongjaino a9be0b0
[STYLE] #14 : signIn 함수 반환 값 기차충돌 개선
jeongjaino 9848ea2
[FIX] #14 : Auth 관련 DI 모두 Activity Component로 수정
jeongjaino File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.wap.wapp | ||
|
||
import android.app.Application | ||
import dagger.hilt.android.HiltAndroidApp | ||
|
||
@HiltAndroidApp | ||
class WappApplication : Application() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
build-logic/convention/src/main/java/com/wap/wapp/plugin/AndroidHiltPlugin.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.wap.wapp.plugin | ||
|
||
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 AndroidHiltPlugin: Plugin<Project> { | ||
override fun apply(target: Project) { | ||
with(target){ | ||
pluginManager.apply("com.google.dagger.hilt.android") | ||
pluginManager.apply("com.google.devtools.ksp") | ||
|
||
val libs = extensions.getByType<VersionCatalogsExtension>().named("libs") | ||
|
||
dependencies { | ||
"implementation"(libs.findLibrary("hilt").get()) | ||
"ksp"(libs.findLibrary("hilt.ksp").get()) | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
core/data/src/main/java/com/wap/wapp/core/data/repository/auth/AuthRepository.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.wap.wapp.core.data.repository.auth | ||
|
||
interface AuthRepository { | ||
suspend fun hasPendingResult(): Boolean | ||
|
||
suspend fun signIn(email: String): Result<String> | ||
} | ||
16 changes: 16 additions & 0 deletions
16
core/data/src/main/java/com/wap/wapp/core/data/repository/auth/AuthRepositoryImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.wap.wapp.core.data.repository.auth | ||
|
||
import com.wap.wapp.core.network.source.auth.AuthDataSource | ||
import javax.inject.Inject | ||
|
||
class AuthRepositoryImpl @Inject constructor( | ||
private val authDataSource: AuthDataSource | ||
): AuthRepository { | ||
override suspend fun hasPendingResult(): Boolean { | ||
return authDataSource.hasPendingResult() | ||
} | ||
|
||
override suspend fun signIn(email: String): Result<String> { | ||
return authDataSource.signIn(email) | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
core/data/src/main/java/com/wap/wapp/core/data/repository/di/AuthRepositoryModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.wap.wapp.core.data.repository.di | ||
|
||
import com.wap.wapp.core.data.repository.auth.AuthRepository | ||
import com.wap.wapp.core.data.repository.auth.AuthRepositoryImpl | ||
import dagger.Binds | ||
import dagger.Module | ||
import dagger.hilt.InstallIn | ||
import dagger.hilt.android.components.ActivityComponent | ||
import dagger.hilt.android.scopes.ActivityScoped | ||
|
||
@Module | ||
@InstallIn(ActivityComponent::class) | ||
abstract class AuthRepositoryModule { | ||
@Binds | ||
@ActivityScoped | ||
abstract fun providesAuthRepository( | ||
authRepositoryImpl: AuthRepositoryImpl | ||
): AuthRepository | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
plugins { | ||
id("com.wap.wapp.library") | ||
id("com.wap.wapp.hilt") | ||
} | ||
|
||
android { | ||
namespace = "com.wap.wapp.core.domain" | ||
|
||
defaultConfig { | ||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
consumerProguardFiles("consumer-rules.pro") | ||
} | ||
|
||
buildTypes { | ||
release { | ||
isMinifyEnabled = false | ||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro" | ||
) | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation(project(":core:data")) | ||
implementation(project(":core:model")) | ||
testImplementation(libs.junit) | ||
androidTestImplementation(libs.androidx.test.junit) | ||
androidTestImplementation(libs.androidx.test.espresso) | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
24 changes: 24 additions & 0 deletions
24
core/domain/src/androidTest/java/com/wap/wapp/core/domain/ExampleInstrumentedTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.wap.wapp.core.domain | ||
|
||
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.wap.wapp.core.domain.test", appContext.packageName) | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
core/domain/src/main/java/com/wap/wapp/core/domain/auth/SignInUseCase.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.wap.wapp.core.domain.auth | ||
|
||
import com.wap.wapp.core.data.repository.auth.AuthRepository | ||
import dagger.hilt.android.scopes.ActivityScoped | ||
import javax.inject.Inject | ||
|
||
@ActivityScoped | ||
class SignInUseCase @Inject constructor( | ||
private val repository: AuthRepository | ||
){ | ||
suspend operator fun invoke(email: String): Result<String> = | ||
repository.signIn(email) | ||
} |
17 changes: 17 additions & 0 deletions
17
core/domain/src/test/java/com/wap/wapp/core/domain/ExampleUnitTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.wap.wapp.core.domain | ||
|
||
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) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
plugins { | ||
id("com.wap.wapp.library") | ||
} | ||
|
||
android { | ||
namespace = "com.wap.wapp.core.model" | ||
|
||
defaultConfig { | ||
consumerProguardFiles("consumer-rules.pro") | ||
} | ||
|
||
buildTypes { | ||
release { | ||
isMinifyEnabled = false | ||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro" | ||
) | ||
} | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
plugins { | ||
id("com.wap.wapp.library") | ||
id("com.wap.wapp.hilt") | ||
} | ||
|
||
android { | ||
namespace = "com.wap.wapp.core.network" | ||
|
||
defaultConfig { | ||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
consumerProguardFiles("consumer-rules.pro") | ||
} | ||
|
||
buildTypes { | ||
release { | ||
isMinifyEnabled = false | ||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro" | ||
) | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation(platform(libs.firebase.bom)) | ||
implementation(libs.firebase.auth) | ||
implementation(libs.firebase.firestore) | ||
|
||
testImplementation(libs.junit) | ||
androidTestImplementation(libs.androidx.test.junit) | ||
androidTestImplementation(libs.androidx.test.espresso) | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
함수명 좋네요.
signIn함수는 email만 있으면 되나요 ?.?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AuthDataSourceImpl에서 보실 수 있는데, Activity Context를 사용해, Github Login 웹으로 넘어가 비밀번호를 입력하는 것 같아요!
아마 보안상 이슈때문에, 이런것 같아요