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

Commit

Permalink
More modularization and fixes (#3096)
Browse files Browse the repository at this point in the history
* WIP: Modularize `:shared:data`

* Split further the convention plugins

* Fix the integration tests

* WIP: Fix the exchange rates code

* WIP: Fix the Exchange rates

* Fix the exchange rates

* Add some error handling with bad UX

* Fix unit tests

* Fix Detekt

* Add script for running the Paparazzi

* Update the modules graph

* Fix the integration tests

* Bump version to "4.6.1" (161)
  • Loading branch information
ILIYANGERMANOV authored Apr 5, 2024
1 parent a041a13 commit 8700f83
Show file tree
Hide file tree
Showing 227 changed files with 1,430 additions and 1,304 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/integration_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Build Ivy Wallet's code
run: |
./gradlew :shared:data:assembleDebug :shared:data:assembleAndroidTest
./gradlew :shared:data:core:assembleDebug :shared:data:core:assembleAndroidTest
./gradlew :shared:domain:assembleDebug :shared:domain:assembleAndroidTest
- name: Enable KVM (emulator optimization)
Expand All @@ -45,5 +45,5 @@ jobs:
with:
api-level: 29
script: |
./gradlew :shared:data:connectedDebugAndroidTest
./gradlew :shared:data:core:connectedDebugAndroidTest
./gradlew :shared:domain:connectedDebugAndroidTest
42 changes: 22 additions & 20 deletions all_modules.gv
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ digraph G {
":app" -> ":screen:settings"
":app" -> ":screen:transactions"
":app" -> ":shared:base"
":app" -> ":shared:data"
":app" -> ":shared:data:core"
":app" -> ":shared:domain"
":app" -> ":shared:ui:navigation"
":app" -> ":temp:legacy-code"
Expand All @@ -38,14 +38,14 @@ digraph G {
":screen:balance" -> ":temp:legacy-code"
":screen:balance" -> ":temp:old-design"
":screen:budgets" -> ":shared:base"
":screen:budgets" -> ":shared:data"
":screen:budgets" -> ":shared:data:core"
":screen:budgets" -> ":shared:domain"
":screen:budgets" -> ":shared:ui:core"
":screen:budgets" -> ":shared:ui:navigation"
":screen:budgets" -> ":temp:legacy-code"
":screen:budgets" -> ":temp:old-design"
":screen:categories" -> ":shared:base"
":screen:categories" -> ":shared:data"
":screen:categories" -> ":shared:data:core"
":screen:categories" -> ":shared:domain"
":screen:categories" -> ":shared:ui:core"
":screen:categories" -> ":shared:ui:navigation"
Expand All @@ -56,15 +56,15 @@ digraph G {
":screen:contributors" -> ":shared:ui:core"
":screen:contributors" -> ":shared:ui:navigation"
":screen:edit-transaction" -> ":shared:base"
":screen:edit-transaction" -> ":shared:data"
":screen:edit-transaction" -> ":shared:data:core"
":screen:edit-transaction" -> ":shared:domain"
":screen:edit-transaction" -> ":shared:ui:core"
":screen:edit-transaction" -> ":shared:ui:navigation"
":screen:edit-transaction" -> ":temp:legacy-code"
":screen:edit-transaction" -> ":temp:old-design"
":screen:edit-transaction" -> ":widget:balance" [color=red style=bold]
":screen:exchange-rates" -> ":shared:base"
":screen:exchange-rates" -> ":shared:data"
":screen:exchange-rates" -> ":shared:data:core"
":screen:exchange-rates" -> ":shared:domain"
":screen:exchange-rates" -> ":shared:ui:core"
":screen:exchange-rates" -> ":shared:ui:navigation"
Expand All @@ -75,7 +75,7 @@ digraph G {
":screen:features" -> ":shared:ui:core"
":screen:features" -> ":shared:ui:navigation"
":screen:home" -> ":shared:base"
":screen:home" -> ":shared:data"
":screen:home" -> ":shared:data:core"
":screen:home" -> ":shared:domain"
":screen:home" -> ":shared:ui:core"
":screen:home" -> ":shared:ui:navigation"
Expand All @@ -84,14 +84,14 @@ digraph G {
":screen:home" -> ":widget:add-transaction"
":screen:import-data" -> ":screen:onboarding"
":screen:import-data" -> ":shared:base"
":screen:import-data" -> ":shared:data"
":screen:import-data" -> ":shared:data:core"
":screen:import-data" -> ":shared:domain"
":screen:import-data" -> ":shared:ui:core"
":screen:import-data" -> ":shared:ui:navigation"
":screen:import-data" -> ":temp:legacy-code"
":screen:import-data" -> ":temp:old-design"
":screen:loans" -> ":shared:base"
":screen:loans" -> ":shared:data"
":screen:loans" -> ":shared:data:core"
":screen:loans" -> ":shared:domain"
":screen:loans" -> ":shared:ui:core"
":screen:loans" -> ":shared:ui:navigation"
Expand All @@ -100,28 +100,28 @@ digraph G {
":screen:main" -> ":screen:accounts"
":screen:main" -> ":screen:home"
":screen:main" -> ":shared:base"
":screen:main" -> ":shared:data"
":screen:main" -> ":shared:data:core"
":screen:main" -> ":shared:domain"
":screen:main" -> ":shared:ui:core"
":screen:main" -> ":shared:ui:navigation"
":screen:main" -> ":temp:legacy-code"
":screen:main" -> ":temp:old-design"
":screen:onboarding" -> ":shared:base"
":screen:onboarding" -> ":shared:data"
":screen:onboarding" -> ":shared:data:core"
":screen:onboarding" -> ":shared:domain"
":screen:onboarding" -> ":shared:ui:core"
":screen:onboarding" -> ":shared:ui:navigation"
":screen:onboarding" -> ":temp:legacy-code"
":screen:onboarding" -> ":temp:old-design"
":screen:piechart" -> ":shared:base"
":screen:piechart" -> ":shared:data"
":screen:piechart" -> ":shared:data:core"
":screen:piechart" -> ":shared:domain"
":screen:piechart" -> ":shared:ui:core"
":screen:piechart" -> ":shared:ui:navigation"
":screen:piechart" -> ":temp:legacy-code"
":screen:piechart" -> ":temp:old-design"
":screen:planned-payments" -> ":shared:base"
":screen:planned-payments" -> ":shared:data"
":screen:planned-payments" -> ":shared:data:core"
":screen:planned-payments" -> ":shared:domain"
":screen:planned-payments" -> ":shared:ui:core"
":screen:planned-payments" -> ":shared:ui:navigation"
Expand All @@ -132,42 +132,43 @@ digraph G {
":screen:releases" -> ":shared:ui:core"
":screen:releases" -> ":shared:ui:navigation"
":screen:reports" -> ":shared:base"
":screen:reports" -> ":shared:data"
":screen:reports" -> ":shared:data:core"
":screen:reports" -> ":shared:domain"
":screen:reports" -> ":shared:ui:core"
":screen:reports" -> ":shared:ui:navigation"
":screen:reports" -> ":temp:legacy-code"
":screen:reports" -> ":temp:old-design"
":screen:search" -> ":shared:base"
":screen:search" -> ":shared:data"
":screen:search" -> ":shared:data:core"
":screen:search" -> ":shared:domain"
":screen:search" -> ":shared:ui:core"
":screen:search" -> ":shared:ui:navigation"
":screen:search" -> ":temp:legacy-code"
":screen:search" -> ":temp:old-design"
":screen:settings" -> ":shared:base"
":screen:settings" -> ":shared:data"
":screen:settings" -> ":shared:data:core"
":screen:settings" -> ":shared:domain"
":screen:settings" -> ":shared:ui:core"
":screen:settings" -> ":shared:ui:navigation"
":screen:settings" -> ":temp:legacy-code"
":screen:settings" -> ":temp:old-design"
":screen:settings" -> ":widget:balance"
":screen:transactions" -> ":shared:base"
":screen:transactions" -> ":shared:data"
":screen:transactions" -> ":shared:data:core"
":screen:transactions" -> ":shared:domain"
":screen:transactions" -> ":shared:ui:core"
":screen:transactions" -> ":shared:ui:navigation"
":screen:transactions" -> ":temp:legacy-code"
":screen:transactions" -> ":temp:old-design"
":shared:data" -> ":shared:base" [color=red style=bold]
":shared:data:core" -> ":shared:data:model" [color=red style=bold]
":shared:data:core" -> ":shared:base"
":shared:domain" -> ":shared:base"
":shared:domain" -> ":shared:data" [color=red style=bold]
":shared:domain" -> ":shared:data:core" [color=red style=bold]
":shared:ui:navigation" -> ":shared:base"
":shared:ui:navigation" -> ":shared:domain"
":shared:ui:navigation" -> ":shared:ui:core" [color=red style=bold]
":temp:legacy-code" -> ":shared:base"
":temp:legacy-code" -> ":shared:data"
":temp:legacy-code" -> ":shared:data:core"
":temp:legacy-code" -> ":shared:domain"
":temp:legacy-code" -> ":shared:ui:core"
":temp:legacy-code" -> ":shared:ui:navigation" [color=red style=bold]
Expand All @@ -189,7 +190,7 @@ digraph G {
":widget:balance" -> ":temp:legacy-code" [color=red style=bold]
":shared:ui:core" -> ":shared:domain" [color=red style=bold]
":screen:accounts" -> ":shared:base"
":screen:accounts" -> ":shared:data"
":screen:accounts" -> ":shared:data:core"
":screen:accounts" -> ":shared:domain"
":screen:accounts" -> ":shared:ui:core"
":screen:accounts" -> ":shared:ui:navigation"
Expand All @@ -200,5 +201,6 @@ digraph G {
":ci-actions:compose-stability" -> ":ci-actions:base"
":ci-actions:issue-assign" -> ":ci-actions:base"
":ci-actions:issue-create-comment" -> ":ci-actions:base"
":shared:data:core-testing" -> ":shared:data:core"
":shared:ui:testing" -> ":shared:ui:core"
}
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ dependencies {
implementation(projects.screen.settings)
implementation(projects.screen.transactions)
implementation(projects.shared.base)
implementation(projects.shared.data)
implementation(projects.shared.data.core)
implementation(projects.shared.domain)
implementation(projects.shared.ui.navigation)
implementation(projects.temp.legacyCode)
Expand Down
16 changes: 16 additions & 0 deletions buildSrc/src/main/kotlin/ivy.hilt.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
plugins {
id("ivy.kotlin-android")
id("dagger.hilt.android.plugin")
id("com.google.devtools.ksp")
}

kotlin {
sourceSets.all {
kotlin.srcDir("build/generated/ksp/$name/kotlin")
}
}

dependencies {
implementation(libs.bundles.hilt)
ksp(catalog.library("hilt-compiler"))
}
33 changes: 33 additions & 0 deletions buildSrc/src/main/kotlin/ivy.kotlin-android.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
plugins {
id("com.android.library")
id("kotlin-android")
id("org.jetbrains.kotlin.android")
}

android {
// Kotlin
val javaVersion = catalog.version("jvm-target")
compileOptions {
sourceCompatibility = JavaVersion.valueOf("VERSION_$javaVersion")
targetCompatibility = JavaVersion.valueOf("VERSION_$javaVersion")
}

kotlinOptions {
jvmTarget = javaVersion
}

// Android
compileSdk = catalog.version("compile-sdk").toInt()
defaultConfig {
minSdk = catalog.version("min-sdk").toInt()
}
}

dependencies {
implementation(libs.bundles.arrow)
implementation(libs.bundles.kotlin)
implementation(catalog.bundle("kotlin-android"))
implementation(libs.timber)

testImplementation(libs.bundles.testing)
}
8 changes: 8 additions & 0 deletions buildSrc/src/main/kotlin/ivy.kotlinx-serialization.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
plugins {
id("ivy.kotlin-android")
id("org.jetbrains.kotlin.plugin.serialization")
}

dependencies {
implementation(catalog.library("kotlinx-serialization-json"))
}
48 changes: 3 additions & 45 deletions buildSrc/src/main/kotlin/ivy.module.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,47 +1,5 @@
plugins {
id("com.android.library")
id("kotlin-android")
id("org.jetbrains.kotlin.android")
id("dagger.hilt.android.plugin")
id("com.google.devtools.ksp")
id("org.jetbrains.kotlin.plugin.serialization")
}

kotlin {
sourceSets.all {
kotlin.srcDir("build/generated/ksp/$name/kotlin")
}
}

android {
// Kotlin
val javaVersion = catalog.version("jvm-target")
compileOptions {
sourceCompatibility = JavaVersion.valueOf("VERSION_$javaVersion")
targetCompatibility = JavaVersion.valueOf("VERSION_$javaVersion")
}

kotlinOptions {
jvmTarget = javaVersion
}

// Android
compileSdk = catalog.version("compile-sdk").toInt()
defaultConfig {
minSdk = catalog.version("min-sdk").toInt()
}
}

dependencies {
implementation(libs.bundles.arrow)
implementation(libs.bundles.kotlin)
implementation(catalog.bundle("kotlin-android"))
implementation(libs.timber)

implementation(libs.bundles.hilt)
ksp(catalog.library("hilt-compiler"))

implementation(catalog.library("kotlinx-serialization-json"))

testImplementation(libs.bundles.testing)
id("ivy.kotlin-android")
id("ivy.hilt")
id("ivy.kotlinx-serialization")
}
Loading

0 comments on commit 8700f83

Please sign in to comment.