Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions .github/workflows/android-pull-request-ci.yml

This file was deleted.

14 changes: 11 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,19 @@ dependencies {
implementation(projects.core.network)
implementation(projects.core.navigation)

implementation(projects.data)
implementation(projects.local)
implementation(projects.domain.oauth)

implementation(projects.data.oauth)
implementation(projects.local.oauth)
implementation(projects.remote)
implementation(projects.domain)

implementation(projects.feature.main)
implementation(projects.feature.oauth)
implementation(projects.feature.onboarding)
implementation(projects.feature.place)
implementation(projects.feature.course)
implementation(projects.feature.mypage)
implementation(projects.feature.maps)

implementation(libs.kakao.login)
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package com.teamsolply.solply.datastore
import android.security.keystore.KeyGenParameterSpec
import android.security.keystore.KeyProperties
import androidx.datastore.core.Serializer
import kotlinx.serialization.InternalSerializationApi
import kotlinx.serialization.json.Json
import java.io.InputStream
import java.io.OutputStream
Expand All @@ -12,9 +11,9 @@ import javax.crypto.Cipher
import javax.crypto.KeyGenerator
import javax.crypto.SecretKey
import javax.crypto.spec.GCMParameterSpec
import javax.inject.Inject

@OptIn(InternalSerializationApi::class)
class SolplySecureDataStoreSerializer : Serializer<SolplyLocalData> {
class SolplySecureDataStoreSerializer @Inject constructor() : Serializer<SolplyTokenData> {
companion object {
private const val KEYSTORE_PROVIDER = "AndroidKeyStore"
private const val KEY_ALIAS = "data-store-key"
Expand Down Expand Up @@ -49,10 +48,10 @@ class SolplySecureDataStoreSerializer : Serializer<SolplyLocalData> {
keyGenerator.generateKey()
}

override val defaultValue: SolplyLocalData
get() = SolplyLocalData()
override val defaultValue: SolplyTokenData
get() = SolplyTokenData()

override suspend fun readFrom(input: InputStream): SolplyLocalData {
override suspend fun readFrom(input: InputStream): SolplyTokenData {
return try {
val encryptedDataWithIv = input.readBytes()
if (encryptedDataWithIv.size < IV_SIZE) {
Expand All @@ -69,7 +68,7 @@ class SolplySecureDataStoreSerializer : Serializer<SolplyLocalData> {

val decryptedBytes = cipher.doFinal(encryptedData)
Json.decodeFromString(
deserializer = SolplyLocalData.serializer(),
deserializer = SolplyTokenData.serializer(),
string = decryptedBytes.decodeToString()
)
} catch (e: Exception) {
Expand All @@ -78,10 +77,10 @@ class SolplySecureDataStoreSerializer : Serializer<SolplyLocalData> {
}
}

override suspend fun writeTo(t: SolplyLocalData, output: OutputStream) {
override suspend fun writeTo(t: SolplyTokenData, output: OutputStream) {
try {
val serializedData = Json.encodeToString(
serializer = SolplyLocalData.serializer(),
serializer = SolplyTokenData.serializer(),
value = t
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.teamsolply.solply.datastore

import kotlinx.serialization.InternalSerializationApi
import kotlinx.serialization.Serializable

@InternalSerializationApi
@Serializable
data class SolplyLocalData(
data class SolplyTokenData(
val accessToken: String = "",
val refreshToken: String = "",
val autoSignIn: Boolean = false
)
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,24 @@ import android.content.Context
import androidx.datastore.core.DataStore
import androidx.datastore.core.DataStoreFactory
import androidx.datastore.dataStoreFile
import com.teamsolply.solply.datastore.SolplyLocalData
import com.teamsolply.solply.datastore.SolplySecureDataStoreSerializer
import com.teamsolply.solply.datastore.SolplyTokenData
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.android.qualifiers.ApplicationContext
import dagger.hilt.components.SingletonComponent
import kotlinx.serialization.InternalSerializationApi
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
object DataStoreModule {
@OptIn(InternalSerializationApi::class)
@Provides
@Singleton
fun providesDataStore(
@ApplicationContext context: Context,
solplySecureDataStoreSerializer: SolplySecureDataStoreSerializer
): DataStore<SolplyLocalData> =
): DataStore<SolplyTokenData> =
DataStoreFactory.create(
serializer = solplySecureDataStoreSerializer
) {
Expand Down
19 changes: 0 additions & 19 deletions data/build.gradle.kts

This file was deleted.

File renamed without changes.
12 changes: 12 additions & 0 deletions data/oauth/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
plugins {
alias(libs.plugins.solply.data)
}

android {
namespace = "com.teamsolply.solply.oauth"
}

dependencies {
implementation(projects.core.datastore)
implementation(projects.domain.oauth)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.teamsolply.solply.oauth.di

import com.teamsolply.solply.oauth.repository.OauthRepository
import com.teamsolply.solply.oauth.repository.OauthRepositoryImpl
import dagger.Binds
import dagger.Module
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
abstract class OauthDataModule {
@Binds
@Singleton
abstract fun bindsOauthRepository(oauthRepositoryImpl: OauthRepositoryImpl): OauthRepository
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.teamsolply.solply.oauth.repository

import com.teamsolply.solply.datastore.SolplyTokenData
import com.teamsolply.solply.oauth.model.TokenEntity
import com.teamsolply.solply.oauth.source.OauthLocalDataSource
import javax.inject.Inject

class OauthRepositoryImpl @Inject constructor(
private val oauthLocalDataSource: OauthLocalDataSource
) : OauthRepository {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

โš ๏ธ Potential issue

OauthRepository ์ธํ„ฐํŽ˜์ด์Šค import๊ฐ€ ๋ˆ„๋ฝ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

ํด๋ž˜์Šค๊ฐ€ OauthRepository๋ฅผ ๊ตฌํ˜„ํ•˜๊ณ  ์žˆ์ง€๋งŒ ํ•ด๋‹น ์ธํ„ฐํŽ˜์ด์Šค์˜ import๋ฌธ์ด ๋ˆ„๋ฝ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค. ์ปดํŒŒ์ผ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋‹ค์Œ import๋ฅผ ์ถ”๊ฐ€ํ•ด์ฃผ์„ธ์š”:

+import com.teamsolply.solply.oauth.repository.OauthRepository

Committable suggestion skipped: line range outside the PR's diff.

๐Ÿค– Prompt for AI Agents
In
data/oauth/src/main/java/com/teamsolply/solply/oauth/repository/OauthRepositoryImpl.kt
at line 10, the OauthRepository interface is implemented but its import
statement is missing. Add the appropriate import statement for OauthRepository
at the top of the file to resolve the compilation error.

override suspend fun saveJwtToken(jwtToken: TokenEntity): Result<Unit> = runCatching {
oauthLocalDataSource.setAuthLocalData(
jwtToken = SolplyTokenData(
accessToken = jwtToken.accessToken,
refreshToken = jwtToken.refreshToken
)
)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.teamsolply.solply.oauth.source

import com.teamsolply.solply.datastore.SolplyTokenData

interface OauthLocalDataSource {
suspend fun setAuthLocalData(jwtToken: SolplyTokenData)
}

This file was deleted.

1 change: 1 addition & 0 deletions domain/oauth/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package com.teamsolply.solply.oauth.model

data class TokenEntity(
val accessToken: String,
val refreshToken: String
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.teamsolply.solply.oauth.repository

import com.teamsolply.solply.oauth.model.TokenEntity

interface OauthRepository {
suspend fun saveJwtToken(jwtToken: TokenEntity): Result<Unit>
}

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 1 addition & 0 deletions feature/course/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
7 changes: 7 additions & 0 deletions feature/course/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
plugins {
alias(libs.plugins.solply.feature)
}

android {
namespace = "com.teamsolply.solply.course"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package com.teamsolply.solply.course

import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier

@Composable
fun CourseRoute(
paddingValues: PaddingValues
) {
CourseScreen()
}

@Composable
fun CourseScreen(
modifier: Modifier = Modifier

) {
Column(
modifier.fillMaxSize(),
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally
) {
Text(
"Course"
)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package com.teamsolply.solply.course.navigation

import androidx.compose.foundation.layout.PaddingValues
import androidx.navigation.NavController
import androidx.navigation.NavGraphBuilder
import androidx.navigation.NavOptions
import androidx.navigation.compose.composable
import com.teamsolply.solply.course.CourseRoute
import com.teamsolply.solply.navigation.Route
import kotlinx.serialization.Serializable

fun NavController.navigateCourse(
navOptions: NavOptions
) {
navigate(Course, navOptions)
}

fun NavGraphBuilder.courseNavGraph(
paddingValues: PaddingValues
) {
composable<Course> {
CourseRoute(
paddingValues = paddingValues
)
}
}

@Serializable
data object Course : Route
Empty file removed feature/home/consumer-rules.pro
Empty file.
21 changes: 0 additions & 21 deletions feature/home/proguard-rules.pro

This file was deleted.

6 changes: 5 additions & 1 deletion feature/main/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@ android {

dependencies {
implementation(projects.feature.oauth)
implementation(projects.feature.home)
implementation(projects.feature.onboarding)
implementation(projects.feature.place)
implementation(projects.feature.course)
implementation(projects.feature.maps)
implementation(projects.feature.mypage)
}
Loading