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
1 change: 1 addition & 0 deletions app-compose/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ plugins {
alias(libs.plugins.suwiki.android.hilt)
alias(libs.plugins.google.services)
alias(libs.plugins.firebase.crashlytics)
alias(libs.plugins.compose.compiler)
id("com.google.android.gms.oss-licenses-plugin")
}

Expand Down
40 changes: 40 additions & 0 deletions app-compose/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"project_info": {
"project_number": "670329074375",
"firebase_url": "https://uswtime-default-rtdb.firebaseio.com",
"project_id": "uswtime",
"storage_bucket": "uswtime.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:670329074375:android:9d8ee197adad66caa3c4e2",
"android_client_info": {
"package_name": "com.kunize.uswtimetable"
}
},
"oauth_client": [
{
"client_id": "670329074375-hted4csqarhth1nniabtes1dgr2d8loa.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyAavfvK3lvEdyTiV4-JvejD6G1AS5X8G3I"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "670329074375-hted4csqarhth1nniabtes1dgr2d8loa.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}
20 changes: 20 additions & 0 deletions app-compose/release/output-metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.kunize.uswtimetable",
"variantName": "release",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 33,
"versionName": "2.2.5",
"outputFile": "app-compose-release.apk"
}
],
"elementType": "File"
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class AndroidLibraryComposeConventionPlugin : Plugin<Project> {
with(target) {
with(pluginManager) {
apply("com.android.library")
apply("org.jetbrains.kotlin.plugin.compose")
}

extensions.configure<LibraryExtension> {
Expand Down
3 changes: 3 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ plugins {
alias(libs.plugins.ksp) apply false
alias(libs.plugins.hilt) apply false
alias(libs.plugins.protobuf) apply false
alias(libs.plugins.kotlin.multiplatform) apply false
alias(libs.plugins.android.kotlin.multiplatform.library) apply false
alias(libs.plugins.compose.compiler) apply false
}

allprojects {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.suwiki.common.android
import javax.inject.Qualifier

@Qualifier
@Retention(AnnotationRetention.RUNTIME)
annotation class Dispatcher(val suwikiDispatcher: SuwikiDispatchers)

enum class SuwikiDispatchers {
Expand Down
4 changes: 0 additions & 4 deletions common/security/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ dependencies {
implementation(libs.androidx.datastore.core)
implementation(libs.androidx.datastore.preferences)

ksp(libs.encrypted.datastore.preference.ksp)
implementation(libs.encrypted.datastore.preference.ksp.annotations)
implementation(libs.encrypted.datastore.preference.security)

implementation(libs.timber)

testImplementation(libs.junit4)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,17 @@
package com.suwiki.common.security

import kotlinx.coroutines.flow.Flow
import tech.thdev.useful.encrypted.data.store.preferences.ksp.annotations.UsefulPreferences
import tech.thdev.useful.encrypted.data.store.preferences.ksp.annotations.value.ClearValues
import tech.thdev.useful.encrypted.data.store.preferences.ksp.annotations.value.GetValue
import tech.thdev.useful.encrypted.data.store.preferences.ksp.annotations.value.SetValue

@UsefulPreferences(/* option. Not use security - disableSecurity = true */)
interface SecurityPreferences {

@GetValue(KEY_ACCESS_TOKEN, defaultValue = "")
fun flowAccessToken(): Flow<String>

@SetValue(KEY_ACCESS_TOKEN)
suspend fun setAccessToken(value: String)

@GetValue(KEY_REFRESH_TOKEN, defaultValue = "")
fun flowRefreshToken(): Flow<String>

@SetValue(KEY_REFRESH_TOKEN)
suspend fun setRefreshToken(value: String)

@ClearValues
suspend fun clearAll()

companion object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ import androidx.datastore.preferences.core.Preferences
import androidx.datastore.preferences.core.emptyPreferences
import androidx.datastore.preferences.preferencesDataStoreFile
import com.suwiki.common.security.SecurityPreferences
import com.suwiki.common.security.generateSecurityPreferences
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.android.qualifiers.ApplicationContext
import dagger.hilt.components.SingletonComponent
import tech.thdev.useful.encrypted.data.store.preferences.security.generateUsefulSecurity
import kotlinx.coroutines.flow.Flow
import javax.inject.Singleton

@Module
Expand All @@ -37,5 +36,21 @@ object DataStoreModule {
@Provides
fun provideSecurityPreference(
@SecureDataStore dataStore: DataStore<Preferences>,
): SecurityPreferences = dataStore.generateSecurityPreferences(generateUsefulSecurity())
): SecurityPreferences = object : SecurityPreferences {
override fun flowAccessToken(): Flow<String> = kotlinx.coroutines.flow.flowOf("fake_access_token")

override suspend fun setAccessToken(value: String) {
// ์•„๋ฌด ๋™์ž‘๋„ ํ•˜์ง€ ์•Š์Œ (fake ๊ฐ์ฒด)
}

override fun flowRefreshToken(): Flow<String> = kotlinx.coroutines.flow.flowOf("fake_refresh_token")

override suspend fun setRefreshToken(value: String) {
// ์•„๋ฌด ๋™์ž‘๋„ ํ•˜์ง€ ์•Š์Œ (fake ๊ฐ์ฒด)
}

override suspend fun clearAll() {
// ์•„๋ฌด ๋™์ž‘๋„ ํ•˜์ง€ ์•Š์Œ (fake ๊ฐ์ฒด)
}
}
}
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ android.enableJetifier=false
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
ksp.useKSP2=true
28 changes: 19 additions & 9 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[versions]
android-gradle-plugin = "8.5.0"
android-gradle-plugin = "8.9.1"
material = "1.10.0"
espresso = "3.4.0"
ksp = "1.9.10-1.0.13"
ksp = "2.0.21-1.0.28"
google-service = "4.3.15"
firebase-bom = "32.7.0"
firebase-crashlytics = "2.9.9"
Expand Down Expand Up @@ -31,7 +31,7 @@ androidx-recycler-view = "1.3.1"
androidx-splash-screen = "1.0.1"
androidx-datastore = "1.0.0"

kotlin = "1.9.10"
kotlin = "2.0.21"
kotlinx-coroutines = "1.7.3"
kotlinx-serialization-json = "1.5.1"
kotlinx-datetime = "0.4.0"
Expand All @@ -44,11 +44,12 @@ retrofit = "2.9.0"
retrofit-kotlinx-serialization-json = "1.0.0"
okhttp = "4.11.0"

hilt = "2.50"
room = "2.5.2"
hilt = "2.56"
hiltExt = "2.56"
room = "2.7.0"

timber = "5.0.1"
encrypted-datastore = "1.7.21-1.0.8-1.1.0-alpha01"
encrypted-datastore = "2.0.21-1.0.28-1.2.0"
ted-permission = "3.3.0"
coil = "2.4.0"
lottie = "6.0.0"
Expand All @@ -59,12 +60,15 @@ junit4 = "4.13.2"


protobuf-plugin = "0.9.4"
protobuf = "3.24.4"
protobuf = "3.25.5"

espresso-core = "3.5.1"
junit-ktx = "1.1.5"
androidx-test-runner = "1.5.2"
junit = "1.1.5"
kotlin-stdlib = "2.0.20"
kotlin-test = "2.0.20"
core = "1.6.1"

[plugins]
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
Expand All @@ -79,6 +83,9 @@ hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" }
google-services = { id = "com.google.gms.google-services", version.ref = "google-service" }
protobuf = { id = "com.google.protobuf", version.ref = "protobuf-plugin" }
firebase-crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "firebase-crashlytics" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
android-kotlin-multiplatform-library = { id = "com.android.kotlin.multiplatform.library", version.ref = "android-gradle-plugin" }

# Plugins defined by this project
suwiki-android-application = { id = "suwiki.android.application", version = "unspecified" }
Expand Down Expand Up @@ -132,10 +139,10 @@ orbit-compose = { group = "org.orbit-mvi", name = "orbit-compose", version.ref =
orbit-test = { group = "org.orbit-mvi", name = "orbit-test", version.ref = "orbit" }

hilt-android = { group = "com.google.dagger", name = "hilt-android", version.ref = "hilt" }
hilt-compiler = { group = "com.google.dagger", name = "hilt-android-compiler", version.ref = "hilt" }
hilt-compiler = { group = "com.google.dagger", name = "hilt-android-compiler", version.ref = "hiltExt" }
hilt-core = { group = "com.google.dagger", name = "hilt-core", version.ref = "hilt" }
hilt-testing = { module = "com.google.dagger:hilt-android-testing", version.ref = "hilt" }
hilt-testing-compiler = { module = "com.google.dagger:hilt-android-compiler", version.ref = "hilt" }
hilt-testing-compiler = { module = "com.google.dagger:hilt-android-compiler", version.ref = "hiltExt" }

kotlinx-coroutines-android = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-android", version.ref = "kotlinx-coroutines" }
kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }
Expand Down Expand Up @@ -192,6 +199,9 @@ espresso-core = { group = "androidx.test.espresso", name = "espresso-core", vers
protobuf-kotlin-lite = { group = "com.google.protobuf", name = "protobuf-kotlin-lite", version.ref = "protobuf" }
protobuf-protoc = { group = "com.google.protobuf", name = "protoc", version.ref = "protobuf" }
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junit" }
kotlin-stdlib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version.ref = "kotlin-stdlib" }
kotlin-test = { group = "org.jetbrains.kotlin", name = "kotlin-test", version.ref = "kotlin-test" }
androidx-core = { group = "androidx.test", name = "core", version.ref = "core" }

[bundles]
firebase = ["firebase-analytics"]
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading
Loading