Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
WIP Version catalog + Devex fixes (#2531)
Browse files Browse the repository at this point in the history
* WIP: Migrate to Version Catalog and delete some legacy code

* Trigger CI checks on PR

* Add CODEOWNERS

* Update PR template
  • Loading branch information
ILIYANGERMANOV authored Sep 2, 2023
1 parent e3c4041 commit 8b0c1d6
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 68 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @ILIYANGERMANOV
1 change: 0 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Please check if your pull request fulfills the following requirements:
- [ ] I've read the **[Contribution Guidelines](https://github.com/Ivy-Apps/ivy-wallet/blob/main/CONTRIBUTING.md)**.
- [ ] The code builds and is tested on a real Android device.
- [ ] I confirm that I've run the code locally and everything works as expected.
- [ ] Request a review from **@ILIYANGERMANOV**.

_Put an `x` in the boxes that apply._
- [x] Demo: Checking checkbox using `[x]`
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
# Triggers the workflow on push or pull request events
push:

pull_request:

jobs:
assemble_demo_apk:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
# Triggers the workflow on push or pull request events
push:

pull_request:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
lint:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
# Triggers the workflow on push or pull request events
push:

pull_request:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
test:
Expand Down
2 changes: 2 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ dependencies {
implementation(libs.bundles.compose)
implementation(libs.bundles.glance)
implementation(libs.bundles.activity)
implementation(libs.bundles.google)
implementation(libs.bundles.firebase)
implementation(libs.datastore)
implementation(libs.androidx.security)
implementation(libs.androidx.biometrics)
Expand Down
7 changes: 0 additions & 7 deletions app/src/main/java/com/ivy/wallet/AppModuleDI.kt
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,6 @@ object AppModuleDI {
return RestClient.initialize(appContext, ivySession, gson)
}

@Provides
fun provideFCMClient(
sharedPrefs: SharedPrefs
): FCMClient {
return FCMClient(sharedPrefs)
}

@Provides
@Singleton
fun provideIvyRoomDatabase(
Expand Down
30 changes: 0 additions & 30 deletions app/src/main/java/com/ivy/wallet/io/network/FCMClient.kt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@ import com.ivy.wallet.domain.data.IvyCurrency
import com.ivy.wallet.domain.data.core.Account
import com.ivy.wallet.domain.data.core.Category
import com.ivy.wallet.domain.data.core.Settings
import com.ivy.wallet.domain.deprecated.logic.*
import com.ivy.wallet.domain.deprecated.logic.AccountCreator
import com.ivy.wallet.domain.deprecated.logic.CategoryCreator
import com.ivy.wallet.domain.deprecated.logic.LogoutLogic
import com.ivy.wallet.domain.deprecated.logic.PreloadDataLogic
import com.ivy.wallet.domain.deprecated.logic.WalletAccountLogic
import com.ivy.wallet.domain.deprecated.logic.currency.ExchangeRatesLogic
import com.ivy.wallet.domain.deprecated.logic.model.CreateAccountData
import com.ivy.wallet.domain.deprecated.logic.model.CreateCategoryData
import com.ivy.wallet.domain.deprecated.logic.notification.TransactionReminderLogic
import com.ivy.wallet.domain.deprecated.sync.IvySync
import com.ivy.wallet.io.network.FCMClient
import com.ivy.wallet.io.network.IvyAnalytics
import com.ivy.wallet.io.network.IvySession
import com.ivy.wallet.io.network.RestClient
Expand Down Expand Up @@ -48,7 +51,6 @@ class OnboardingViewModel @Inject constructor(
private val accountDao: AccountDao,
private val settingsDao: SettingsDao,
private val restClient: RestClient,
private val fcmClient: FCMClient,
private val session: IvySession,
private val accountLogic: WalletAccountLogic,
private val categoryCreator: CategoryCreator,
Expand Down Expand Up @@ -188,10 +190,11 @@ class OnboardingViewModel @Inject constructor(
private suspend fun loginWithGoogleOnServer(idToken: String) {
TestIdlingResource.increment()

// TODO: Delete this legacy code
val authResponse = restClient.authService.googleSignIn(
GoogleSignInRequest(
googleIdToken = idToken,
fcmToken = fcmClient.fcmToken()
fcmToken = ""
)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import com.ivy.wallet.domain.deprecated.logic.csv.ExportCSVLogic
import com.ivy.wallet.domain.deprecated.logic.currency.ExchangeRatesLogic
import com.ivy.wallet.domain.deprecated.logic.zip.BackupLogic
import com.ivy.wallet.domain.deprecated.sync.IvySync
import com.ivy.wallet.io.network.FCMClient
import com.ivy.wallet.io.network.IvyAnalytics
import com.ivy.wallet.io.network.IvySession
import com.ivy.wallet.io.network.RestClient
Expand Down Expand Up @@ -55,7 +54,6 @@ class SettingsViewModel @Inject constructor(
private val ivySync: IvySync,
private val exportCSVLogic: ExportCSVLogic,
private val restClient: RestClient,
private val fcmClient: FCMClient,
private val ivyAnalytics: IvyAnalytics,
private val exchangeRatesLogic: ExchangeRatesLogic,
private val logoutLogic: LogoutLogic,
Expand Down Expand Up @@ -285,7 +283,7 @@ class SettingsViewModel @Inject constructor(
val authResponse = restClient.authService.googleSignIn(
GoogleSignInRequest(
googleIdToken = idToken,
fcmToken = fcmClient.fcmToken()
fcmToken = ""
)
)

Expand Down
23 changes: 0 additions & 23 deletions buildSrc/src/main/java/com/ivy/wallet/buildsrc/dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ fun DependencyHandler.appModuleDependencies(

// Compose(version = GlobalVersions.compose)

Google()
Firebase()

Hilt(
hiltVersion = "2.47",
Expand Down Expand Up @@ -92,27 +90,6 @@ fun DependencyHandler.ivyDesignModuleDependencies(
}
//---------------------------------------------------------------------------------

fun DependencyHandler.DataStore() {
implementation("androidx.datastore:datastore-preferences:1.0.0")
}

fun DependencyHandler.Google() {
//URL: https://mvnrepository.com/artifact/com.google.android.gms/play-services-auth
implementation("com.google.android.gms:play-services-auth:19.2.0")

//URL: https://developer.android.com/google/play/billing/getting-ready
implementation("com.android.billingclient:billing-ktx:6.0.1")

//In-App Reviews SDK
implementation("com.google.android.play:core:1.10.0")
implementation("com.google.android.play:core-ktx:1.8.1")
}

fun DependencyHandler.Firebase() {
implementation("com.google.firebase:firebase-crashlytics:17.3.0")
implementation("com.google.firebase:firebase-analytics:18.0.0")
implementation("com.google.firebase:firebase-messaging:21.0.0")
}

/**
* Hilt DI
Expand Down
19 changes: 19 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ androidx-security = "1.0.0"
androidx-activity = "1.8.0-alpha07"
appcompat-activity = "1.7.0-alpha03"
androidx-biometrics = "1.2.0-alpha05"
google-playservices-auth = "20.7.0"
google-billing = "6.0.1"
google-play-core = "1.10.0"
google-play-core-ktx = "1.8.1"
firebase-crashlytics = "17.3.0"

[libraries]
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
Expand Down Expand Up @@ -58,6 +63,11 @@ androidx-security = { module = "androidx.security:security-crypto", version.ref
androidx-biometrics = { module = "androidx.biometric:biometric", version.ref = "androidx-biometrics" }
androidx-activity = { module = "androidx.activity:activity-ktx", version.ref = "androidx-activity" }
appcompat-activity = { module = "androidx.appcompat:appcompat", version.ref = "appcompat-activity" }
google-playservices-auth = { module = "com.google.android.gms:play-services-auth", version.ref = "google-playservices-auth" }
google-billing = { module = "com.android.billingclient:billing-ktx", version.ref = "google-billing" }
google-play-core = { module = "com.google.android.play:core", version.ref = "google-play-core" }
google-play-core-ktx = { module = "com.google.android.play:core-ktx", version.ref = "google-play-core-ktx" }
firebase-crashlytics = { module = "com.google.firebase:firebase-crashlytics", version.ref = "firebase-crashlytics" }

[bundles]
kotlin = [
Expand Down Expand Up @@ -110,6 +120,15 @@ glance = [
"glance-appwidget",
"glance-material3"
]
google = [
"google-playservices-auth",
"google-billing",
"google-play-core",
"google-play-core-ktx"
]
firebase = [
"firebase-crashlytics"
]

[plugins]
kotlinx-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }

0 comments on commit 8b0c1d6

Please sign in to comment.