-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
52 changed files
with
738 additions
and
212 deletions.
There are no files selected for viewing
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,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<network-security-config> | ||
<domain-config cleartextTrafficPermitted="true"> | ||
<domain includeSubdomains="true">223.130.130.31</domain> | ||
</domain-config> | ||
</network-security-config> |
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
24 changes: 0 additions & 24 deletions
24
...data/src/androidTest/java/com/goalpanzi/mission_mate/core/data/ExampleInstrumentedTest.kt
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
core/data/src/main/java/com/goalpanzi/mission_mate/core/data/Data.kt
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
core/data/src/main/java/com/goalpanzi/mission_mate/core/data/di/DataModule.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.goalpanzi.mission_mate.core.data.di | ||
|
||
import com.goalpanzi.mission_mate.core.data.repository.LoginRepositoryImpl | ||
import com.goalpanzi.mission_mate.core.domain.repository.LoginRepository | ||
import dagger.Binds | ||
import dagger.Module | ||
import dagger.hilt.InstallIn | ||
import dagger.hilt.components.SingletonComponent | ||
|
||
@Module | ||
@InstallIn(SingletonComponent::class) | ||
internal abstract class DataModule { | ||
|
||
@Binds | ||
abstract fun bindLoginRepository(impl: LoginRepositoryImpl): LoginRepository | ||
} |
27 changes: 27 additions & 0 deletions
27
core/data/src/main/java/com/goalpanzi/mission_mate/core/data/di/DispatchersModule.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,27 @@ | ||
package com.goalpanzi.mission_mate.core.data.di | ||
|
||
import dagger.Module | ||
import dagger.Provides | ||
import dagger.hilt.InstallIn | ||
import dagger.hilt.components.SingletonComponent | ||
import kotlinx.coroutines.CoroutineDispatcher | ||
import kotlinx.coroutines.Dispatchers | ||
import javax.inject.Qualifier | ||
|
||
@Qualifier | ||
@Retention(AnnotationRetention.RUNTIME) | ||
annotation class Dispatcher(val dispatchers: MissionMateDispatcher) | ||
|
||
enum class MissionMateDispatcher { | ||
IO | ||
} | ||
|
||
@Module | ||
@InstallIn(SingletonComponent::class) | ||
interface DispatchersModule { | ||
|
||
@Provides | ||
@Dispatcher(MissionMateDispatcher.IO) | ||
fun providesIODispatcher(): CoroutineDispatcher = Dispatchers.IO | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
...data/src/main/java/com/goalpanzi/mission_mate/core/data/repository/LoginRepositoryImpl.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,18 @@ | ||
package com.goalpanzi.mission_mate.core.data.repository | ||
|
||
import com.goalpanzi.mission_mate.core.domain.repository.LoginRepository | ||
import com.goalpanzi.mission_mate.core.network.service.LoginService | ||
import com.luckyoct.model.GoogleLogin | ||
import com.luckyoct.model.request.GoogleLoginRequest | ||
import javax.inject.Inject | ||
|
||
class LoginRepositoryImpl @Inject constructor( | ||
private val loginService: LoginService | ||
): LoginRepository { | ||
|
||
override suspend fun requestGoogleLogin(token: String, email: String): GoogleLogin { | ||
val request = GoogleLoginRequest(identityToken = token, email = email) | ||
val response = loginService.requestGoogleLogin(request) | ||
return response | ||
} | ||
} |
24 changes: 0 additions & 24 deletions
24
...src/androidTest/java/com/goalpanzi/mission_mate/core/datastore/ExampleInstrumentedTest.kt
This file was deleted.
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
24 changes: 0 additions & 24 deletions
24
...in/src/androidTest/java/com/goalpanzi/mission_mate/core/domain/ExampleInstrumentedTest.kt
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
core/domain/src/main/java/com/goalpanzi/mission_mate/core/domain/Domain.kt
This file was deleted.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
...domain/src/main/java/com/goalpanzi/mission_mate/core/domain/repository/LoginRepository.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.goalpanzi.mission_mate.core.domain.repository | ||
|
||
import com.luckyoct.model.GoogleLogin | ||
|
||
interface LoginRepository { | ||
suspend fun requestGoogleLogin(token: String, email: String): GoogleLogin | ||
} |
13 changes: 13 additions & 0 deletions
13
core/domain/src/main/java/com/goalpanzi/mission_mate/core/domain/usecase/LoginUseCase.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.goalpanzi.mission_mate.core.domain.usecase | ||
|
||
import com.goalpanzi.mission_mate.core.domain.repository.LoginRepository | ||
import com.luckyoct.model.GoogleLogin | ||
import javax.inject.Inject | ||
|
||
class LoginUseCase @Inject constructor( | ||
private val loginRepository: LoginRepository | ||
) { | ||
|
||
suspend fun requestGoogleLogin(token: String, email: String): GoogleLogin = loginRepository.requestGoogleLogin(token, email) | ||
|
||
} |
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,42 @@ | ||
plugins { | ||
alias(libs.plugins.android.library) | ||
alias(libs.plugins.jetbrains.kotlin.android) | ||
alias(libs.plugins.kotlin.plugin.serialization) | ||
} | ||
|
||
android { | ||
namespace = "com.luckyoct.model" | ||
compileSdk = 34 | ||
|
||
defaultConfig { | ||
minSdk = 24 | ||
|
||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
consumerProguardFiles("consumer-rules.pro") | ||
} | ||
|
||
buildTypes { | ||
release { | ||
isMinifyEnabled = false | ||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro" | ||
) | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
} | ||
} | ||
|
||
dependencies { | ||
|
||
implementation(libs.kotlin.serialization.json) | ||
testImplementation(libs.junit) | ||
androidTestImplementation(libs.androidx.junit) | ||
androidTestImplementation(libs.androidx.espresso.core) | ||
} |
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,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
</manifest> |
10 changes: 10 additions & 0 deletions
10
core/model/src/main/java/com/luckyoct/model/GoogleLogin.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,10 @@ | ||
package com.luckyoct.model | ||
|
||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class GoogleLogin( | ||
val accessToken: String, | ||
val refreshToken: String, | ||
val isProfileSet: Boolean | ||
) |
9 changes: 9 additions & 0 deletions
9
core/model/src/main/java/com/luckyoct/model/request/GoogleLoginRequest.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,9 @@ | ||
package com.luckyoct.model.request | ||
|
||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class GoogleLoginRequest( | ||
val identityToken: String, | ||
val email: String | ||
) |
17 changes: 17 additions & 0 deletions
17
core/model/src/test/java/com/luckyoct/model/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.luckyoct.model | ||
|
||
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) | ||
} | ||
} |
10 changes: 0 additions & 10 deletions
10
...rc/androidTest/java/com/goalpanzi/mission_mate/core/navigation/ExampleInstrumentedTest.kt
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
core/navigation/src/main/java/com/goalpanzi/mission_mate/core/navigation/Navigation.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.