Since the first versions of the app, the Android system and framework have evolved quite a bit. This means that the codebase became a bit outdated, including the use of some deprecated APIs. At the same time, new APIs and the possibility to use Kotlin make previous workarounds and non-idiomatic Java code unnecessary.
Therefore it is time for some general maintenance, which will also ease further development.
In particular, I am currently working on the following aspects:
[x] Upgrade gradle to newest version
This was previously not possible because of problems with the now removed SectionedRecyclerViewAdapter dependency, which would not compile.
[x] Convert several parts of the codebase to Kotlin
This also helps with some of the following items.
[x] Drop Lombok dependency
Lombok was useful to avoid boilerplate in Java, in Kotlin most parts can be formulated concisely in the core language.
[x] Drop Google Gson dependency for serialization
Use Kotlin serialization instead.
[x] Drop enum serialization utility (EnumUtil)
Use Kotlin serialization support for sealed classes.
[x] Reorganize ReminderService and ReminderManager, add ReminderStorage
Separate storage code into ReminderStorage.
Move logic from ReminderService to ReminderManager, dropping the deprecated IntentService and using broadcasts instead (ReminderBroadcastReceiver).
The structure and logic around ReminderAction is much easier to implement in Kotlin (compare prior ReminderService.Arguments, its ArgumentsBuilder and the Action enum).
Since the first versions of the app, the Android system and framework have evolved quite a bit. This means that the codebase became a bit outdated, including the use of some deprecated APIs. At the same time, new APIs and the possibility to use Kotlin make previous workarounds and non-idiomatic Java code unnecessary.
Therefore it is time for some general maintenance, which will also ease further development.
In particular, I am currently working on the following aspects:
EnumUtil
)ReminderService
andReminderManager
, addReminderStorage
ReminderStorage
.ReminderService
toReminderManager
, dropping the deprecatedIntentService
and using broadcasts instead (ReminderBroadcastReceiver
).ReminderAction
is much easier to implement in Kotlin (compare priorReminderService.Arguments
, itsArgumentsBuilder
and theAction
enum).RemindersList
in Kotlin withConcatAdapter
(see also https://github.com/felixwiemuth/SimpleReminder/pull/8#issuecomment-826121521).ViewPager2
inRemindersList
(see #7)Main.java
)