Commit Graph

236 Commits

Author SHA1 Message Date
Igor Escodro
22b9664e44 ✨ Refactor KMP extension function for clarity
Renamed the `setFrameworkBaseName` extension function to
`configureTargets` to more accurately reflect its purpose of configuring
Kotlin Multiplatform targets. All Gradle build scripts across the
modules have been updated to use the new function name.
2025-12-31 16:20:49 -05:00
Igor Escodro
126c837165 📝 Docs: Add and update READMEs for all modules
Added and updated `README.md` files for every module to provide a clear
and detailed description of their responsibilities. This includes
documenting the purpose of the `data`, `domain`, `features`,
`libraries`, and platform-specific layers, improving overall project
clarity and maintainability.
2025-12-30 18:21:24 -05:00
Igor Escodro
1d6c2b8cd0 🦃 Refactor Gradle plugins to use version catalog aliases
Migrated the application of custom Gradle convention plugins from
hardcoded string IDs to type-safe accessors from the version catalog
(`libs.versions.toml`). This change improves maintainability and
consistency across all modules.
2025-12-30 13:25:15 -05:00
Igor Escodro
6be3ec93a1 🌊 Migrate feature tests to Kotlin Multiplatform
Migrated unit tests for `category`, `search`, `task`, and `tracker`
features from the JVM-specific `test` source set to the `commonTest`
source set. This allows the tests to be run on all supported platforms.
2025-12-29 14:50:09 -05:00
Igor Escodro
a8fae2c987 🦁 Fix ktlint
Ktlint fixed after the Detekt changes were made. In addition, disabled
the Chain Method Continuation from Ktlint once it conflicts with Detekt.
2025-12-29 13:56:04 -05:00
Igor Escodro
28bd03f921 🍫 Fix detekt in the domain module
New detekt 2.0 rules applied in the module.
2025-12-29 12:01:08 -05:00
Igor Escodro
dea999aa76 🍫 Fix detekt in the data:repository module
New detekt 2.0 rules applied in the module.
2025-12-29 12:01:08 -05:00
Igor Escodro
f81995f566 🍫 Fix detekt in the data:local module
New detekt 2.0 rules applied in the module.
2025-12-29 12:01:08 -05:00
Igor Escodro
27a41802de 🍫 Fix detekt in the data:datastore module
New detekt 2.0 rules applied in the module.
2025-12-29 12:01:08 -05:00
Igor Escodro
2ea6773a01 ✨ Refactor Compose dependencies to use version catalog
Migrated Compose dependencies to the `libs` version catalog for
centralized management and consistency across all modules. This replaces
the direct `compose` object access in Gradle scripts. The existing
dependencies strings were deprecated.

Additionally, updated the import paths for Compose Preview annotations
from `org.jetbrains.compose.ui.tooling.preview` to `androidx.compose.ui
.tooling.preview`.
2025-12-27 17:02:36 -05:00
Igor Escodro
af5c592af8 🫆 Fix Detekt setup
After upgrading to Detekt 2.0, the task was not working properly. The
results were always successful regardless of the changes in the code.
This was happening because additional configuration was needed for KMP
projects.
2025-12-26 21:11:25 -05:00
Igor Escodro
5d91b01cde Refactor Gradle scripts to use the Kotlin Multiplatform plugin
Migrated the Android configuration from the standalone `android {}`
block to the `kotlin { androidLibrary {} }` block across all modules.
This change aligns the project with the modern Kotlin Multiplatform
(KMP) plugin structure.

Key changes include:
- Replaced custom convention plugins with `com.escodro.multiplatform`.
- Moved dependency declarations into the appropriate source sets (e.g.,
`androidMain`).
- Renamed `androidUnitTest` and `androidInstrumentedTest` source sets to
`androidHostTest`.
- Updated the dependency scope for `compose.uiTooling` to
`androidRuntimeClasspath`.
2025-12-26 17:47:15 -05:00
Igor Escodro
18ec6b7f42 ⏳ Migrate from kotlinx.datetime to kotlin.time
Updated various imports and usages across the codebase to replace
`kotlinx.datetime` with `kotlin.time`. Applied `@OptIn
(ExperimentalTime::class)` annotations where necessary to accommodate
the new API changes.
2025-10-22 08:41:20 -04:00
Igor Escodro
338e637cb5 🌺 Spring cleaning
Several code improvements, lint suggestion, unused code removal and more
2025-03-29 12:43:15 -04:00
Igor Escodro
05004d9181 🚧 WIP 2025-03-28 14:40:23 -04:00
Igor Escodro
90d844e5ad 🚨 Fix build issues
The build task is failing even though the app is working fine. Time to
fix.
2025-02-08 12:05:35 -05:00
Igor Escodro
3c7b24d159 ☢️ Remove AtomicFU
Removing the library since it generates some conflicts with other
libraries, and it's only used in Alkaa to make DataStore.kt a
singleton.
For now, the code was updated to use the same sync functions from the
stdlib.
2025-01-18 09:45:24 -05:00
Igor Escodro
fe01f59ef8 🩹 Fix missing dependency from SQLDelight and Koin conflict
Based on opened issues, adding this explicit dependency solves the
problem.

https://github.com/cashapp/sqldelight/issues/4888
2024-06-04 18:08:57 -04:00
Igor Escodro
fd929a8fd7 🫣 Fix and disable rules
Making ktlint happier.
2024-06-04 17:41:55 -04:00
Igor Escodro
58b7013a8c 📽️ Update Kotlin DSL with new extensions
The extensions from KmpExtensions were replaced by the new additions in
the latest KMP plugin.
2024-05-25 19:29:41 -04:00
Igor Escodro
d4f3395fd0 🔄 Replace Moko Resources with Compose Resources
Moko Resources is great, but the simplicity and first-party support in
Compose got me.
2024-05-25 13:36:42 -04:00
Igor Escodro
0216e9dd49 🍫 Fix Ktlint
Fix Ktlint new changes in the latest update - some annoying rules were
disabled
2024-05-17 19:50:52 -04:00
Igor Escodro
f6a8ee4864 🧃 Update SQLDelight to run the insert + select in a transaction
To ensure that the "select last row" will work properly after inserting
the task, the code was updated to run inside a transaction. This is
required because it "only works on the connection where the write
happened". Despite working fine in Android, this was not working on iOS.

Source: https://github.com/cashapp/sqldelight/issues/1828
2024-05-04 11:30:45 -04:00
Igor Escodro
c3523a4559 🧐 Changes after code review
- KDoc improved
2024-05-04 11:04:07 -04:00
Igor Escodro
7960e277f6 📦 Update Insert Task query to return the last inserted row
Having the last inserted row in the Task table will allow the app to
schedule an alarm right after inserting the task. The lack of this
support is what is causing the bug where the alarm is not schedule when
using the botom sheet.
2024-05-03 20:08:53 -04:00
Igor Escodro
003ccf184b ⬆️ Update more libraries
Let's goooo!
2024-04-18 10:41:21 -04:00
Igor Escodro
6b43827664 🐞 Fix wrong decoder for LocalDateTime
In the database we are storing the time in milliseconds, however, the
encoder was wrongly set as "fromEpochSeconds". The function was updated
to use the appropriate API.
2023-11-01 09:48:29 -04:00
Igor Escodro
e82bafbbb2 ✨ Introduce category pre-population on iOS
Since the SQLDelight does have a callback when the database schema is
created, the solution was checking if the database is created before
inserting the categories. The library creates the database on a specific
folder, which is now checked on iOS variant.

This change also required a few structure changes, such as the place of
the strings and implementing the resource access on each platform.
2023-10-12 09:07:09 -04:00
Igor Escodro
2e250a5cbb ♻️ Create plugin template for KMP modules
Creating plugins to make the setup easier and reduce boilerplate.
Additional changes need to comply with the build checks.
2023-08-24 09:24:00 -04:00
Igor Escodro
3c79591485 ♻️ Update KMP Android target reference
From "android" to "androidTarget"
2023-08-24 09:24:00 -04:00
Igor Escodro
758662e6e9 🚨 Fix lint
Linters are now in peace
2023-08-22 14:13:16 -04:00
Igor Escodro
f248f38bf3 🍏 Do the actual implementation of iOS SQLDelight
Local database is now supported in iOS.
2023-08-22 13:21:02 -04:00
Igor Escodro
b61631d0e6 🍏 Do the actual implementation of iOS Data Store
Data Store is now supported in iOS.
2023-08-22 13:20:29 -04:00
Igor Escodro
e82fc68595 ✨ Use the existing Android DataStore path
Using the "datastore/" path allows users to keep using the same file
while updating the app. This allows them to not lose existing
preferences.
2023-08-17 10:00:33 -04:00
Igor Escodro
6613eda6ac 📝 Add Kdoc
Basic Kdoc added to the main code
2023-08-17 09:59:09 -04:00
Igor Escodro
efde09aea2 ♻️ Migrate the implementation to multiplatform
The Android version was pretty straightforward. For now, the iOS version
will stay on to do.
2023-08-16 13:40:45 -04:00
Igor Escodro
3ca3f9afd0 ♻️ Convert datastore to KMP
Basic KMP configuration added to the module, making it multiplatform
2023-08-16 13:24:18 -04:00
Igor Escodro
ec4d5a0c01 🔀 Merge remote-tracking branch 'origin/alkaa-multiplatform' into amp/local
# Conflicts:
#	app/src/androidTest/java/com/escodro/alkaa/NotificationFlowTest.kt
#	data/local/build.gradle.kts
#	data/local/src/main/java/com/escodro/local/mapper/TaskMapper.kt
#	features/task/src/main/java/com/escodro/task/presentation/detail/alarm/TaskAlarmViewModel.kt
#	features/task/src/test/java/com/escodro/task/presentation/detail/TaskAlarmViewModelTest.kt
2023-08-16 08:42:31 -04:00
Igor Escodro
c8d1ff8c88 ♻️ Update the Local repository to use LocalDateTime
Since one more layer was converted from java.Calendar to
kotlinx.DateTime, now the local layer will be responsible for the
mapping.
2023-08-15 21:10:55 -04:00
Igor Escodro
1e14faa754 🚚 Move files from "java" to "kotlin" directory
For consistency, the class directory was named to "kotlin"
2023-08-15 21:10:55 -04:00
Igor Escodro
56bb652974 ♻️ Update the Repository module to KMP
The Repository module was migrated from Android/Kotlin-only module to
KMP. For now, we are not caring too much about ProGuard, so the files
were removed.
2023-08-15 21:10:55 -04:00
Igor Escodro
426472dabb 🔥 Remove Java/Android-only libraries from Domain
Removing Java's Calendar and adapting the logging tool to its
multiplatform version. Some work was needed for the convertions since
the Android layers will keep using Calendar for now. Future commits will
address the TODOs and make it more clear.
2023-08-15 21:10:55 -04:00
Igor Escodro
b46839b2f2 🚚 Rename the shared to domain
Small back-and-forth to convert the `shared` to the old `domain`. Now
that everything is set, the module was updated to the original name.
2023-08-15 21:10:55 -04:00
Igor Escodro
5bba9a89b7 🚧Update the repository to be an Android module
For some reason, Kotlin-only modules do not find the KMM modules. This
module was temporarily converted to Android to make the code work. In
the future, this module will also be a KMM one.
2023-08-15 21:10:55 -04:00
Igor Escodro
1084c134ff ♻️ Replace all the references from domain to shared
Moved the dependencies from the Kotlin-only to the Kotlin Multiplatform
Mobile one
2023-08-15 21:10:55 -04:00
Igor Escodro
4a443b7a37 ✅ Fix more tests
KMP doesn't support space in names in the minimum Android SDK.
Minor notification test failures fixed.
2023-08-15 18:58:45 -04:00
Igor Escodro
5d52bb0268 ✅ Update instrumented tests
Instrumented tests updated to work properly after all the module changes
2023-08-15 10:19:01 -04:00
Igor Escodro
2f94602cc0 🧐 Minor code changes after code review
Quick self code review there
2023-08-14 13:54:14 -04:00
Igor Escodro
6081ea1377 🔀 Merge remote-tracking branch 'origin/alkaa-multiplatform' into amp/local
# Conflicts:
#	data/local/build.gradle.kts
#	data/local/src/main/java/com/escodro/local/mapper/TaskMapper.kt
#	features/task/src/main/java/com/escodro/task/presentation/detail/alarm/TaskAlarmViewModel.kt
#	features/task/src/test/java/com/escodro/task/presentation/detail/TaskAlarmViewModelTest.kt
#	gradle/libs.versions.toml
#	plugins/src/main/java/extension/CommonExtension.kt
2023-08-14 13:48:45 -04:00
Igor Escodro
b148ae6c35 ♻️ Update the Local repository to use LocalDateTime
Since one more layer was converted from java.Calendar to
kotlinx.DateTime, now the local layer will be responsible for the
mapping.
2023-08-14 13:19:18 -04:00