Releases: Yazan98/Vanite
Support Jetpack Compose Applications
Short Description
Add Support for Jetpack Compose Apps, Secured Prefs
Features
- Error Screen and Messages in Jetpack Compose
- Base ViewModel to Handle Errors, State
- Base State, Actions Within Same Dependency
- Base UseCases Within Same Dependency
- Base Compose Screen
- Base Compose Material 3 Colors Utility
- Support Secured Shared Prefs with Encrypted Values
- Support Shared Prefs with Coroutines
SDK Version Updates
Target SDK now is 33
Min SDK now is 21
Fix: Coroutine ViewModel Support UseCases Bug
Implementation
dependencies {
implementation 'com.yazantarifi:Vanite:1.0.4'
implementation 'com.yazantarifi:Vanite-data:1.0.4'
implementation 'com.yazantarifi:Vanite-utils:1.0.4'
implementation 'com.yazantarifi:Vanite-ui-binding:1.0.4'
implementation 'com.yazantarifi:Vanite-ui:1.0.4'
implementation 'com.yazantarifi:Vanite-prefs:1.0.4'
implementation 'com.yazantarifi:Vanite-permissions:1.0.4'
implementation 'com.yazantarifi:Vanite-log:1.0.4'
implementation 'com.yazantarifi:Vanite-firebase:1.0.4'
}
Usage
Now VaniteCoroutineUseCasesViewModel -> getSupportedUseCases Method Will Take Any type of UseCase
Fix Constructor Injection in ViewModel
Fix ViewModel Type : (VaniteCoroutineViewModel)
From Init Block to Call initViewModel Method in init Block inside Sub ViewModels
This Change is a fix for Hilt Constructor Injection when Add UseCases Provided in Constructor
New Version
dependencies {
implementation 'com.yazantarifi:Vanite:1.0.2'
implementation 'com.yazantarifi:Vanite-data:1.0.2'
implementation 'com.yazantarifi:Vanite-utils:1.0.2'
implementation 'com.yazantarifi:Vanite-ui-binding:1.0.2'
implementation 'com.yazantarifi:Vanite-ui:1.0.2'
implementation 'com.yazantarifi:Vanite-prefs:1.0.2'
implementation 'com.yazantarifi:Vanite-permissions:1.0.2'
implementation 'com.yazantarifi:Vanite-log:1.0.2'
implementation 'com.yazantarifi:Vanite-firebase:1.0.2'
}
Usage
@OptIn(ObsoleteCoroutinesApi::class)
@HiltViewModel
open class AuthViewModel @Inject constructor(
private val getLoginUseCase: LoginUseCase,
private val getRegisterUseCase: RegisterUseCase,
private val getVerificationUseCase: AccountVerificationUseCase
) : VaniteCoroutineUseCasesViewModel() {
init {
initViewModel()
}
}
Support More ViewModels
Support New ViewModels and Use Cases
New Changes
- Support Use Cases In ViewModels With Kotlin Coroutines
- Support Side Effect Listener in Base View Model
- Publish New Version: 1.0.1
New Classes Added to Vanite
- VaniteCoroutineUseCasesViewModel
- VaniteCoroutineViewModel
- VaniteUseCase
Main Idea
The Main Idea of this Change is that the Current ViewModels in Vanite is Not Supported Completly for Jetpack Compose and You need to do some workarounds to make it Supported in Composables for This Type of Applications the Structure of Vanite is Changed to Support another Way to Communicate with ViewModel by Coroutines
Rename Project
Rename Project
- Rename Dependencies
- Rename Classes
dependencies {
implementation 'com.yazantarifi:Vanite:1.0.0'
implementation 'com.yazantarifi:Vanite-data:1.0.0'
implementation 'com.yazantarifi:Vanite-utils:1.0.0'
implementation 'com.yazantarifi:Vanite-ui-binding:1.0.0'
implementation 'com.yazantarifi:Vanite-ui:1.0.0'
implementation 'com.yazantarifi:Vanite-prefs:1.0.0'
implementation 'com.yazantarifi:Vanite-permissions:1.0.0'
implementation 'com.yazantarifi:Vanite-log:1.0.0'
implementation 'com.yazantarifi:Vanite-firebase:1.0.0'
}
Gradle Changes
Gradle Sub Projects Changes
- Fix Artifacts Jars
- Fix Gradle Plugin Version
Gradle Plugin
Gradle Plugin Dependencies
This Plugin is a Gradle Plugin to Include The Required Vortex Dependencies into Each Module
By Adding Just The Plugin Name and The Plugin Name Will Start on Each Module
and Validate them Based on Name to Add Dependencies
New Version: 2.2.1
Gradle Portal Link
Implementation
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.io.vortex.gradle.plugin.dependencies:vortex-dependencies-plugin:1.1.0"
}
}
apply plugin: "io.vortex.gradle.plugin.dependencies"
New Feature
ViewBinding Now is Supported By
vortex {
features {
isViewBindingEnabled = true
}
}
Support New Type of ViewBinding
Support New Type of ViewBinding in BaseFragments
- Add State, Actions to Fragments With ViewBinding
- Add SingleLiveData in Library
- Add Comments in Important Classes
- Fix BaseFragments initScreen Method in ViewBinding Classes
- Add getCurrentContext to Check on Nullability Before Return Context to Sub Classes
- Publish New Version on Maven Central (2.2.1)
dependencies {
implementation 'com.yazantarifi:vortex:2.2.1'
implementation 'com.yazantarifi:vortex-data:2.2.1'
implementation 'com.yazantarifi:vortex-utils:2.2.1'
implementation 'com.yazantarifi:vortex-ui-binding:2.2.1'
implementation 'com.yazantarifi:vortex-ui:2.2.1'
implementation 'com.yazantarifi:vortex-prefs:2.2.1'
implementation 'com.yazantarifi:vortex-permissions:2.2.1'
implementation 'com.yazantarifi:vortex-log:2.2.1'
implementation 'com.yazantarifi:vortex-firebase:2.2.1'
}
Migration to Maven Central
Update Library Components
- Migration from Bintray to Maven Central
- Fix Some Bugs in Base Code
- Code Enhancements
- Remove Deprecated Libraries, Methods
- Remove Un Necessary Libraries
- Upgrade Libraries to Latest Version
- Support ViewBinding In UI Layer
New Library Implementation
implementation 'com.yazantarifi:vortex:2.2.0'
implementation 'com.yazantarifi:vortex-data:2.2.0'
implementation 'com.yazantarifi:vortex-utils:2.2.0'
implementation 'com.yazantarifi:vortex-ui-binding:2.2.0'
implementation 'com.yazantarifi:vortex-ui:2.2.0'
implementation 'com.yazantarifi:vortex-prefs:2.2.0'
implementation 'com.yazantarifi:vortex-permissions:2.2.0'
implementation 'com.yazantarifi:vortex-log:2.2.0'
implementation 'com.yazantarifi:vortex-firebase:2.2.0'