diff --git a/.gitignore b/.gitignore
index f6f54f4..6aa1b28 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,12 +13,11 @@
.externalNativeBuild
.cxx
-/vortex-data/build
-/vortex/build
-/vortex-firebase/build
-/vortex-prefs/build
-/vortex-permissions/build
-/vortex-ui/build
-/vortex-utils/build
-/vortex-logic/build
-/vortex-data/build
+/vanite-data/build
+/vanite/build
+/vanite-firebase/build
+/vanite-prefs/build
+/vanite-permissions/build
+/vanite-ui/build
+/vanite-utils/build
+/vanite-logic/build
diff --git a/.idea/.name b/.idea/.name
new file mode 100644
index 0000000..51ba91a
--- /dev/null
+++ b/.idea/.name
@@ -0,0 +1 @@
+Vanite
\ No newline at end of file
diff --git a/.idea/dictionaries/yazan.xml b/.idea/dictionaries/yazan.xml
index 615fb33..fdcb511 100644
--- a/.idea/dictionaries/yazan.xml
+++ b/.idea/dictionaries/yazan.xml
@@ -4,6 +4,7 @@
flowable
snackbar
threded
+ vanite
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index ba1f676..e09dd7d 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -12,15 +12,15 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/README.md b/README.md
index 72f6717..d4b439a 100644
--- a/README.md
+++ b/README.md
@@ -1,25 +1,25 @@
-# Vortex
+# Vanite
Android Infrastructure
![](https://img.shields.io/badge/Project%20Status-Under%20Development-blue)
-[![Maven Central](https://img.shields.io/maven-central/v/com.yazantarifi/vortex.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.yazantarifi%22%20AND%20a:%22vortex%22)
+[![Maven Central](https://img.shields.io/maven-central/v/com.yazantarifi/Vanite.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.yazantarifi%22%20AND%20a:%22Vanite%22)
![](https://img.shields.io/badge/License-Apache%202.0-yellow)
![](https://img.shields.io/badge/Language-Kotlin-orange)
![](https://img.shields.io/badge/Android%20Status-AndroidX-green)
-# What is Vortex
+# What is Vanite
-Vortex is an Android Infrastructure To Build Android Applications With Latest Technologies and Ready State Handling with User Interface Implementation For The Android Common Cases
+Vanite is an Android Infrastructure To Build Android Applications With Latest Technologies and Ready State Handling with User Interface Implementation For The Android Common Cases
This Library is Not Just Base Code it's also help you to get the target as soon as possible with ready techniques, base code for everything and this library built on modularity architecture
-actually you can depends on Vortex To Build Any Kind Of Android Apps , but the problem here this library depends on other android apis to implement some operations
-like google maps and 3th libraries to make sure your application has the right dependencies to start using Vortex Library you should apply 2 Gradle Plugins
-The First One For Vortex Dependcies With Multi Modular Application To Apply The Right Dependency to Right Module, the Second one should provide the application the right dependencies to each module
+actually you can depends on Vanite To Build Any Kind Of Android Apps , but the problem here this library depends on other android apis to implement some operations
+like google maps and 3th libraries to make sure your application has the right dependencies to start using Vanite Library you should apply 2 Gradle Plugins
+The First One For Vanite Dependcies With Multi Modular Application To Apply The Right Dependency to Right Module, the Second one should provide the application the right dependencies to each module
# Multi Modular Application
-Vortex has Main 3 Modules you should include in your app to install Vortex
+Vanite has Main 3 Modules you should include in your app to install Vanite
-> Note: Vortex Don't Support Single Module Application Gradle Plugins Don't Working With Single Module
+> Note: Vanite Don't Support Single Module Application Gradle Plugins Don't Working With Single Module
Each Application Should Implemented With 3 Layers (ui, data, domain)
1. UI -> User Interface it includes (Activities, Fragments, Notifications, Dialogs, Application Configuration) -- Optional Dagger Application Scope
@@ -28,11 +28,11 @@ Each Application Should Implemented With 3 Layers (ui, data, domain)
3. DOMAIN -> This Layer Should include The ViewModels With Application Business Logic Because Each ViewModel has The Hole Logic For Each Section and this is the important part in the application for this all ViewModels in the Same Layer
-# Vortex Logic Handling
-1. State : Vortex is Working Depends on Android Architecture Component it means The Base Layer in Vortex is ViewModel and The Application State Management Depends On LiveData Handling
+# Vanite Logic Handling
+1. State : Vanite is Working Depends on Android Architecture Component it means The Base Layer in Vanite is ViewModel and The Application State Management Depends On LiveData Handling
There are a lot of ways you can deliver the Direct State to View With Ready State or Custom State
-#### Vortex State Types
+#### Vanite State Types
1.1 : State, Action Handling : This Way Requires Two Parameters The First One is Action and The Second One The Base State For This ViewModel
You can Use This Way To Create ViewModel That Can Handle The SuccessState, ErrorState, LoadingState, EmptyState and This Way Inspired From Redux State Handling
And The Action Will explain later
@@ -45,9 +45,9 @@ And The Action Will explain later
1.5 : IndirectViewModel : This ViewModel like SingleStateViewModel but it just handle The State Without Loading Handling
-#### Vortex Actions
+#### Vanite Actions
-Vortex ViewModels and Views Requires The Actions Because any View Can Just send Actions To Any Type of ViewModel using execute Method
+Vanite ViewModels and Views Requires The Actions Because any View Can Just send Actions To Any Type of ViewModel using execute Method
in this case You can Declare The Base Action And Handle The Childes
Here You Can Tell The ViewModel You Should Handle The Auth Actions And The Childes Of This Action is Login, Register Actions Just and Don't Handle Anything Else
@@ -68,43 +68,22 @@ allprojects {
```
dependencies {
- implementation 'com.yazantarifi:vortex:2.3.1'
- implementation 'com.yazantarifi:vortex-data:2.3.1'
- implementation 'com.yazantarifi:vortex-utils:2.3.1'
- implementation 'com.yazantarifi:vortex-ui-binding:2.3.1'
- implementation 'com.yazantarifi:vortex-ui:2.3.1'
- implementation 'com.yazantarifi:vortex-prefs:2.3.1'
- implementation 'com.yazantarifi:vortex-permissions:2.3.1'
- implementation 'com.yazantarifi:vortex-log:2.3.1'
- implementation 'com.yazantarifi:vortex-firebase:2.3.1'
+ 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'
}
```
-# Vortex Gradle Plugin
-```
-buildscript {
- repositories {
- maven {
- url "https://plugins.gradle.org/m2/"
- }
- }
- dependencies {
- classpath "gradle.plugin.io.vortex.gradle.plugin.dependencies:vortex-dependencies-plugin:2.3.1"
- }
-}
-```
-
-3. Each Module Should Implement The Plugin
-
-```
-apply plugin: "io.vortex.gradle.plugin.dependencies"
-```
-
-
-# Vortex Documentation
-Coming Soon Vortex still Under Development
+# Vanite Documentation
+Coming Soon Vanite still Under Development
# License
-Copyright (C) 2019 Vortex is An Open Source Library (Licensed under the Apache License, Version 2.0)
+Copyright (C) 2019 Vanite is An Open Source Library (Licensed under the Apache License, Version 2.0)
diff --git a/application-flow/android-flow.md b/application-flow/android-flow.md
deleted file mode 100644
index 08e2ac0..0000000
--- a/application-flow/android-flow.md
+++ /dev/null
@@ -1,20 +0,0 @@
----
-description: This Page Will Describe The Flow At The Application Components
----
-
-# Android Flow
-
-The Android Structure is Not Just The Mvvm \(Common Architecture\) at this Time but the Vortex Architecture is Hybrid it means you can mix more than one to write clean code
-
-Vortex State is The Important Part At The Structure because you always notify the View With The New State and Change The UI Depends on The InComing State Each of them will Described in Code Example
-
-**The Application Flow is**
-
-1. MVVM \(Model View ViewModel\)
-2. Redux \(State handling\)
-3. Clean Architecture \(Multi Modular Applications\)
-
-## Vortex State Handling
-
-![State Handling](../.gitbook/assets/untitled-diagram-1.jpg)
-
diff --git a/application-flow/spring-boot-flow.md b/application-flow/spring-boot-flow.md
deleted file mode 100644
index 25ad2d7..0000000
--- a/application-flow/spring-boot-flow.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# Spring Boot Flow
-
diff --git a/build.gradle b/build.gradle
index efeda00..54d62b7 100644
--- a/build.gradle
+++ b/build.gradle
@@ -8,7 +8,7 @@ buildscript {
"EasyLauncherPluginV": "1.3.1",
"FirebasePluginV" : "4.3.1",
"NavigationPluginV" : "2.2.0-rc04",
- "VortexPluginV" : "1.0.0",
+ "VanitePluginV" : "1.0.0",
"HiltPluginVersion" : "2.28-alpha",
"NexusPublishPluginVersoin": "1.1.0"
]
@@ -52,17 +52,17 @@ apply from: "${rootDir}/scripts/publish-root.gradle"
ext {
PUBLISH_GROUP_ID = 'com.yazantarifi'
- PUBLISH_VERSION = '2.3.1'
- PUBLISH_DESCRIPTION = 'Shake Reporting To Report Android Crashes, Application Requests'
- PUBLISH_URL = 'https://github.com/Yazan98/Vortex'
+ PUBLISH_VERSION = '1.0.0'
+ PUBLISH_DESCRIPTION = 'Application Structure, Base Code, Configuration, Utility Classes to Build Android Applications'
+ PUBLISH_URL = 'https://github.com/Yazan98/Vanite'
PUBLISH_LICENSE_NAME = 'MIT'
- PUBLISH_LICENSE_URL = 'https://github.com/Yazan98/Vortex/blob/main/LICENSE'
+ PUBLISH_LICENSE_URL = 'https://github.com/Yazan98/Vanite/blob/main/LICENSE'
PUBLISH_DEVELOPER_ID = 'yt98'
PUBLISH_DEVELOPER_NAME = 'Yazan Tarifi'
PUBLISH_DEVELOPER_EMAIL = 'yazantarifi1@hotmail.com'
- PUBLISH_SCM_CONNECTION = 'scm:git:github.com/Yazan98/Vortex.git'
- PUBLISH_SCM_DEVELOPER_CONNECTION = 'scm:git:ssh://github.com/Yazan98/Vortex.git'
- PUBLISH_SCM_URL = 'https://github.com/Yazan98/Vortex/tree/master'
+ PUBLISH_SCM_CONNECTION = 'scm:git:github.com/Yazan98/Vanite.git'
+ PUBLISH_SCM_DEVELOPER_CONNECTION = 'scm:git:ssh://github.com/Yazan98/Vanite.git'
+ PUBLISH_SCM_URL = 'https://github.com/Yazan98/Vanite/tree/master'
}
subprojects {
diff --git a/intellij-plugin/.idea/.gitignore b/intellij-plugin/.idea/.gitignore
deleted file mode 100644
index 5c98b42..0000000
--- a/intellij-plugin/.idea/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-# Default ignored files
-/workspace.xml
\ No newline at end of file
diff --git a/intellij-plugin/.idea/.name b/intellij-plugin/.idea/.name
deleted file mode 100644
index ff1a604..0000000
--- a/intellij-plugin/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-intellij-generator
\ No newline at end of file
diff --git a/intellij-plugin/.idea/codeStyles/Project.xml b/intellij-plugin/.idea/codeStyles/Project.xml
deleted file mode 100644
index 1bec35e..0000000
--- a/intellij-plugin/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/intellij-plugin/.idea/codeStyles/codeStyleConfig.xml b/intellij-plugin/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index 79ee123..0000000
--- a/intellij-plugin/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/intellij-plugin/.idea/gradle.xml b/intellij-plugin/.idea/gradle.xml
deleted file mode 100644
index b8e87fd..0000000
--- a/intellij-plugin/.idea/gradle.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/intellij-plugin/.idea/jarRepositories.xml b/intellij-plugin/.idea/jarRepositories.xml
deleted file mode 100644
index 88f55d1..0000000
--- a/intellij-plugin/.idea/jarRepositories.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/intellij-plugin/.idea/misc.xml b/intellij-plugin/.idea/misc.xml
deleted file mode 100644
index 29af3ee..0000000
--- a/intellij-plugin/.idea/misc.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/intellij-plugin/.idea/uiDesigner.xml b/intellij-plugin/.idea/uiDesigner.xml
deleted file mode 100644
index 10e3f73..0000000
--- a/intellij-plugin/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,127 +0,0 @@
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
- -
-
-
- -
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/intellij-plugin/.idea/vcs.xml b/intellij-plugin/.idea/vcs.xml
deleted file mode 100644
index 6c0b863..0000000
--- a/intellij-plugin/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/intellij-plugin/build.gradle b/intellij-plugin/build.gradle
deleted file mode 100644
index 299ab0e..0000000
--- a/intellij-plugin/build.gradle
+++ /dev/null
@@ -1,68 +0,0 @@
-buildscript {
- repositories {
- mavenCentral()
- maven {
- url "https://oss.sonatype.org/content/repositories/snapshots/"
- }
- maven {
- url 'https://dl.bintray.com/jetbrains/intellij-plugin-service'
- }
-
- }
- dependencies {
- classpath "org.jetbrains.intellij.plugins:gradle-intellij-plugin:0.5.0-SNAPSHOT"
- }
-}
-
-plugins {
- id 'groovy'
- id 'java'
- id 'idea'
- id 'org.jetbrains.intellij' version '0.4.16'
- id 'org.jetbrains.kotlin.jvm' version '1.3.61'
-}
-
-apply plugin: 'org.jetbrains.intellij'
-group 'io.vortex.intellij.plugin'
-version '1.0-SNAPSHOT'
-
-sourceCompatibility = 1.8
-
-repositories {
- mavenCentral()
-}
-
-dependencies {
- compile 'org.codehaus.groovy:groovy-all:2.3.11'
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
- implementation platform('org.jetbrains.kotlin:kotlin-bom')
- implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
- testImplementation 'org.jetbrains.kotlin:kotlin-test'
- testImplementation 'org.jetbrains.kotlin:kotlin-test-junit'
- testCompile group: 'junit', name: 'junit', version: '4.12'
-}
-
-// See https://github.com/JetBrains/gradle-intellij-plugin/
-intellij {
- version 'IC-2018.3'
-}
-
-compileKotlin {
- kotlinOptions.jvmTarget = "1.8"
-}
-
-compileTestKotlin {
- kotlinOptions.jvmTarget = "1.8"
-}
-
-patchPluginXml {
- changeNotes """
- Add change notes here.
- most HTML tags may be used """
-}
-
-idea.module.iml {
- beforeMerged { module ->
- module.dependencies.clear()
- }
-}
diff --git a/intellij-plugin/gradle.properties b/intellij-plugin/gradle.properties
deleted file mode 100644
index 29e08e8..0000000
--- a/intellij-plugin/gradle.properties
+++ /dev/null
@@ -1 +0,0 @@
-kotlin.code.style=official
\ No newline at end of file
diff --git a/intellij-plugin/gradle/wrapper/gradle-wrapper.jar b/intellij-plugin/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 87b738c..0000000
Binary files a/intellij-plugin/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/intellij-plugin/gradle/wrapper/gradle-wrapper.properties b/intellij-plugin/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 44e7c4d..0000000
--- a/intellij-plugin/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
diff --git a/intellij-plugin/gradlew b/intellij-plugin/gradlew
deleted file mode 100644
index af6708f..0000000
--- a/intellij-plugin/gradlew
+++ /dev/null
@@ -1,172 +0,0 @@
-#!/usr/bin/env sh
-
-##############################################################################
-##
-## Gradle start up script for UN*X
-##
-##############################################################################
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS='"-Xmx64m"'
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn () {
- echo "$*"
-}
-
-die () {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
-esac
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- if [ ! -x "$JAVACMD" ] ; then
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
- fi
-else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=$((i+1))
- done
- case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
-fi
-
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=$(save "$@")
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-
-# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
-if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
- cd "$(dirname "$0")"
-fi
-
-exec "$JAVACMD" "$@"
diff --git a/intellij-plugin/gradlew.bat b/intellij-plugin/gradlew.bat
deleted file mode 100644
index 6d57edc..0000000
--- a/intellij-plugin/gradlew.bat
+++ /dev/null
@@ -1,84 +0,0 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS="-Xmx64m"
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
diff --git a/intellij-plugin/settings.gradle b/intellij-plugin/settings.gradle
deleted file mode 100644
index 067309c..0000000
--- a/intellij-plugin/settings.gradle
+++ /dev/null
@@ -1,2 +0,0 @@
-rootProject.name = 'intellij-generator'
-
diff --git a/intellij-plugin/src/main/java/io/vortex/intellij/plugin/PluginStarter.kt b/intellij-plugin/src/main/java/io/vortex/intellij/plugin/PluginStarter.kt
deleted file mode 100644
index d8395a4..0000000
--- a/intellij-plugin/src/main/java/io/vortex/intellij/plugin/PluginStarter.kt
+++ /dev/null
@@ -1,2 +0,0 @@
-package io.vortex.intellij.plugin
-
diff --git a/intellij-plugin/src/main/java/io/vortex/intellij/plugin/actions/AboutPluginAction.kt b/intellij-plugin/src/main/java/io/vortex/intellij/plugin/actions/AboutPluginAction.kt
deleted file mode 100644
index f7531f2..0000000
--- a/intellij-plugin/src/main/java/io/vortex/intellij/plugin/actions/AboutPluginAction.kt
+++ /dev/null
@@ -1,13 +0,0 @@
-package io.vortex.intellij.plugin.actions
-
-import com.intellij.openapi.actionSystem.AnAction
-import com.intellij.openapi.actionSystem.AnActionEvent
-import io.vortex.intellij.plugin.actions.screens.AboutPlugin
-
-class AboutPluginAction : AnAction() {
-
- override fun actionPerformed(e: AnActionEvent) {
- AboutPlugin()
- }
-
-}
diff --git a/intellij-plugin/src/main/java/io/vortex/intellij/plugin/actions/ScreenGeneratorAction.kt b/intellij-plugin/src/main/java/io/vortex/intellij/plugin/actions/ScreenGeneratorAction.kt
deleted file mode 100644
index 2bec239..0000000
--- a/intellij-plugin/src/main/java/io/vortex/intellij/plugin/actions/ScreenGeneratorAction.kt
+++ /dev/null
@@ -1,4 +0,0 @@
-package io.vortex.intellij.plugin.actions
-
-class ScreenGeneratorAction {
-}
\ No newline at end of file
diff --git a/intellij-plugin/src/main/java/io/vortex/intellij/plugin/actions/screens/AboutPlugin.kt b/intellij-plugin/src/main/java/io/vortex/intellij/plugin/actions/screens/AboutPlugin.kt
deleted file mode 100644
index 8523712..0000000
--- a/intellij-plugin/src/main/java/io/vortex/intellij/plugin/actions/screens/AboutPlugin.kt
+++ /dev/null
@@ -1,54 +0,0 @@
-package io.vortex.intellij.plugin.actions.screens
-
-import com.intellij.uiDesigner.core.GridLayoutManager
-import com.jgoodies.forms.layout.FormLayout
-import io.vortex.intellij.plugin.actions.screens.base.BaseScreen
-import io.vortex.intellij.plugin.modules.VortexWindowSize
-import io.vortex.intellij.plugin.modules.content.VortexAboutPluginContent
-import java.awt.Container
-import java.awt.GridLayout
-import javax.swing.BoxLayout
-import javax.swing.JPanel
-import javax.swing.JTextField
-
-class AboutPlugin : BaseScreen() {
-
- private val screenWidth = 600
- private val screenHeight = 500
- private var screenContainer: JPanel = JPanel()
- private var screenTitleField: JTextField = JTextField(getScreenContent().title)
- private var screenDescription: JTextField = JTextField(getScreenContent().description)
- private var screenListConfigurations: JTextField = JTextField(getScreenContent().supportedGenerators.toString())
- private var screenLinks: JTextField = JTextField(getScreenContent().links)
-
- init {
- screenContainer.let {
- it.layout = GridLayout(4,1)
- screenTitleField.isEditable = false
- screenDescription.isEditable = false
- screenListConfigurations.isEditable = false
- screenLinks.isEditable = false
-
- it.add(screenTitleField)
- it.add(screenDescription)
- it.add(screenListConfigurations)
- it.add(screenLinks)
-
- this.add(screenContainer)
- showScreen(true)
- }
- }
-
- override fun getWindowSize(): VortexWindowSize {
- return VortexWindowSize(screenWidth, screenHeight)
- }
-
- override fun getScreenTitle(): String {
- return getScreenContent().title
- }
-
- override fun getScreenContent(): VortexAboutPluginContent {
- return VortexAboutPluginContent()
- }
-
-}
\ No newline at end of file
diff --git a/intellij-plugin/src/main/java/io/vortex/intellij/plugin/actions/screens/base/BaseScreen.kt b/intellij-plugin/src/main/java/io/vortex/intellij/plugin/actions/screens/base/BaseScreen.kt
deleted file mode 100644
index c2b85b2..0000000
--- a/intellij-plugin/src/main/java/io/vortex/intellij/plugin/actions/screens/base/BaseScreen.kt
+++ /dev/null
@@ -1,24 +0,0 @@
-package io.vortex.intellij.plugin.actions.screens.base
-
-import io.vortex.intellij.plugin.modules.VortexContent
-import io.vortex.intellij.plugin.modules.VortexWindowSize
-import javax.swing.JFrame
-
-abstract class BaseScreen : JFrame(), ScreenOperations {
-
- override fun showScreen(isScreenHeaderEnabled: Boolean) {
- setSize(getWindowSize().width, getWindowSize().height)
- if (isScreenHeaderEnabled) {
- getHeaderFrameConfiguration()
- }
- isVisible = true
- }
-
- override fun getHeaderFrameConfiguration() {
- defaultCloseOperation = JFrame.HIDE_ON_CLOSE
- title = getScreenTitle()
- setLocationRelativeTo(null)
- }
-
- abstract fun getWindowSize(): VortexWindowSize
-}
diff --git a/intellij-plugin/src/main/java/io/vortex/intellij/plugin/actions/screens/base/ScreenOperations.kt b/intellij-plugin/src/main/java/io/vortex/intellij/plugin/actions/screens/base/ScreenOperations.kt
deleted file mode 100644
index 762a2db..0000000
--- a/intellij-plugin/src/main/java/io/vortex/intellij/plugin/actions/screens/base/ScreenOperations.kt
+++ /dev/null
@@ -1,15 +0,0 @@
-package io.vortex.intellij.plugin.actions.screens.base
-
-import io.vortex.intellij.plugin.modules.VortexContent
-
-interface ScreenOperations {
-
- fun showScreen(isScreenHeaderEnabled: Boolean)
-
- fun getScreenTitle(): String
-
- fun getHeaderFrameConfiguration()
-
- fun getScreenContent(): C
-
-}
\ No newline at end of file
diff --git a/intellij-plugin/src/main/java/io/vortex/intellij/plugin/modules/VortexContent.kt b/intellij-plugin/src/main/java/io/vortex/intellij/plugin/modules/VortexContent.kt
deleted file mode 100644
index 09b00ad..0000000
--- a/intellij-plugin/src/main/java/io/vortex/intellij/plugin/modules/VortexContent.kt
+++ /dev/null
@@ -1,4 +0,0 @@
-package io.vortex.intellij.plugin.modules
-
-interface VortexContent {
-}
\ No newline at end of file
diff --git a/intellij-plugin/src/main/java/io/vortex/intellij/plugin/modules/VortexWindowSize.kt b/intellij-plugin/src/main/java/io/vortex/intellij/plugin/modules/VortexWindowSize.kt
deleted file mode 100644
index 1e58a42..0000000
--- a/intellij-plugin/src/main/java/io/vortex/intellij/plugin/modules/VortexWindowSize.kt
+++ /dev/null
@@ -1,6 +0,0 @@
-package io.vortex.intellij.plugin.modules
-
-data class VortexWindowSize(
- val width: Int,
- val height: Int
-)
\ No newline at end of file
diff --git a/intellij-plugin/src/main/java/io/vortex/intellij/plugin/modules/content/VortexAboutPluginContent.kt b/intellij-plugin/src/main/java/io/vortex/intellij/plugin/modules/content/VortexAboutPluginContent.kt
deleted file mode 100644
index df7bc39..0000000
--- a/intellij-plugin/src/main/java/io/vortex/intellij/plugin/modules/content/VortexAboutPluginContent.kt
+++ /dev/null
@@ -1,26 +0,0 @@
-package io.vortex.intellij.plugin.modules.content
-
-import io.vortex.intellij.plugin.modules.VortexContent
-
-data class VortexAboutPluginContent(
- val title: String = "About Plugin",
- val description: String = "Vortex is An Archetecture To Build Android Applications With Latest Technologies , Kotlin Language" +
- "To Generate , Support Common Cases , Configuration For Android Platform",
- val links: String = """
- Vortex Version 1.0.0
- Vortex Github Link : https://github.com/Yazan98/Vortex
- Generated Code Language : Kotlin
- """.trimIndent(),
- val supportedGenerators: List = arrayListOf(
- "1.Activities",
- "2.Fragments (Templates / Custom)",
- "3. Services , Notifications",
- "4.ViewModels (Logic Implementation)",
- "5.Crud Repositories (Api)",
- "6.Crud Local Databases",
- "7.Application Configuration",
- "8.Gradle Application Configuration",
- "9.Api Models",
- "10. Common Configuration About Android Applications"
- )
-): VortexContent
diff --git a/intellij-plugin/src/main/resources/META-INF/plugin.xml b/intellij-plugin/src/main/resources/META-INF/plugin.xml
deleted file mode 100644
index e1ddf17..0000000
--- a/intellij-plugin/src/main/resources/META-INF/plugin.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
- io.vortex.intellij.plugin.intellij-generator
- Vortex ICG
- Vortex
-
- Vortex Intellij Code Generator
- Build Android Applications With Vortex Implementation
- Depends on Latest Technologies in Android Platform
- ]]>
-
- com.intellij.modules.platform
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/settings.gradle b/settings.gradle
index d783ab3..2532e8a 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,10 +1,10 @@
-rootProject.name='Vortex'
-include ':vortex-ui'
-include ':vortex-data'
-include ':vortex-utils'
-include ':vortex-firebase'
-include ':vortex'
-include ':vortex-permissions'
-include ':vortex-prefs'
-include ':vortex-log'
-include ':vortex-ui-binding'
+rootProject.name='Vanite'
+include ':vanite-ui'
+include ':vanite-data'
+include ':vanite-utils'
+include ':vanite-firebase'
+include ':vanite'
+include ':vanite-permissions'
+include ':vanite-prefs'
+include ':vanite-log'
+include ':vanite-ui-binding'
diff --git a/vortex-data/build.gradle b/vanite-data/build.gradle
similarity index 92%
rename from vortex-data/build.gradle
rename to vanite-data/build.gradle
index e7c4f06..09c160d 100644
--- a/vortex-data/build.gradle
+++ b/vanite-data/build.gradle
@@ -31,7 +31,7 @@ android {
}
ext {
- PUBLISH_ARTIFACT_ID = 'vortex-data'
+ PUBLISH_ARTIFACT_ID = 'vanite-data'
}
apply from: "${rootProject.projectDir}/scripts/publish-module.gradle"
@@ -44,8 +44,8 @@ dependencies { configuration ->
addCoroutinesLibraries(configuration)
addDefaultAppCompatDependencies(configuration)
- if (!project.name.equals("vortex")) {
- implementation project(":vortex")
+ if (!project.name.equals(":vanite")) {
+ implementation project(":vanite")
}
}
diff --git a/vortex-data/consumer-rules.pro b/vanite-data/consumer-rules.pro
similarity index 100%
rename from vortex-data/consumer-rules.pro
rename to vanite-data/consumer-rules.pro
diff --git a/vortex-data/proguard-rules.pro b/vanite-data/proguard-rules.pro
similarity index 100%
rename from vortex-data/proguard-rules.pro
rename to vanite-data/proguard-rules.pro
diff --git a/vortex-data/src/main/AndroidManifest.xml b/vanite-data/src/main/AndroidManifest.xml
similarity index 63%
rename from vortex-data/src/main/AndroidManifest.xml
rename to vanite-data/src/main/AndroidManifest.xml
index 192ffc8..b20727a 100644
--- a/vortex-data/src/main/AndroidManifest.xml
+++ b/vanite-data/src/main/AndroidManifest.xml
@@ -1,2 +1,2 @@
+ package="io.vanite.android.data" />
diff --git a/vortex-data/src/main/java/io/vortex/android/data/VortexRepository.kt b/vanite-data/src/main/java/io/vanite/android/data/VaniteRepository.kt
similarity index 54%
rename from vortex-data/src/main/java/io/vortex/android/data/VortexRepository.kt
rename to vanite-data/src/main/java/io/vanite/android/data/VaniteRepository.kt
index 8bc32c0..ba48d34 100644
--- a/vortex-data/src/main/java/io/vortex/android/data/VortexRepository.kt
+++ b/vanite-data/src/main/java/io/vanite/android/data/VaniteRepository.kt
@@ -1,9 +1,5 @@
-package io.vortex.android.data
+package io.vanite.android.data
-import io.vortex.android.models.VortexAuth
-import kotlinx.coroutines.Dispatchers
-import kotlinx.coroutines.withContext
-import okhttp3.Credentials
import retrofit2.Retrofit
/**
@@ -12,7 +8,7 @@ import retrofit2.Retrofit
* Time : 9:44 PM
*/
-abstract class VortexRepository : VortexRepositoryImpl {
+abstract class VaniteRepository : VaniteRepositoryImpl {
open lateinit var serviceProvider: Retrofit
diff --git a/vortex-data/src/main/java/io/vortex/android/data/VortexRepositoryImpl.kt b/vanite-data/src/main/java/io/vanite/android/data/VaniteRepositoryImpl.kt
similarity index 50%
rename from vortex-data/src/main/java/io/vortex/android/data/VortexRepositoryImpl.kt
rename to vanite-data/src/main/java/io/vanite/android/data/VaniteRepositoryImpl.kt
index 88ee87b..61cb936 100644
--- a/vortex-data/src/main/java/io/vortex/android/data/VortexRepositoryImpl.kt
+++ b/vanite-data/src/main/java/io/vanite/android/data/VaniteRepositoryImpl.kt
@@ -1,7 +1,4 @@
-package io.vortex.android.data
-
-import io.vortex.android.models.VortexRequestDetailsProvider
-import io.vortex.android.rx.VortexRequestProvider
+package io.vanite.android.data
/**
* Created By : Yazan Tarifi
@@ -9,7 +6,7 @@ import io.vortex.android.rx.VortexRequestProvider
* Time : 9:44 PM
*/
-interface VortexRepositoryImpl {
+interface VaniteRepositoryImpl {
suspend fun getService(): Api
diff --git a/vortex-data/src/main/java/io/vortex/android/data/VortexRetrofitProvider.kt b/vanite-data/src/main/java/io/vanite/android/data/VaniteRetrofitProvider.kt
similarity index 79%
rename from vortex-data/src/main/java/io/vortex/android/data/VortexRetrofitProvider.kt
rename to vanite-data/src/main/java/io/vanite/android/data/VaniteRetrofitProvider.kt
index be30fa8..4194a4a 100644
--- a/vortex-data/src/main/java/io/vortex/android/data/VortexRetrofitProvider.kt
+++ b/vanite-data/src/main/java/io/vanite/android/data/VaniteRetrofitProvider.kt
@@ -1,9 +1,9 @@
-package io.vortex.android.data
+package io.vanite.android.data
-import io.vortex.android.data.interceptor.VortexInterceptor
-import io.vortex.android.models.VortexRequestDetails
-import io.vortex.android.models.VortexRequestDetailsProvider
-import io.vortex.android.models.data.VortexRequestController
+import io.vanite.android.data.interceptor.VaniteInterceptor
+import io.vanite.android.models.VaniteRequestDetails
+import io.vanite.android.models.VaniteRequestDetailsProvider
+import io.vanite.android.models.data.VaniteRequestController
import okhttp3.OkHttpClient
import okhttp3.logging.HttpLoggingInterceptor
import retrofit2.Retrofit
@@ -16,7 +16,7 @@ import retrofit2.converter.gson.GsonConverterFactory
* Time : 9:44 PM
*/
-object VortexRetrofitProvider {
+object VaniteRetrofitProvider {
fun getBasicRetrofit(baseUrl: String): Retrofit {
return Retrofit.Builder()
@@ -50,7 +50,7 @@ object VortexRetrofitProvider {
return httpClient.build()
}
- fun getReactiveFullRetrofit(baseUrl: String , requestDetails: VortexRequestDetails): Retrofit {
+ fun getReactiveFullRetrofit(baseUrl: String , requestDetails: VaniteRequestDetails): Retrofit {
return Retrofit.Builder()
.baseUrl(baseUrl)
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
@@ -59,8 +59,8 @@ object VortexRetrofitProvider {
.build()
}
- private fun getReactiveFullClient(requestDetails: VortexRequestDetails): OkHttpClient {
- val requestDetailsFull = requestDetails as VortexRequestDetailsProvider
+ private fun getReactiveFullClient(requestDetails: VaniteRequestDetails): OkHttpClient {
+ val requestDetailsFull = requestDetails as VaniteRequestDetailsProvider
val httpClient = OkHttpClient.Builder()
val interceptor = HttpLoggingInterceptor()
interceptor.level = HttpLoggingInterceptor.Level.BODY
@@ -78,9 +78,9 @@ object VortexRetrofitProvider {
return httpClient.build()
}
- private fun getVortexClient(requestDetails: VortexRequestDetailsProvider): OkHttpClient {
+ private fun getVaniteClient(requestDetails: VaniteRequestDetailsProvider): OkHttpClient {
val httpClient = OkHttpClient.Builder()
- httpClient.addInterceptor(VortexInterceptor(requestDetails , VortexRequestController(
+ httpClient.addInterceptor(VaniteInterceptor(requestDetails , VaniteRequestController(
isLoggingEnabled = requestDetails.isLoggingEnabled,
loggingMode = requestDetails.loggingMode,
loggingTag = requestDetails.loggingTag
@@ -88,12 +88,12 @@ object VortexRetrofitProvider {
return httpClient.build()
}
- fun getVortexSettingsClient(baseUrl: String , requestDetails: VortexRequestDetailsProvider): Retrofit {
+ fun getVaniteSettingsClient(baseUrl: String, requestDetails: VaniteRequestDetailsProvider): Retrofit {
return Retrofit.Builder()
.baseUrl(baseUrl)
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
.addConverterFactory(GsonConverterFactory.create())
- .client(getVortexClient(requestDetails))
+ .client(getVaniteClient(requestDetails))
.build()
}
}
diff --git a/vortex-data/src/main/java/io/vortex/android/data/executer/VortexFlowableRequestExecutor.kt b/vanite-data/src/main/java/io/vanite/android/data/executer/VaniteFlowableRequestExecutor.kt
similarity index 84%
rename from vortex-data/src/main/java/io/vortex/android/data/executer/VortexFlowableRequestExecutor.kt
rename to vanite-data/src/main/java/io/vanite/android/data/executer/VaniteFlowableRequestExecutor.kt
index 8cf0a8d..93b93c7 100644
--- a/vortex-data/src/main/java/io/vortex/android/data/executer/VortexFlowableRequestExecutor.kt
+++ b/vanite-data/src/main/java/io/vanite/android/data/executer/VaniteFlowableRequestExecutor.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.data.executer
+package io.vanite.android.data.executer
import io.reactivex.Flowable
import io.reactivex.disposables.CompositeDisposable
@@ -12,15 +12,15 @@ import java.lang.ref.WeakReference
* Time : 2:20 PM
*/
-class VortexFlowableRequestExecutor> :
- VortexSubscriberHandler> {
+class VaniteFlowableRequestExecutor> :
+ VaniteSubscriberHandler> {
private val repo: CompositeDisposable by lazy { CompositeDisposable() }
private var listener: WeakReference? = null
override suspend fun addListener(listener: Listener) {
withContext(Dispatchers.IO) {
- this@VortexFlowableRequestExecutor.listener = WeakReference(listener)
+ this@VaniteFlowableRequestExecutor.listener = WeakReference(listener)
}
}
diff --git a/vortex-data/src/main/java/io/vortex/android/data/executer/VortexObservableRequestExecutor.kt b/vanite-data/src/main/java/io/vanite/android/data/executer/VaniteObservableRequestExecutor.kt
similarity index 84%
rename from vortex-data/src/main/java/io/vortex/android/data/executer/VortexObservableRequestExecutor.kt
rename to vanite-data/src/main/java/io/vanite/android/data/executer/VaniteObservableRequestExecutor.kt
index 236fd1a..953c8e0 100644
--- a/vortex-data/src/main/java/io/vortex/android/data/executer/VortexObservableRequestExecutor.kt
+++ b/vanite-data/src/main/java/io/vanite/android/data/executer/VaniteObservableRequestExecutor.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.data.executer
+package io.vanite.android.data.executer
import io.reactivex.Observable
import io.reactivex.disposables.CompositeDisposable
@@ -12,15 +12,15 @@ import java.lang.ref.WeakReference
* Time : 2:19 PM
*/
-class VortexObservableRequestExecutor> :
- VortexSubscriberHandler> {
+class VaniteObservableRequestExecutor> :
+ VaniteSubscriberHandler> {
private val repo: CompositeDisposable by lazy { CompositeDisposable() }
private var listener: WeakReference? = null
override suspend fun addListener(listener: Listener) {
withContext(Dispatchers.IO) {
- this@VortexObservableRequestExecutor.listener = WeakReference(listener)
+ this@VaniteObservableRequestExecutor.listener = WeakReference(listener)
}
}
diff --git a/vortex-data/src/main/java/io/vortex/android/data/executer/VortexRequestListener.kt b/vanite-data/src/main/java/io/vanite/android/data/executer/VaniteRequestListener.kt
similarity index 55%
rename from vortex-data/src/main/java/io/vortex/android/data/executer/VortexRequestListener.kt
rename to vanite-data/src/main/java/io/vanite/android/data/executer/VaniteRequestListener.kt
index 576b0ad..27c292f 100644
--- a/vortex-data/src/main/java/io/vortex/android/data/executer/VortexRequestListener.kt
+++ b/vanite-data/src/main/java/io/vanite/android/data/executer/VaniteRequestListener.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.data.executer
+package io.vanite.android.data.executer
/**
* Created By : Yazan Tarifi
@@ -6,16 +6,16 @@ package io.vortex.android.data.executer
* Time : 2:20 PM
*/
-interface VortexRequestListener {
+interface VaniteRequestListener {
- interface VortexFlowableRequestListener : VortexObservableRequestListener
- interface VortexObservableRequestListener : VortexRequestListener {
+ interface VaniteFlowableRequestListener : VaniteObservableRequestListener
+ interface VaniteObservableRequestListener : VaniteRequestListener {
fun onSuccess(data: Result)
fun onError(error: Throwable)
fun onComplete()
}
- interface VortexSingleRequestListener : VortexRequestListener {
+ interface VaniteSingleRequestListener : VaniteRequestListener {
fun onSuccess(data: Result)
fun onError(error: Throwable)
}
diff --git a/vortex-data/src/main/java/io/vortex/android/data/executer/VortexSingleRequestExecutor.kt b/vanite-data/src/main/java/io/vanite/android/data/executer/VaniteSingleRequestExecutor.kt
similarity index 83%
rename from vortex-data/src/main/java/io/vortex/android/data/executer/VortexSingleRequestExecutor.kt
rename to vanite-data/src/main/java/io/vanite/android/data/executer/VaniteSingleRequestExecutor.kt
index 46a0818..b848870 100644
--- a/vortex-data/src/main/java/io/vortex/android/data/executer/VortexSingleRequestExecutor.kt
+++ b/vanite-data/src/main/java/io/vanite/android/data/executer/VaniteSingleRequestExecutor.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.data.executer
+package io.vanite.android.data.executer
import io.reactivex.Single
import io.reactivex.disposables.CompositeDisposable
@@ -12,15 +12,15 @@ import java.lang.ref.WeakReference
* Time : 2:19 PM
*/
-class VortexSingleRequestExecutor> :
- VortexSubscriberHandler> {
+class VaniteSingleRequestExecutor> :
+ VaniteSubscriberHandler> {
private val repo: CompositeDisposable by lazy { CompositeDisposable() }
private var listener: WeakReference? = null
override suspend fun addListener(listener: Listener) {
withContext(Dispatchers.IO) {
- this@VortexSingleRequestExecutor.listener = WeakReference(listener)
+ this@VaniteSingleRequestExecutor.listener = WeakReference(listener)
}
}
diff --git a/vortex-data/src/main/java/io/vortex/android/data/executer/VortexSubscriberHandler.kt b/vanite-data/src/main/java/io/vanite/android/data/executer/VaniteSubscriberHandler.kt
similarity index 64%
rename from vortex-data/src/main/java/io/vortex/android/data/executer/VortexSubscriberHandler.kt
rename to vanite-data/src/main/java/io/vanite/android/data/executer/VaniteSubscriberHandler.kt
index e77b826..9fd59c2 100644
--- a/vortex-data/src/main/java/io/vortex/android/data/executer/VortexSubscriberHandler.kt
+++ b/vanite-data/src/main/java/io/vanite/android/data/executer/VaniteSubscriberHandler.kt
@@ -1,6 +1,4 @@
-package io.vortex.android.data.executer
-
-import io.reactivex.Single
+package io.vanite.android.data.executer
/**
* Created By : Yazan Tarifi
@@ -8,7 +6,7 @@ import io.reactivex.Single
* Time : 11:28 PM
*/
-interface VortexSubscriberHandler {
+interface VaniteSubscriberHandler {
suspend fun addListener(listener: Subscriber)
diff --git a/vortex-data/src/main/java/io/vortex/android/data/fake/VortexFakeRepository.kt b/vanite-data/src/main/java/io/vanite/android/data/fake/VaniteFakeRepository.kt
similarity index 85%
rename from vortex-data/src/main/java/io/vortex/android/data/fake/VortexFakeRepository.kt
rename to vanite-data/src/main/java/io/vanite/android/data/fake/VaniteFakeRepository.kt
index db48fb6..deafd25 100644
--- a/vortex-data/src/main/java/io/vortex/android/data/fake/VortexFakeRepository.kt
+++ b/vanite-data/src/main/java/io/vanite/android/data/fake/VaniteFakeRepository.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.data.fake
+package io.vanite.android.data.fake
import android.content.res.Resources
import androidx.annotation.RawRes
@@ -8,10 +8,10 @@ import io.reactivex.Single
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
-abstract class VortexFakeRepository {
+abstract class VaniteFakeRepository {
- protected val resourceReader: VortexResourceReader by lazy {
- VortexResourceReader()
+ protected val resourceReader: VaniteResourceReader by lazy {
+ VaniteResourceReader()
}
protected suspend fun getObservableFromJson(res: Resources, @RawRes jsonId: Int):Observable {
diff --git a/vortex-data/src/main/java/io/vortex/android/data/fake/VortexResourceReader.kt b/vanite-data/src/main/java/io/vanite/android/data/fake/VaniteResourceReader.kt
similarity index 92%
rename from vortex-data/src/main/java/io/vortex/android/data/fake/VortexResourceReader.kt
rename to vanite-data/src/main/java/io/vanite/android/data/fake/VaniteResourceReader.kt
index dc47d27..dad7396 100644
--- a/vortex-data/src/main/java/io/vortex/android/data/fake/VortexResourceReader.kt
+++ b/vanite-data/src/main/java/io/vanite/android/data/fake/VaniteResourceReader.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.data.fake
+package io.vanite.android.data.fake
import android.content.res.Resources
import android.util.Log
@@ -9,9 +9,9 @@ import kotlinx.coroutines.withContext
import java.io.*
-class VortexResourceReader {
+class VaniteResourceReader {
- private val LOGTAG = "Vortex Res Reader"
+ private val LOGTAG = "Vanite Res Reader"
suspend fun readJsonFromResource(resources: Resources, id: Int): String {
return withContext(Dispatchers.IO) {
diff --git a/vortex-data/src/main/java/io/vortex/android/data/interceptor/VortexInterceptor.kt b/vanite-data/src/main/java/io/vanite/android/data/interceptor/VaniteInterceptor.kt
similarity index 85%
rename from vortex-data/src/main/java/io/vortex/android/data/interceptor/VortexInterceptor.kt
rename to vanite-data/src/main/java/io/vanite/android/data/interceptor/VaniteInterceptor.kt
index e91edd8..aac27a9 100644
--- a/vortex-data/src/main/java/io/vortex/android/data/interceptor/VortexInterceptor.kt
+++ b/vanite-data/src/main/java/io/vanite/android/data/interceptor/VaniteInterceptor.kt
@@ -1,10 +1,9 @@
-package io.vortex.android.data.interceptor
+package io.vanite.android.data.interceptor
import android.util.Log
-import com.google.gson.Gson
-import io.vortex.android.models.VortexRequestDetailsProvider
-import io.vortex.android.models.data.VortexInterceptorMode
-import io.vortex.android.models.data.VortexRequestController
+import io.vanite.android.models.VaniteRequestDetailsProvider
+import io.vanite.android.models.data.VaniteInterceptorMode
+import io.vanite.android.models.data.VaniteRequestController
import okhttp3.Headers
import okhttp3.Interceptor
import okhttp3.Request
@@ -16,9 +15,9 @@ import okhttp3.Response
* Time : 12:12 AM
*/
-class VortexInterceptor(
- private val requestDetails: VortexRequestDetailsProvider,
- private val requestController: VortexRequestController
+class VaniteInterceptor(
+ private val requestDetails: VaniteRequestDetailsProvider,
+ private val requestController: VaniteRequestController
) : Interceptor {
override fun intercept(chain: Interceptor.Chain): Response {
@@ -30,9 +29,9 @@ class VortexInterceptor(
.build()
return when (requestController.loggingMode) {
- VortexInterceptorMode.NONE -> chain.proceed(newRequest)
- VortexInterceptorMode.HEADER -> getHeadersInterceptor(chain, newRequest)
- VortexInterceptorMode.FULL -> getFullInformationInterceptor(chain, newRequest)
+ VaniteInterceptorMode.NONE -> chain.proceed(newRequest)
+ VaniteInterceptorMode.HEADER -> getHeadersInterceptor(chain, newRequest)
+ VaniteInterceptorMode.FULL -> getFullInformationInterceptor(chain, newRequest)
}
}
@@ -112,7 +111,7 @@ class VortexInterceptor(
private fun printHeader() {
if (requestController.isLoggingEnabled) {
- println("======================================= Vortex Logger Started =======================================")
+ println("======================================= Vanite Logger Started =======================================")
}
}
diff --git a/vortex-data/src/main/java/io/vortex/android/data/interceptor/VortexRetrofitInterceptor.kt b/vanite-data/src/main/java/io/vanite/android/data/interceptor/VaniteRetrofitInterceptor.kt
similarity index 90%
rename from vortex-data/src/main/java/io/vortex/android/data/interceptor/VortexRetrofitInterceptor.kt
rename to vanite-data/src/main/java/io/vanite/android/data/interceptor/VaniteRetrofitInterceptor.kt
index c37cb96..083320e 100644
--- a/vortex-data/src/main/java/io/vortex/android/data/interceptor/VortexRetrofitInterceptor.kt
+++ b/vanite-data/src/main/java/io/vanite/android/data/interceptor/VaniteRetrofitInterceptor.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.data.interceptor
+package io.vanite.android.data.interceptor
import android.util.Log.d
import okhttp3.Interceptor
@@ -6,12 +6,12 @@ import okhttp3.Response
import okhttp3.ResponseBody
import java.io.IOException
-class VortexRetrofitInterceptor : Interceptor {
+class VaniteRetrofitInterceptor : Interceptor {
companion object {
const val AUTH = "Authorization"
const val LANGUAGE = "Accept-Language"
- const val REQUEST_TAG = "Vortex Request"
+ const val REQUEST_TAG = "Vanite Request"
}
@Throws(IOException::class)
diff --git a/vortex-data/src/main/java/io/vortex/android/data/memory/MemoryRepositoryImpl.kt b/vanite-data/src/main/java/io/vanite/android/data/memory/MemoryRepositoryImpl.kt
similarity index 73%
rename from vortex-data/src/main/java/io/vortex/android/data/memory/MemoryRepositoryImpl.kt
rename to vanite-data/src/main/java/io/vanite/android/data/memory/MemoryRepositoryImpl.kt
index b326d0c..ac0aa58 100644
--- a/vortex-data/src/main/java/io/vortex/android/data/memory/MemoryRepositoryImpl.kt
+++ b/vanite-data/src/main/java/io/vanite/android/data/memory/MemoryRepositoryImpl.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.data.memory
+package io.vanite.android.data.memory
interface MemoryRepositoryImpl {
@@ -6,7 +6,7 @@ interface MemoryRepositoryImpl {
fun addAll(items: HashMap)
- fun withListener(listener: VortexMemoryListener)
+ fun withListener(listener: VaniteMemoryListener)
fun destroyListener()
diff --git a/vanite-data/src/main/java/io/vanite/android/data/memory/VaniteMemoryListener.kt b/vanite-data/src/main/java/io/vanite/android/data/memory/VaniteMemoryListener.kt
new file mode 100644
index 0000000..bb52bf1
--- /dev/null
+++ b/vanite-data/src/main/java/io/vanite/android/data/memory/VaniteMemoryListener.kt
@@ -0,0 +1,7 @@
+package io.vanite.android.data.memory
+
+interface VaniteMemoryListener {
+
+ fun acceptMemoryKeys(items: HashMap)
+
+}
diff --git a/vortex-data/src/main/java/io/vortex/android/data/memory/VortexMemoryRepository.kt b/vanite-data/src/main/java/io/vanite/android/data/memory/VaniteMemoryRepository.kt
similarity index 67%
rename from vortex-data/src/main/java/io/vortex/android/data/memory/VortexMemoryRepository.kt
rename to vanite-data/src/main/java/io/vanite/android/data/memory/VaniteMemoryRepository.kt
index be31f16..8a8ec8a 100644
--- a/vortex-data/src/main/java/io/vortex/android/data/memory/VortexMemoryRepository.kt
+++ b/vanite-data/src/main/java/io/vanite/android/data/memory/VaniteMemoryRepository.kt
@@ -1,8 +1,8 @@
-package io.vortex.android.data.memory
+package io.vanite.android.data.memory
-abstract class VortexMemoryRepository : MemoryRepositoryImpl {
+abstract class VaniteMemoryRepository : MemoryRepositoryImpl {
- private var listener: VortexMemoryListener? = null
+ private var listener: VaniteMemoryListener? = null
private val keys: HashMap by lazy {
HashMap()
}
@@ -19,7 +19,7 @@ abstract class VortexMemoryRepository : MemoryRepositoryImpl {
this.listener?.acceptMemoryKeys(keys)
}
- override fun withListener(listener: VortexMemoryListener) {
+ override fun withListener(listener: VaniteMemoryListener) {
this.listener = listener
}
diff --git a/vortex-data/src/main/java/io/vortex/android/data/memory/VortexReadyMemoryInitializer.kt b/vanite-data/src/main/java/io/vanite/android/data/memory/VaniteReadyMemoryInitializer.kt
similarity index 77%
rename from vortex-data/src/main/java/io/vortex/android/data/memory/VortexReadyMemoryInitializer.kt
rename to vanite-data/src/main/java/io/vanite/android/data/memory/VaniteReadyMemoryInitializer.kt
index eed6df5..6b38574 100644
--- a/vortex-data/src/main/java/io/vortex/android/data/memory/VortexReadyMemoryInitializer.kt
+++ b/vanite-data/src/main/java/io/vanite/android/data/memory/VaniteReadyMemoryInitializer.kt
@@ -1,9 +1,9 @@
-package io.vortex.android.data.memory
+package io.vanite.android.data.memory
import android.content.Context
import android.content.SharedPreferences
-object VortexReadyMemoryInitializer {
+object VaniteReadyMemoryInitializer {
lateinit var prefs: SharedPreferences
diff --git a/vortex-data/src/main/java/io/vortex/android/data/memory/VortexReadyMemoryRepository.kt b/vanite-data/src/main/java/io/vanite/android/data/memory/VaniteReadyMemoryRepository.kt
similarity index 67%
rename from vortex-data/src/main/java/io/vortex/android/data/memory/VortexReadyMemoryRepository.kt
rename to vanite-data/src/main/java/io/vanite/android/data/memory/VaniteReadyMemoryRepository.kt
index 253200a..b1922d4 100644
--- a/vortex-data/src/main/java/io/vortex/android/data/memory/VortexReadyMemoryRepository.kt
+++ b/vanite-data/src/main/java/io/vanite/android/data/memory/VaniteReadyMemoryRepository.kt
@@ -1,11 +1,11 @@
-package io.vortex.android.data.memory
+package io.vanite.android.data.memory
import android.content.SharedPreferences
-object VortexReadyMemoryRepository : VortexMemoryRepository() {
+object VaniteReadyMemoryRepository : VaniteMemoryRepository() {
private val prefsEditor: SharedPreferences.Editor by lazy {
- VortexReadyMemoryInitializer.prefs.edit()
+ VaniteReadyMemoryInitializer.prefs.edit()
}
override fun getByKey(key: String, defVal: String): Any? {
@@ -31,11 +31,11 @@ object VortexReadyMemoryRepository : VortexMemoryRepository() {
private fun getLocalKey(key: String, defVal: Any): Any? {
return when (defVal) {
- is String -> VortexReadyMemoryInitializer.prefs.getString(key, defVal) as Any
- is Long -> VortexReadyMemoryInitializer.prefs.getLong(key, defVal)
- is Float -> VortexReadyMemoryInitializer.prefs.getFloat(key, defVal)
- is Boolean -> VortexReadyMemoryInitializer.prefs.getBoolean(key, defVal)
- is Int -> VortexReadyMemoryInitializer.prefs.getInt(key, defVal)
+ is String -> VaniteReadyMemoryInitializer.prefs.getString(key, defVal) as Any
+ is Long -> VaniteReadyMemoryInitializer.prefs.getLong(key, defVal)
+ is Float -> VaniteReadyMemoryInitializer.prefs.getFloat(key, defVal)
+ is Boolean -> VaniteReadyMemoryInitializer.prefs.getBoolean(key, defVal)
+ is Int -> VaniteReadyMemoryInitializer.prefs.getInt(key, defVal)
else -> {
}
}
diff --git a/vortex-data/src/main/java/io/vortex/android/data/utils/VortexDaoExecutor.kt b/vanite-data/src/main/java/io/vanite/android/data/utils/VaniteDaoExecutor.kt
similarity index 71%
rename from vortex-data/src/main/java/io/vortex/android/data/utils/VortexDaoExecutor.kt
rename to vanite-data/src/main/java/io/vanite/android/data/utils/VaniteDaoExecutor.kt
index 41ef6d1..47516a2 100644
--- a/vortex-data/src/main/java/io/vortex/android/data/utils/VortexDaoExecutor.kt
+++ b/vanite-data/src/main/java/io/vanite/android/data/utils/VaniteDaoExecutor.kt
@@ -1,6 +1,6 @@
-package io.vortex.android.data.utils
+package io.vanite.android.data.utils
-interface VortexDaoExecutor {
+interface VaniteDaoExecutor {
suspend fun insert(entity: T)
diff --git a/vanite-data/src/main/java/io/vanite/android/data/utils/VaniteMapper.kt b/vanite-data/src/main/java/io/vanite/android/data/utils/VaniteMapper.kt
new file mode 100644
index 0000000..6f4a6e9
--- /dev/null
+++ b/vanite-data/src/main/java/io/vanite/android/data/utils/VaniteMapper.kt
@@ -0,0 +1,9 @@
+package io.vanite.android.data.utils
+
+interface VaniteMapper {
+
+ fun from(to: To): From
+
+ fun to(from: From): To
+
+}
diff --git a/vanite-data/src/main/java/io/vanite/android/data/utils/VaniteOneWayMapper.kt b/vanite-data/src/main/java/io/vanite/android/data/utils/VaniteOneWayMapper.kt
new file mode 100644
index 0000000..8391ea2
--- /dev/null
+++ b/vanite-data/src/main/java/io/vanite/android/data/utils/VaniteOneWayMapper.kt
@@ -0,0 +1,7 @@
+package io.vanite.android.data.utils
+
+interface VaniteOneWayMapper {
+
+ fun convert(from: From): To
+
+}
diff --git a/vortex-firebase/build.gradle b/vanite-firebase/build.gradle
similarity index 92%
rename from vortex-firebase/build.gradle
rename to vanite-firebase/build.gradle
index b10cceb..c5eed4e 100644
--- a/vortex-firebase/build.gradle
+++ b/vanite-firebase/build.gradle
@@ -31,7 +31,7 @@ android {
}
ext {
- PUBLISH_ARTIFACT_ID = 'vortex-firebase'
+ PUBLISH_ARTIFACT_ID = 'vanite-firebase'
}
apply from: "${rootProject.projectDir}/scripts/publish-module.gradle"
@@ -52,7 +52,7 @@ dependencies { configuration ->
addCoroutinesLibraries(configuration)
addDefaultAppCompatDependencies(configuration)
- if (!project.name.equals("vortex")) {
- implementation project(":vortex")
+ if (!project.name.equals("vanite")) {
+ implementation project(":vanite")
}
}
diff --git a/vortex-firebase/consumer-rules.pro b/vanite-firebase/consumer-rules.pro
similarity index 100%
rename from vortex-firebase/consumer-rules.pro
rename to vanite-firebase/consumer-rules.pro
diff --git a/vortex-firebase/proguard-rules.pro b/vanite-firebase/proguard-rules.pro
similarity index 100%
rename from vortex-firebase/proguard-rules.pro
rename to vanite-firebase/proguard-rules.pro
diff --git a/vortex-firebase/src/main/AndroidManifest.xml b/vanite-firebase/src/main/AndroidManifest.xml
similarity index 61%
rename from vortex-firebase/src/main/AndroidManifest.xml
rename to vanite-firebase/src/main/AndroidManifest.xml
index ed0972c..3f2b667 100644
--- a/vortex-firebase/src/main/AndroidManifest.xml
+++ b/vanite-firebase/src/main/AndroidManifest.xml
@@ -1,2 +1,2 @@
+ package="io.vanite.android.firebase" />
diff --git a/vortex-firebase/src/main/java/io/vortex/android/firebase/VortexFirebaseAuth.kt b/vanite-firebase/src/main/java/io/vanite/android/firebase/VaniteFirebaseAuth.kt
similarity index 90%
rename from vortex-firebase/src/main/java/io/vortex/android/firebase/VortexFirebaseAuth.kt
rename to vanite-firebase/src/main/java/io/vanite/android/firebase/VaniteFirebaseAuth.kt
index f58a194..a9fdeac 100644
--- a/vortex-firebase/src/main/java/io/vortex/android/firebase/VortexFirebaseAuth.kt
+++ b/vanite-firebase/src/main/java/io/vanite/android/firebase/VaniteFirebaseAuth.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.firebase
+package io.vanite.android.firebase
import android.content.Context
import android.content.Intent
@@ -7,9 +7,9 @@ import com.google.android.gms.auth.api.signin.GoogleSignIn
import com.google.android.gms.auth.api.signin.GoogleSignInOptions
import com.google.android.gms.common.api.ApiException
import com.google.firebase.auth.FirebaseAuth
-import io.vortex.android.firebase.impl.FirebaseAuthImpl
-import io.vortex.android.firebase.listener.VortexAuthListener
-import io.vortex.android.firebase.listener.VortexGoogleAuthLIstener
+import io.vanite.android.firebase.impl.FirebaseAuthImpl
+import io.vanite.android.firebase.listener.VaniteAuthListener
+import io.vanite.android.firebase.listener.VaniteGoogleAuthLIstener
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
@@ -19,9 +19,9 @@ import kotlinx.coroutines.withContext
* Time : 10:29 PM
*/
-class VortexFirebaseAuth(
+class VaniteFirebaseAuth(
private val auth: FirebaseAuth,
- private var listener: VortexAuthListener?
+ private var listener: VaniteAuthListener?
) : FirebaseAuthImpl {
companion object {
@@ -64,7 +64,7 @@ class VortexFirebaseAuth(
override suspend fun registerGoogleSignInHandler(
requestCode: Int,
data: Intent?,
- googleListener: VortexGoogleAuthLIstener?
+ googleListener: VaniteGoogleAuthLIstener?
) {
withContext(Dispatchers.IO) {
if (requestCode == RC_SIGN_IN) {
diff --git a/vortex-firebase/src/main/java/io/vortex/android/firebase/VortexFirebaseMessaging.kt b/vanite-firebase/src/main/java/io/vanite/android/firebase/VaniteFirebaseMessaging.kt
similarity index 89%
rename from vortex-firebase/src/main/java/io/vortex/android/firebase/VortexFirebaseMessaging.kt
rename to vanite-firebase/src/main/java/io/vanite/android/firebase/VaniteFirebaseMessaging.kt
index ec6ea3c..9d9118a 100644
--- a/vortex-firebase/src/main/java/io/vortex/android/firebase/VortexFirebaseMessaging.kt
+++ b/vanite-firebase/src/main/java/io/vanite/android/firebase/VaniteFirebaseMessaging.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.firebase
+package io.vanite.android.firebase
import android.annotation.SuppressLint
import android.app.NotificationManager
@@ -8,7 +8,7 @@ import android.content.Intent
import androidx.core.app.NotificationCompat
import com.google.firebase.messaging.FirebaseMessagingService
import com.google.firebase.messaging.RemoteMessage
-import io.vortex.android.firebase.impl.FirebaseNotificationImpl
+import io.vanite.android.firebase.impl.FirebaseNotificationImpl
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
@@ -19,7 +19,7 @@ import kotlinx.coroutines.withContext
* Time : 11:07 PM
*/
-abstract class VortexFirebaseMessaging : FirebaseMessagingService(), FirebaseNotificationImpl {
+abstract class VaniteFirebaseMessaging : FirebaseMessagingService(), FirebaseNotificationImpl {
override fun onMessageReceived(p0: RemoteMessage) {
super.onMessageReceived(p0)
@@ -27,7 +27,7 @@ abstract class VortexFirebaseMessaging : FirebaseMessagingService(), FirebaseNot
}
@SuppressLint("WrongConstant")
- override suspend fun showNotification(notification: VortexNotification) {
+ override suspend fun showNotification(notification: VaniteNotification) {
withContext(Dispatchers.Main) {
val mBuilder = NotificationCompat.Builder(applicationContext, notification.channelId)
.setSmallIcon(notification.smallIcon)
@@ -75,6 +75,6 @@ abstract class VortexFirebaseMessaging : FirebaseMessagingService(), FirebaseNot
}
protected abstract fun onNewMessage(manager: RemoteMessage)
- protected abstract fun getNotificationInfo(): VortexNotification
+ protected abstract fun getNotificationInfo(): VaniteNotification
}
diff --git a/vortex-firebase/src/main/java/io/vortex/android/firebase/VortexFirestore.kt b/vanite-firebase/src/main/java/io/vanite/android/firebase/VaniteFirestore.kt
similarity index 90%
rename from vortex-firebase/src/main/java/io/vortex/android/firebase/VortexFirestore.kt
rename to vanite-firebase/src/main/java/io/vanite/android/firebase/VaniteFirestore.kt
index c2c3a4e..ac82503 100644
--- a/vortex-firebase/src/main/java/io/vortex/android/firebase/VortexFirestore.kt
+++ b/vanite-firebase/src/main/java/io/vanite/android/firebase/VaniteFirestore.kt
@@ -1,7 +1,7 @@
-package io.vortex.android.firebase
+package io.vanite.android.firebase
import com.google.firebase.firestore.FirebaseFirestore
-import io.vortex.android.firebase.impl.VortexFirestoreImpl
+import io.vanite.android.firebase.impl.VaniteFirestoreImpl
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import kotlin.coroutines.resume
@@ -15,7 +15,7 @@ import kotlin.coroutines.suspendCoroutine
* Time : 10:56 PM
*/
-class VortexFirestore(private val firestore: FirebaseFirestore) : VortexFirestoreImpl {
+class VaniteFirestore(private val firestore: FirebaseFirestore) : VaniteFirestoreImpl {
override suspend fun createDocument(collection: String, model: Any) {
withContext(Dispatchers.IO) {
diff --git a/vortex-firebase/src/main/java/io/vortex/android/firebase/VortexNotification.kt b/vanite-firebase/src/main/java/io/vanite/android/firebase/VaniteNotification.kt
similarity index 84%
rename from vortex-firebase/src/main/java/io/vortex/android/firebase/VortexNotification.kt
rename to vanite-firebase/src/main/java/io/vanite/android/firebase/VaniteNotification.kt
index 0dd8a3b..f0feafa 100644
--- a/vortex-firebase/src/main/java/io/vortex/android/firebase/VortexNotification.kt
+++ b/vanite-firebase/src/main/java/io/vanite/android/firebase/VaniteNotification.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.firebase
+package io.vanite.android.firebase
import androidx.annotation.LayoutRes
@@ -8,7 +8,7 @@ import androidx.annotation.LayoutRes
* Time : 11:13 PM
*/
-data class VortexNotification(
+data class VaniteNotification(
var title: String = "",
var body: String = "",
@LayoutRes var smallIcon: Int,
diff --git a/vortex-firebase/src/main/java/io/vortex/android/firebase/VortexReportingTree.kt b/vanite-firebase/src/main/java/io/vanite/android/firebase/VaniteReportingTree.kt
similarity index 83%
rename from vortex-firebase/src/main/java/io/vortex/android/firebase/VortexReportingTree.kt
rename to vanite-firebase/src/main/java/io/vanite/android/firebase/VaniteReportingTree.kt
index 518f9f5..f10223d 100644
--- a/vortex-firebase/src/main/java/io/vortex/android/firebase/VortexReportingTree.kt
+++ b/vanite-firebase/src/main/java/io/vanite/android/firebase/VaniteReportingTree.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.firebase
+package io.vanite.android.firebase
import android.util.Log
import timber.log.Timber
@@ -10,7 +10,7 @@ import timber.log.Timber
* Time : 11:09 PM
*/
-abstract class VortexReportingTree : Timber.Tree() {
+abstract class VaniteReportingTree : Timber.Tree() {
override fun log(priority: Int, tag: String?, message: String, t: Throwable?) {
if (priority == Log.VERBOSE || priority == Log.DEBUG) {
diff --git a/vortex-firebase/src/main/java/io/vortex/android/firebase/impl/FirebaseAuthImpl.kt b/vanite-firebase/src/main/java/io/vanite/android/firebase/impl/FirebaseAuthImpl.kt
similarity index 78%
rename from vortex-firebase/src/main/java/io/vortex/android/firebase/impl/FirebaseAuthImpl.kt
rename to vanite-firebase/src/main/java/io/vanite/android/firebase/impl/FirebaseAuthImpl.kt
index 6ae75ee..c7d7a19 100644
--- a/vortex-firebase/src/main/java/io/vortex/android/firebase/impl/FirebaseAuthImpl.kt
+++ b/vanite-firebase/src/main/java/io/vanite/android/firebase/impl/FirebaseAuthImpl.kt
@@ -1,8 +1,8 @@
-package io.vortex.android.firebase.impl
+package io.vanite.android.firebase.impl
import android.content.Context
import android.content.Intent
-import io.vortex.android.firebase.listener.VortexGoogleAuthLIstener
+import io.vanite.android.firebase.listener.VaniteGoogleAuthLIstener
/**
* Created By : Yazan Tarifi
@@ -18,7 +18,7 @@ interface FirebaseAuthImpl {
suspend fun registerWithEmailAndPassword(email: String, password: String)
- suspend fun registerGoogleSignInHandler(requestCode: Int, data: Intent?, googleListener: VortexGoogleAuthLIstener?)
+ suspend fun registerGoogleSignInHandler(requestCode: Int, data: Intent?, googleListener: VaniteGoogleAuthLIstener?)
suspend fun signOut()
diff --git a/vortex-firebase/src/main/java/io/vortex/android/firebase/impl/FirebaseNotificationImpl.kt b/vanite-firebase/src/main/java/io/vanite/android/firebase/impl/FirebaseNotificationImpl.kt
similarity index 87%
rename from vortex-firebase/src/main/java/io/vortex/android/firebase/impl/FirebaseNotificationImpl.kt
rename to vanite-firebase/src/main/java/io/vanite/android/firebase/impl/FirebaseNotificationImpl.kt
index a446b3b..1bd632b 100644
--- a/vortex-firebase/src/main/java/io/vortex/android/firebase/impl/FirebaseNotificationImpl.kt
+++ b/vanite-firebase/src/main/java/io/vanite/android/firebase/impl/FirebaseNotificationImpl.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.firebase.impl
+package io.vanite.android.firebase.impl
/**
* Created By : Yazan Tarifi
diff --git a/vortex-firebase/src/main/java/io/vortex/android/firebase/impl/VortexFirestoreImpl.kt b/vanite-firebase/src/main/java/io/vanite/android/firebase/impl/VaniteFirestoreImpl.kt
similarity index 84%
rename from vortex-firebase/src/main/java/io/vortex/android/firebase/impl/VortexFirestoreImpl.kt
rename to vanite-firebase/src/main/java/io/vanite/android/firebase/impl/VaniteFirestoreImpl.kt
index e96ae42..5c5808f 100644
--- a/vortex-firebase/src/main/java/io/vortex/android/firebase/impl/VortexFirestoreImpl.kt
+++ b/vanite-firebase/src/main/java/io/vanite/android/firebase/impl/VaniteFirestoreImpl.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.firebase.impl
+package io.vanite.android.firebase.impl
/**
* Created By : Yazan Tarifi
@@ -6,7 +6,7 @@ package io.vortex.android.firebase.impl
* Time : 10:56 PM
*/
-interface VortexFirestoreImpl {
+interface VaniteFirestoreImpl {
suspend fun createDocument(collection: String , model: Any)
diff --git a/vortex-firebase/src/main/java/io/vortex/android/firebase/listener/VortexAuthListener.kt b/vanite-firebase/src/main/java/io/vanite/android/firebase/listener/VaniteAuthListener.kt
similarity index 76%
rename from vortex-firebase/src/main/java/io/vortex/android/firebase/listener/VortexAuthListener.kt
rename to vanite-firebase/src/main/java/io/vanite/android/firebase/listener/VaniteAuthListener.kt
index 17c499d..62d2204 100644
--- a/vortex-firebase/src/main/java/io/vortex/android/firebase/listener/VortexAuthListener.kt
+++ b/vanite-firebase/src/main/java/io/vanite/android/firebase/listener/VaniteAuthListener.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.firebase.listener
+package io.vanite.android.firebase.listener
import com.google.firebase.auth.FirebaseUser
import java.lang.Exception
@@ -9,7 +9,7 @@ import java.lang.Exception
* Time : 10:32 PM
*/
-interface VortexAuthListener {
+interface VaniteAuthListener {
fun onAuthSuccess(user: FirebaseUser?)
diff --git a/vortex-firebase/src/main/java/io/vortex/android/firebase/listener/VortexGoogleAuthLIstener.kt b/vanite-firebase/src/main/java/io/vanite/android/firebase/listener/VaniteGoogleAuthLIstener.kt
similarity index 77%
rename from vortex-firebase/src/main/java/io/vortex/android/firebase/listener/VortexGoogleAuthLIstener.kt
rename to vanite-firebase/src/main/java/io/vanite/android/firebase/listener/VaniteGoogleAuthLIstener.kt
index 95dfd30..5f920ce 100644
--- a/vortex-firebase/src/main/java/io/vortex/android/firebase/listener/VortexGoogleAuthLIstener.kt
+++ b/vanite-firebase/src/main/java/io/vanite/android/firebase/listener/VaniteGoogleAuthLIstener.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.firebase.listener
+package io.vanite.android.firebase.listener
import com.google.android.gms.auth.api.signin.GoogleSignInAccount
import java.lang.Exception
@@ -9,7 +9,7 @@ import java.lang.Exception
* Time : 10:53 PM
*/
-interface VortexGoogleAuthLIstener {
+interface VaniteGoogleAuthLIstener {
suspend fun onAuthSuccess(user: GoogleSignInAccount?)
diff --git a/vortex-log/build.gradle b/vanite-log/build.gradle
similarity index 89%
rename from vortex-log/build.gradle
rename to vanite-log/build.gradle
index 8b3bcca..1391576 100644
--- a/vortex-log/build.gradle
+++ b/vanite-log/build.gradle
@@ -31,7 +31,7 @@ android {
}
ext {
- PUBLISH_ARTIFACT_ID = 'vortex-log'
+ PUBLISH_ARTIFACT_ID = 'vanite-log'
}
apply from: "${rootProject.projectDir}/scripts/publish-module.gradle"
@@ -43,7 +43,7 @@ dependencies { configuration ->
addCoroutinesLibraries(configuration)
addDefaultAppCompatDependencies(configuration)
- if (!project.name.equals("vortex")) {
- implementation project(":vortex")
+ if (!project.name.equals("vanite")) {
+ implementation project(":vanite")
}
}
\ No newline at end of file
diff --git a/vortex-log/build/generated/source/buildConfig/release/io/vortex/android/state/BuildConfig.java b/vanite-log/build/generated/source/buildConfig/release/io/vanite/android/state/BuildConfig.java
similarity index 67%
rename from vortex-log/build/generated/source/buildConfig/release/io/vortex/android/state/BuildConfig.java
rename to vanite-log/build/generated/source/buildConfig/release/io/vanite/android/state/BuildConfig.java
index 618b6d8..8252238 100644
--- a/vortex-log/build/generated/source/buildConfig/release/io/vortex/android/state/BuildConfig.java
+++ b/vanite-log/build/generated/source/buildConfig/release/io/vanite/android/state/BuildConfig.java
@@ -1,10 +1,10 @@
/**
* Automatically generated file. DO NOT MODIFY
*/
-package io.vortex.android.state;
+package io.vanite.android.state;
public final class BuildConfig {
public static final boolean DEBUG = false;
- public static final String LIBRARY_PACKAGE_NAME = "io.vortex.android.state";
+ public static final String LIBRARY_PACKAGE_NAME = "io.vanite.android.state";
public static final String BUILD_TYPE = "release";
}
diff --git a/vortex-log/build/intermediates/merged_manifest/release/AndroidManifest.xml b/vanite-log/build/intermediates/aapt_friendly_merged_manifests/release/aapt/AndroidManifest.xml
similarity index 84%
rename from vortex-log/build/intermediates/merged_manifest/release/AndroidManifest.xml
rename to vanite-log/build/intermediates/aapt_friendly_merged_manifests/release/aapt/AndroidManifest.xml
index 2df5b65..9954e62 100644
--- a/vortex-log/build/intermediates/merged_manifest/release/AndroidManifest.xml
+++ b/vanite-log/build/intermediates/aapt_friendly_merged_manifests/release/aapt/AndroidManifest.xml
@@ -1,6 +1,6 @@
+ package="io.vanite.android.state" >
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/vortex-log/build/intermediates/incremental/mergeReleaseShaders/merger.xml b/vanite-log/build/intermediates/incremental/mergeReleaseShaders/merger.xml
similarity index 70%
rename from vortex-log/build/intermediates/incremental/mergeReleaseShaders/merger.xml
rename to vanite-log/build/intermediates/incremental/mergeReleaseShaders/merger.xml
index c19ee3d..869ce71 100644
--- a/vortex-log/build/intermediates/incremental/mergeReleaseShaders/merger.xml
+++ b/vanite-log/build/intermediates/incremental/mergeReleaseShaders/merger.xml
@@ -1,2 +1,2 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/vortex-log/build/intermediates/incremental/packageReleaseAssets/merger.xml b/vanite-log/build/intermediates/incremental/packageReleaseAssets/merger.xml
similarity index 62%
rename from vortex-log/build/intermediates/incremental/packageReleaseAssets/merger.xml
rename to vanite-log/build/intermediates/incremental/packageReleaseAssets/merger.xml
index c4434e6..f5abfec 100644
--- a/vortex-log/build/intermediates/incremental/packageReleaseAssets/merger.xml
+++ b/vanite-log/build/intermediates/incremental/packageReleaseAssets/merger.xml
@@ -1,2 +1,2 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/vanite-log/build/intermediates/incremental/packageReleaseResources/compile-file-map.properties b/vanite-log/build/intermediates/incremental/packageReleaseResources/compile-file-map.properties
new file mode 100644
index 0000000..5fc152c
--- /dev/null
+++ b/vanite-log/build/intermediates/incremental/packageReleaseResources/compile-file-map.properties
@@ -0,0 +1 @@
+#Thu Mar 10 17:20:07 PST 2022
diff --git a/vortex-log/build/intermediates/incremental/packageReleaseResources/merger.xml b/vanite-log/build/intermediates/incremental/packageReleaseResources/merger.xml
similarity index 64%
rename from vortex-log/build/intermediates/incremental/packageReleaseResources/merger.xml
rename to vanite-log/build/intermediates/incremental/packageReleaseResources/merger.xml
index 3942192..d87e1e8 100644
--- a/vortex-log/build/intermediates/incremental/packageReleaseResources/merger.xml
+++ b/vanite-log/build/intermediates/incremental/packageReleaseResources/merger.xml
@@ -1,2 +1,2 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/vortex-log/build/intermediates/incremental/release-mergeJavaRes/merge-state b/vanite-log/build/intermediates/incremental/release-mergeJavaRes/merge-state
similarity index 83%
rename from vortex-log/build/intermediates/incremental/release-mergeJavaRes/merge-state
rename to vanite-log/build/intermediates/incremental/release-mergeJavaRes/merge-state
index 0c7941e..873ddcd 100644
Binary files a/vortex-log/build/intermediates/incremental/release-mergeJavaRes/merge-state and b/vanite-log/build/intermediates/incremental/release-mergeJavaRes/merge-state differ
diff --git a/vortex-log/build/intermediates/javac/release/classes/io/vortex/android/state/BuildConfig.class b/vanite-log/build/intermediates/javac/release/classes/io/vanite/android/state/BuildConfig.class
similarity index 61%
rename from vortex-log/build/intermediates/javac/release/classes/io/vortex/android/state/BuildConfig.class
rename to vanite-log/build/intermediates/javac/release/classes/io/vanite/android/state/BuildConfig.class
index 2b7b9e7..262a265 100644
Binary files a/vortex-log/build/intermediates/javac/release/classes/io/vortex/android/state/BuildConfig.class and b/vanite-log/build/intermediates/javac/release/classes/io/vanite/android/state/BuildConfig.class differ
diff --git a/vortex-log/build/intermediates/local_only_symbol_list/release/R-def.txt b/vanite-log/build/intermediates/local_only_symbol_list/release/R-def.txt
similarity index 100%
rename from vortex-log/build/intermediates/local_only_symbol_list/release/R-def.txt
rename to vanite-log/build/intermediates/local_only_symbol_list/release/R-def.txt
diff --git a/vortex-log/build/intermediates/manifest_merge_blame_file/release/manifest-merger-blame-release-report.txt b/vanite-log/build/intermediates/manifest_merge_blame_file/release/manifest-merger-blame-release-report.txt
similarity index 59%
rename from vortex-log/build/intermediates/manifest_merge_blame_file/release/manifest-merger-blame-release-report.txt
rename to vanite-log/build/intermediates/manifest_merge_blame_file/release/manifest-merger-blame-release-report.txt
index 34c1ce4..eb3186f 100644
--- a/vortex-log/build/intermediates/manifest_merge_blame_file/release/manifest-merger-blame-release-report.txt
+++ b/vanite-log/build/intermediates/manifest_merge_blame_file/release/manifest-merger-blame-release-report.txt
@@ -1,11 +1,11 @@
1
2
+3 package="io.vanite.android.state" >
4
5 D:\Vortex\vortex-log\src\main\AndroidManifest.xml
+6-->D:\Vortex\vanite-log\src\main\AndroidManifest.xml
7 android:targetSdkVersion="31" />
-7-->D:\Vortex\vortex-log\src\main\AndroidManifest.xml
+7-->D:\Vortex\vanite-log\src\main\AndroidManifest.xml
8
9
diff --git a/vanite-log/build/intermediates/merged_java_res/release/feature-vanite-log.jar b/vanite-log/build/intermediates/merged_java_res/release/feature-vanite-log.jar
new file mode 100644
index 0000000..5fb3289
Binary files /dev/null and b/vanite-log/build/intermediates/merged_java_res/release/feature-vanite-log.jar differ
diff --git a/vortex-log/build/intermediates/aapt_friendly_merged_manifests/release/aapt/AndroidManifest.xml b/vanite-log/build/intermediates/merged_manifest/release/AndroidManifest.xml
similarity index 84%
rename from vortex-log/build/intermediates/aapt_friendly_merged_manifests/release/aapt/AndroidManifest.xml
rename to vanite-log/build/intermediates/merged_manifest/release/AndroidManifest.xml
index 2df5b65..9954e62 100644
--- a/vortex-log/build/intermediates/aapt_friendly_merged_manifests/release/aapt/AndroidManifest.xml
+++ b/vanite-log/build/intermediates/merged_manifest/release/AndroidManifest.xml
@@ -1,6 +1,6 @@
+ package="io.vanite.android.state" >
4.0.0
com.yazantarifi
- vortex-log
- 2.3.1
+ vanite-log
+ 1.0.0
aar
- vortex-log
- Shake Reporting To Report Android Crashes, Application Requests
- https://github.com/Yazan98/Vortex
+ vanite-log
+ Application Structure, Base Code, Configuration, Utility Classes to Build Android Applications
+ https://github.com/Yazan98/Vanite
MIT
- https://github.com/Yazan98/Vortex/blob/main/LICENSE
+ https://github.com/Yazan98/Vanite/blob/main/LICENSE
@@ -28,9 +28,9 @@
- scm:git:github.com/Yazan98/Vortex.git
- scm:git:ssh://github.com/Yazan98/Vortex.git
- https://github.com/Yazan98/Vortex/tree/master
+ scm:git:github.com/Yazan98/Vanite.git
+ scm:git:ssh://github.com/Yazan98/Vanite.git
+ https://github.com/Yazan98/Vanite/tree/master
@@ -83,8 +83,8 @@
com.yazantarifi
- vortex
- 2.3.1
+ vanite
+ 1.0.0
runtime
diff --git a/vanite-log/build/publications/release/pom-default.xml.asc b/vanite-log/build/publications/release/pom-default.xml.asc
new file mode 100644
index 0000000..3276a3f
--- /dev/null
+++ b/vanite-log/build/publications/release/pom-default.xml.asc
@@ -0,0 +1,17 @@
+-----BEGIN PGP SIGNATURE-----
+Version: BCPG v1.68
+
+iQIcBAABCgAGBQJiKqPoAAoJEB1ITFGDIuUZI/gQAJ9krwoN/01EzA3IlJvL+Wwl
+15rIYe8NEcHIWKpcD9SCLOMvbkdTVgTNr0iglnROxBvHC+VC2vAmZO5fCqZBVHOw
+ZLdfgH+erjz3iRedmG55IBZgBPYA6pZ6x8si+02HK4enlBu0p0doD1fnbUaWtNh3
+oc8OLJVAau8zY1fVp1Zvx1Z688O81LqX0jh1P6kgjQBnpH9Dtx+uKku+XAwOosea
+VOtvndpCqo0byu8vU2YKidBMUUT/kkQCaVtSg+ZJ81LeETHusAeB0ljsH083KVoe
+YIuPUkSz8oxMejUgF+UMTwomqilcOGU5snCsKerJwQTEOZVHNglLiNft1V8dtcl5
+ZtYKo3f+wqJRahNbgxrPtIcHUhbv8nzQQyokCTMAzBkFqeTTB4OBJJ5ZxMr093x6
+c1wAsaNyCyXQr6+u9jyCsRuUKvLl4dlrZK0otliXXntssRIMgicBEiB4BwqYjuKZ
+oDv2+fhIjY8YAJDlB+VZxObMhL0pq++xtuBAI9eA8yWQTghHJqEo7s4IOgt1pXkN
+ImMNS1B/WlxYwG0CSdIDd9apTNLO86aw9x2Nc7hqPHA8iUo75Tb2bIwk1mlNz/97
+uuSbMYLm/rXB5c1BDxZRtYtXGb70UDmfuh8s0tGkL8VCkEKsxgqx8nWXF+PH3Ls0
+FOlaDw08HDx1emogiYA6
+=VAo1
+-----END PGP SIGNATURE-----
diff --git a/vortex-dependencies-plugin/build/tmp/jar/MANIFEST.MF b/vanite-log/build/tmp/androidSourcesJar/MANIFEST.MF
similarity index 100%
rename from vortex-dependencies-plugin/build/tmp/jar/MANIFEST.MF
rename to vanite-log/build/tmp/androidSourcesJar/MANIFEST.MF
diff --git a/vortex-log/build/tmp/compileReleaseJavaWithJavac/previous-compilation-data.bin b/vanite-log/build/tmp/compileReleaseJavaWithJavac/previous-compilation-data.bin
similarity index 98%
rename from vortex-log/build/tmp/compileReleaseJavaWithJavac/previous-compilation-data.bin
rename to vanite-log/build/tmp/compileReleaseJavaWithJavac/previous-compilation-data.bin
index 8062795..c08aa92 100644
Binary files a/vortex-log/build/tmp/compileReleaseJavaWithJavac/previous-compilation-data.bin and b/vanite-log/build/tmp/compileReleaseJavaWithJavac/previous-compilation-data.bin differ
diff --git a/vortex-log/build/tmp/kotlin-classes/release/META-INF/vortex-log_release.kotlin_module b/vanite-log/build/tmp/kotlin-classes/release/META-INF/vanite-log_release.kotlin_module
similarity index 100%
rename from vortex-log/build/tmp/kotlin-classes/release/META-INF/vortex-log_release.kotlin_module
rename to vanite-log/build/tmp/kotlin-classes/release/META-INF/vanite-log_release.kotlin_module
diff --git a/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/VaniteLog$WhenMappings.class b/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/VaniteLog$WhenMappings.class
new file mode 100644
index 0000000..f5639cf
Binary files /dev/null and b/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/VaniteLog$WhenMappings.class differ
diff --git a/vortex-log/build/tmp/kotlin-classes/release/io/vortex/android/logger/VortexLog$print$1.class b/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/VaniteLog$print$1.class
similarity index 70%
rename from vortex-log/build/tmp/kotlin-classes/release/io/vortex/android/logger/VortexLog$print$1.class
rename to vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/VaniteLog$print$1.class
index 61b1e74..8f21346 100644
Binary files a/vortex-log/build/tmp/kotlin-classes/release/io/vortex/android/logger/VortexLog$print$1.class and b/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/VaniteLog$print$1.class differ
diff --git a/vortex-log/build/tmp/kotlin-classes/release/io/vortex/android/logger/VortexLog$printLevel$1.class b/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/VaniteLog$printLevel$1.class
similarity index 70%
rename from vortex-log/build/tmp/kotlin-classes/release/io/vortex/android/logger/VortexLog$printLevel$1.class
rename to vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/VaniteLog$printLevel$1.class
index 7e6c3df..7fd6099 100644
Binary files a/vortex-log/build/tmp/kotlin-classes/release/io/vortex/android/logger/VortexLog$printLevel$1.class and b/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/VaniteLog$printLevel$1.class differ
diff --git a/vortex-log/build/tmp/kotlin-classes/release/io/vortex/android/logger/VortexLog.class b/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/VaniteLog.class
similarity index 77%
rename from vortex-log/build/tmp/kotlin-classes/release/io/vortex/android/logger/VortexLog.class
rename to vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/VaniteLog.class
index 0778a07..76a63b7 100644
Binary files a/vortex-log/build/tmp/kotlin-classes/release/io/vortex/android/logger/VortexLog.class and b/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/VaniteLog.class differ
diff --git a/vortex-log/build/tmp/kotlin-classes/release/io/vortex/android/logger/VortexLoggerInitException.class b/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/VaniteLoggerInitException.class
similarity index 68%
rename from vortex-log/build/tmp/kotlin-classes/release/io/vortex/android/logger/VortexLoggerInitException.class
rename to vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/VaniteLoggerInitException.class
index 72205d5..4988c24 100644
Binary files a/vortex-log/build/tmp/kotlin-classes/release/io/vortex/android/logger/VortexLoggerInitException.class and b/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/VaniteLoggerInitException.class differ
diff --git a/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/VaniteLoggerTesting.class b/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/VaniteLoggerTesting.class
new file mode 100644
index 0000000..9a5eb0f
Binary files /dev/null and b/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/VaniteLoggerTesting.class differ
diff --git a/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/config/VaniteBaseOptionsInitializer.class b/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/config/VaniteBaseOptionsInitializer.class
new file mode 100644
index 0000000..051cd8c
Binary files /dev/null and b/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/config/VaniteBaseOptionsInitializer.class differ
diff --git a/vortex-log/build/tmp/kotlin-classes/release/io/vortex/android/logger/config/VortexLoggerConfiguration.class b/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/config/VaniteLoggerConfiguration.class
similarity index 57%
rename from vortex-log/build/tmp/kotlin-classes/release/io/vortex/android/logger/config/VortexLoggerConfiguration.class
rename to vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/config/VaniteLoggerConfiguration.class
index b21adb1..79e636d 100644
Binary files a/vortex-log/build/tmp/kotlin-classes/release/io/vortex/android/logger/config/VortexLoggerConfiguration.class and b/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/config/VaniteLoggerConfiguration.class differ
diff --git a/vortex-log/build/tmp/kotlin-classes/release/io/vortex/android/logger/config/VortexLoggerDefaultOptions$Companion.class b/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/config/VaniteLoggerDefaultOptions$Companion.class
similarity index 51%
rename from vortex-log/build/tmp/kotlin-classes/release/io/vortex/android/logger/config/VortexLoggerDefaultOptions$Companion.class
rename to vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/config/VaniteLoggerDefaultOptions$Companion.class
index f24e333..6cfe94a 100644
Binary files a/vortex-log/build/tmp/kotlin-classes/release/io/vortex/android/logger/config/VortexLoggerDefaultOptions$Companion.class and b/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/config/VaniteLoggerDefaultOptions$Companion.class differ
diff --git a/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/config/VaniteLoggerDefaultOptions.class b/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/config/VaniteLoggerDefaultOptions.class
new file mode 100644
index 0000000..75a4349
Binary files /dev/null and b/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/config/VaniteLoggerDefaultOptions.class differ
diff --git a/vortex-log/build/tmp/kotlin-classes/release/io/vortex/android/logger/config/VortexLoggerOptions$Companion.class b/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/config/VaniteLoggerOptions$Companion.class
similarity index 50%
rename from vortex-log/build/tmp/kotlin-classes/release/io/vortex/android/logger/config/VortexLoggerOptions$Companion.class
rename to vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/config/VaniteLoggerOptions$Companion.class
index 0df3670..02a27d7 100644
Binary files a/vortex-log/build/tmp/kotlin-classes/release/io/vortex/android/logger/config/VortexLoggerOptions$Companion.class and b/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/config/VaniteLoggerOptions$Companion.class differ
diff --git a/vortex-log/build/tmp/kotlin-classes/release/io/vortex/android/logger/config/VortexLoggerOptions.class b/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/config/VaniteLoggerOptions.class
similarity index 60%
rename from vortex-log/build/tmp/kotlin-classes/release/io/vortex/android/logger/config/VortexLoggerOptions.class
rename to vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/config/VaniteLoggerOptions.class
index 624a2bd..7477f6c 100644
Binary files a/vortex-log/build/tmp/kotlin-classes/release/io/vortex/android/logger/config/VortexLoggerOptions.class and b/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/config/VaniteLoggerOptions.class differ
diff --git a/vortex-log/build/tmp/kotlin-classes/release/io/vortex/android/logger/keys/VortexLoggerLevel.class b/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/keys/VaniteLoggerLevel.class
similarity index 61%
rename from vortex-log/build/tmp/kotlin-classes/release/io/vortex/android/logger/keys/VortexLoggerLevel.class
rename to vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/keys/VaniteLoggerLevel.class
index f53acea..2adb094 100644
Binary files a/vortex-log/build/tmp/kotlin-classes/release/io/vortex/android/logger/keys/VortexLoggerLevel.class and b/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/keys/VaniteLoggerLevel.class differ
diff --git a/vortex-log/build/tmp/kotlin-classes/release/io/vortex/android/logger/keys/VortexLoggerMode.class b/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/keys/VaniteLoggerMode.class
similarity index 69%
rename from vortex-log/build/tmp/kotlin-classes/release/io/vortex/android/logger/keys/VortexLoggerMode.class
rename to vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/keys/VaniteLoggerMode.class
index 31f92fa..4762842 100644
Binary files a/vortex-log/build/tmp/kotlin-classes/release/io/vortex/android/logger/keys/VortexLoggerMode.class and b/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/keys/VaniteLoggerMode.class differ
diff --git a/vortex-log/build/tmp/kotlin-classes/release/io/vortex/android/logger/keys/VortexLoggingStatus.class b/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/keys/VaniteLoggingStatus.class
similarity index 60%
rename from vortex-log/build/tmp/kotlin-classes/release/io/vortex/android/logger/keys/VortexLoggingStatus.class
rename to vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/keys/VaniteLoggingStatus.class
index d239c77..61e229d 100644
Binary files a/vortex-log/build/tmp/kotlin-classes/release/io/vortex/android/logger/keys/VortexLoggingStatus.class and b/vanite-log/build/tmp/kotlin-classes/release/io/vanite/android/logger/keys/VaniteLoggingStatus.class differ
diff --git a/vanite-log/build/tmp/publishReleasePublicationToSonatypeRepository/module-maven-metadata.xml b/vanite-log/build/tmp/publishReleasePublicationToSonatypeRepository/module-maven-metadata.xml
new file mode 100644
index 0000000..7f3278f
--- /dev/null
+++ b/vanite-log/build/tmp/publishReleasePublicationToSonatypeRepository/module-maven-metadata.xml
@@ -0,0 +1,13 @@
+
+
+ com.yazantarifi
+ vanite-log
+
+ 1.0.0
+ 1.0.0
+
+ 1.0.0
+
+ 20220311012047
+
+
diff --git a/vortex-log/consumer-rules.pro b/vanite-log/consumer-rules.pro
similarity index 100%
rename from vortex-log/consumer-rules.pro
rename to vanite-log/consumer-rules.pro
diff --git a/vortex-log/proguard-rules.pro b/vanite-log/proguard-rules.pro
similarity index 100%
rename from vortex-log/proguard-rules.pro
rename to vanite-log/proguard-rules.pro
diff --git a/vortex-log/src/main/AndroidManifest.xml b/vanite-log/src/main/AndroidManifest.xml
similarity index 62%
rename from vortex-log/src/main/AndroidManifest.xml
rename to vanite-log/src/main/AndroidManifest.xml
index e43cdcb..a242afb 100644
--- a/vortex-log/src/main/AndroidManifest.xml
+++ b/vanite-log/src/main/AndroidManifest.xml
@@ -1,2 +1,2 @@
+ package="io.vanite.android.state" />
diff --git a/vortex-log/src/main/java/io/vortex/android/logger/VortexLog.kt b/vanite-log/src/main/java/io/vanite/android/logger/VaniteLog.kt
similarity index 50%
rename from vortex-log/src/main/java/io/vortex/android/logger/VortexLog.kt
rename to vanite-log/src/main/java/io/vanite/android/logger/VaniteLog.kt
index af4fccf..29d8b5b 100644
--- a/vortex-log/src/main/java/io/vortex/android/logger/VortexLog.kt
+++ b/vanite-log/src/main/java/io/vanite/android/logger/VaniteLog.kt
@@ -1,39 +1,39 @@
-package io.vortex.android.logger
+package io.vanite.android.logger
import android.util.Log
-import io.vortex.android.logger.config.VortexLoggerConfiguration
-import io.vortex.android.logger.keys.VortexLoggerLevel
-import io.vortex.android.logger.keys.VortexLoggerMode
-import io.vortex.android.logger.keys.VortexLoggingStatus
+import io.vanite.android.logger.config.VaniteLoggerConfiguration
+import io.vanite.android.logger.keys.VaniteLoggerLevel
+import io.vanite.android.logger.keys.VaniteLoggerMode
+import io.vanite.android.logger.keys.VaniteLoggingStatus
/**
- * This is The Main Class For Vortex Logger To Log The Android Messages
+ * This is The Main Class For Vanite Logger To Log The Android Messages
* Short Example :
*
- * VortexLog.print("Your Message Here") {
- VortexLog prePost VortexLoggerMode.DASH
- VortexLog currentTag "Crate Account Request"
- VortexLog repeat 100
+ * VaniteLog.print("Your Message Here") {
+ VaniteLog prePost VaniteLoggerMode.DASH
+ VaniteLog currentTag "Crate Account Request"
+ VaniteLog repeat 100
}
Another Example About Custom Logging Levels For Debug, Error , Warning
- VortexLog.printLevel("The Error Message") {
- VortexLog attachLevel VortexLoggerLevel.ERROR
- VortexLog prePost VortexLoggerMode.EQUAL
- VortexLog repeat 50
+VaniteLog.printLevel("The Error Message") {
+ VaniteLog attachLevel VaniteLoggerLevel.ERROR
+ VaniteLog prePost VaniteLoggerMode.EQUAL
+ VaniteLog repeat 50
}
*/
-object VortexLog {
+object VaniteLog {
- @PublishedApi internal var defaultPreMode: VortexLoggerMode = VortexLoggerConfiguration.getLoggingConfiguration().getDefaultPreMode()
- @PublishedApi internal var defaultPostMode: VortexLoggerMode = VortexLoggerConfiguration.getLoggingConfiguration().getDefaultPostMode()
- @PublishedApi internal var parentTag: String = VortexLoggerConfiguration.getLoggingConfiguration().getGlobalTag()
- @PublishedApi internal var defaultLevel: VortexLoggerLevel = VortexLoggerConfiguration.getLoggingConfiguration().getDefaultLevel()
+ @PublishedApi internal var defaultPreMode: VaniteLoggerMode = VaniteLoggerConfiguration.getLoggingConfiguration().getDefaultPreMode()
+ @PublishedApi internal var defaultPostMode: VaniteLoggerMode = VaniteLoggerConfiguration.getLoggingConfiguration().getDefaultPostMode()
+ @PublishedApi internal var parentTag: String = VaniteLoggerConfiguration.getLoggingConfiguration().getGlobalTag()
+ @PublishedApi internal var defaultLevel: VaniteLoggerLevel = VaniteLoggerConfiguration.getLoggingConfiguration().getDefaultLevel()
@PublishedApi internal var repeatTime: Int = 50
inline fun print(message: String, body: () -> Unit = {}) {
- if (VortexLoggerConfiguration.getLoggingConfiguration().getLoggingStatus() == VortexLoggingStatus.ENABLED) {
+ if (VaniteLoggerConfiguration.getLoggingConfiguration().getLoggingStatus() == VaniteLoggingStatus.ENABLED) {
body()
this printPreMode defaultPreMode
Log.d(parentTag, message)
@@ -43,7 +43,7 @@ object VortexLog {
}
inline fun printLevel(message: String, body: () -> Unit = {}) {
- if (VortexLoggerConfiguration.getLoggingConfiguration().getLoggingStatus() == VortexLoggingStatus.ENABLED) {
+ if (VaniteLoggerConfiguration.getLoggingConfiguration().getLoggingStatus() == VaniteLoggingStatus.ENABLED) {
body()
this printPreMode defaultPreMode
printLevelWithMessage(message, defaultLevel)
@@ -52,11 +52,11 @@ object VortexLog {
}
}
- infix fun preMode(mode: VortexLoggerMode) {
+ infix fun preMode(mode: VaniteLoggerMode) {
this.defaultPreMode = mode
}
- infix fun postMode(mode: VortexLoggerMode) {
+ infix fun postMode(mode: VaniteLoggerMode) {
this.defaultPostMode = mode
}
@@ -64,11 +64,11 @@ object VortexLog {
this.parentTag = tag
}
- infix fun attachLevel(level: VortexLoggerLevel) {
+ infix fun attachLevel(level: VaniteLoggerLevel) {
this.defaultLevel = level
}
- infix fun prePost(mode: VortexLoggerMode) {
+ infix fun prePost(mode: VaniteLoggerMode) {
this.defaultPreMode = mode
this.defaultPostMode = mode
}
@@ -77,50 +77,50 @@ object VortexLog {
repeatTime = count
}
- @PublishedApi internal fun printLevelWithMessage(message: String, mode: VortexLoggerLevel) {
+ @PublishedApi internal fun printLevelWithMessage(message: String, mode: VaniteLoggerLevel) {
when (mode) {
- VortexLoggerLevel.DEBUG -> Log.d(parentTag, message)
- VortexLoggerLevel.ERROR -> Log.e(parentTag, message)
- VortexLoggerLevel.WARNING -> Log.w(parentTag, message)
+ VaniteLoggerLevel.DEBUG -> Log.d(parentTag, message)
+ VaniteLoggerLevel.ERROR -> Log.e(parentTag, message)
+ VaniteLoggerLevel.WARNING -> Log.w(parentTag, message)
}
}
- @PublishedApi internal infix fun printPreMode(mode: VortexLoggerMode) {
+ @PublishedApi internal infix fun printPreMode(mode: VaniteLoggerMode) {
when (mode) {
- VortexLoggerMode.DASH -> {
+ VaniteLoggerMode.DASH -> {
for (i in 0..repeatTime) { print("-") }
println()
}
- VortexLoggerMode.EQUAL -> {
+ VaniteLoggerMode.EQUAL -> {
for (i in 0..repeatTime) { print("=") }
println()
}
- VortexLoggerMode.SLASH -> {
+ VaniteLoggerMode.SLASH -> {
for (i in 0..repeatTime) { print("/") }
println()
}
- VortexLoggerMode.STAR -> {
+ VaniteLoggerMode.STAR -> {
for (i in 0..repeatTime) { print("*") }
println()
}
}
}
- @PublishedApi internal infix fun printPostMode(mode: VortexLoggerMode) {
+ @PublishedApi internal infix fun printPostMode(mode: VaniteLoggerMode) {
when (mode) {
- VortexLoggerMode.DASH -> {
+ VaniteLoggerMode.DASH -> {
for (i in 0..repeatTime) { print("-") }
println()
}
- VortexLoggerMode.EQUAL -> {
+ VaniteLoggerMode.EQUAL -> {
for (i in 0..repeatTime) { print("=") }
println()
}
- VortexLoggerMode.SLASH -> {
+ VaniteLoggerMode.SLASH -> {
for (i in 0..repeatTime) { print("/") }
println()
}
- VortexLoggerMode.STAR -> {
+ VaniteLoggerMode.STAR -> {
for (i in 0..repeatTime) { print("*") }
println()
}
@@ -129,9 +129,9 @@ object VortexLog {
@PublishedApi internal infix fun resetOptionsAfterLog(resetMode: Boolean) {
if (resetMode) {
- defaultPreMode = VortexLoggerConfiguration.getLoggingConfiguration().getDefaultPreMode()
- defaultPostMode = VortexLoggerConfiguration.getLoggingConfiguration().getDefaultPostMode()
- parentTag = VortexLoggerConfiguration.getLoggingConfiguration().getGlobalTag()
+ defaultPreMode = VaniteLoggerConfiguration.getLoggingConfiguration().getDefaultPreMode()
+ defaultPostMode = VaniteLoggerConfiguration.getLoggingConfiguration().getDefaultPostMode()
+ parentTag = VaniteLoggerConfiguration.getLoggingConfiguration().getGlobalTag()
repeatTime = 50
}
}
diff --git a/vortex-log/src/main/java/io/vortex/android/logger/VortexLoggerInitException.kt b/vanite-log/src/main/java/io/vanite/android/logger/VaniteLoggerInitException.kt
similarity index 55%
rename from vortex-log/src/main/java/io/vortex/android/logger/VortexLoggerInitException.kt
rename to vanite-log/src/main/java/io/vanite/android/logger/VaniteLoggerInitException.kt
index 2eafcc8..049b141 100644
--- a/vortex-log/src/main/java/io/vortex/android/logger/VortexLoggerInitException.kt
+++ b/vanite-log/src/main/java/io/vanite/android/logger/VaniteLoggerInitException.kt
@@ -1,14 +1,14 @@
-package io.vortex.android.logger
+package io.vanite.android.logger
import java.lang.RuntimeException
-class VortexLoggerInitException : RuntimeException() {
+class VaniteLoggerInitException : RuntimeException() {
override val message: String?
get() = """
- Vortex Logging Error Intialization
+ Vanite Logging Error Intialization
You Should Init The Logger Configuration Before Log Anything
You Can Init The Logger From Application Class By Call
- VortexLoggerConfiguration.init(VortexLoggerDefaultOptions()) -- For Default Configuration
- VortexLoggerConfiguration.init(VortexLoggerOptions(...)) -- For Custom Configuration
+ VaniteLoggerConfiguration.init(VaniteLoggerDefaultOptions()) -- For Default Configuration
+ VaniteLoggerConfiguration.init(VaniteLoggerOptions(...)) -- For Custom Configuration
""".trimIndent()
}
diff --git a/vanite-log/src/main/java/io/vanite/android/logger/VaniteLoggerTesting.kt b/vanite-log/src/main/java/io/vanite/android/logger/VaniteLoggerTesting.kt
new file mode 100644
index 0000000..81ab856
--- /dev/null
+++ b/vanite-log/src/main/java/io/vanite/android/logger/VaniteLoggerTesting.kt
@@ -0,0 +1,49 @@
+package io.vanite.android.logger
+
+import io.vanite.android.logger.config.VaniteLoggerConfiguration
+import io.vanite.android.logger.config.VaniteLoggerOptions
+import io.vanite.android.logger.keys.VaniteLoggerLevel
+import io.vanite.android.logger.keys.VaniteLoggerMode
+import io.vanite.android.logger.keys.VaniteLoggingStatus
+
+class VaniteLoggerTesting {
+
+ init {
+
+ VaniteLoggerConfiguration.init(
+ VaniteLoggerOptions(
+ globalTag = "My Custom Logging Tag",
+ preMode = VaniteLoggerMode.EQUAL,
+ defaultLevel = VaniteLoggerLevel.DEBUG,
+ loggingStatus = VaniteLoggingStatus.ENABLED,
+ postMode = VaniteLoggerMode.EQUAL
+ )
+ )
+
+ /**
+ * Print pattern
+ * ---------------------------------------- 100 Dash
+ * Create Account Request - Your Message Here
+ * ---------------------------------------- 100 Dash
+ */
+ VaniteLog.print("Your Message Here") {
+ VaniteLog prePost VaniteLoggerMode.DASH
+ VaniteLog currentTag "Crate Account Request"
+ VaniteLog repeat 100
+ }
+
+ /**
+ * Print Error Level With Equals Pattern
+ * ========================================= 50 Equal
+ * Error Level -- Default Tag Or Attached Tag -- The Error Message
+ * ========================================= 50 Equal
+ */
+ VaniteLog.printLevel("The Error Message") {
+ VaniteLog attachLevel VaniteLoggerLevel.ERROR
+ VaniteLog prePost VaniteLoggerMode.EQUAL
+ VaniteLog currentTag "Crate Account Request - OnError"
+ VaniteLog repeat 50
+ }
+ }
+
+}
diff --git a/vanite-log/src/main/java/io/vanite/android/logger/config/VaniteBaseOptionsInitializer.kt b/vanite-log/src/main/java/io/vanite/android/logger/config/VaniteBaseOptionsInitializer.kt
new file mode 100644
index 0000000..cee1424
--- /dev/null
+++ b/vanite-log/src/main/java/io/vanite/android/logger/config/VaniteBaseOptionsInitializer.kt
@@ -0,0 +1,19 @@
+package io.vanite.android.logger.config
+
+import io.vanite.android.logger.keys.VaniteLoggerLevel
+import io.vanite.android.logger.keys.VaniteLoggerMode
+import io.vanite.android.logger.keys.VaniteLoggingStatus
+
+interface VaniteBaseOptionsInitializer {
+
+ fun getGlobalTag(): String
+
+ fun getLoggingStatus(): VaniteLoggingStatus
+
+ fun getDefaultPreMode(): VaniteLoggerMode
+
+ fun getDefaultPostMode(): VaniteLoggerMode
+
+ fun getDefaultLevel(): VaniteLoggerLevel
+
+}
diff --git a/vanite-log/src/main/java/io/vanite/android/logger/config/VaniteLoggerConfiguration.kt b/vanite-log/src/main/java/io/vanite/android/logger/config/VaniteLoggerConfiguration.kt
new file mode 100644
index 0000000..7e81e63
--- /dev/null
+++ b/vanite-log/src/main/java/io/vanite/android/logger/config/VaniteLoggerConfiguration.kt
@@ -0,0 +1,21 @@
+package io.vanite.android.logger.config
+
+import io.vanite.android.logger.VaniteLoggerInitException
+
+object VaniteLoggerConfiguration {
+
+ private lateinit var loggerConfiguration: VaniteBaseOptionsInitializer
+ fun init(options : VaniteBaseOptionsInitializer) {
+ loggerConfiguration = options
+ }
+
+ @Throws(VaniteLoggerInitException::class)
+ fun getLoggingConfiguration(): VaniteBaseOptionsInitializer {
+ return if (::loggerConfiguration.isInitialized) {
+ loggerConfiguration
+ } else {
+ throw VaniteLoggerInitException()
+ }
+ }
+
+}
diff --git a/vanite-log/src/main/java/io/vanite/android/logger/config/VaniteLoggerDefaultOptions.kt b/vanite-log/src/main/java/io/vanite/android/logger/config/VaniteLoggerDefaultOptions.kt
new file mode 100644
index 0000000..4afd756
--- /dev/null
+++ b/vanite-log/src/main/java/io/vanite/android/logger/config/VaniteLoggerDefaultOptions.kt
@@ -0,0 +1,27 @@
+package io.vanite.android.logger.config
+
+import io.vanite.android.logger.keys.VaniteLoggerLevel
+import io.vanite.android.logger.keys.VaniteLoggerMode
+import io.vanite.android.logger.keys.VaniteLoggingStatus
+
+/**
+ * When You Want To Initialize The Vanite Logger Without Write The Configuration
+ * You Can Use This logger Configuration
+ */
+class VaniteLoggerDefaultOptions : VaniteBaseOptionsInitializer {
+
+ companion object {
+ const val VANITE_DEFAULT_TAG = "Vanite Logger"
+ val VANITE_LOGGER_PRE_MODE_DEFAULT = VaniteLoggerMode.DASH
+ val VANITE_LOGGER_POST_MODE_DEFAULT = VaniteLoggerMode.DASH
+ val VANITE_DEFAULT_STATE = VaniteLoggingStatus.ENABLED
+ val VANITE_DEFAULT_LEVEL = VaniteLoggerLevel.DEBUG
+ }
+
+ override fun getGlobalTag(): String = VANITE_DEFAULT_TAG
+ override fun getLoggingStatus(): VaniteLoggingStatus = VANITE_DEFAULT_STATE
+ override fun getDefaultPreMode(): VaniteLoggerMode = VANITE_LOGGER_PRE_MODE_DEFAULT
+ override fun getDefaultPostMode(): VaniteLoggerMode = VANITE_LOGGER_POST_MODE_DEFAULT
+ override fun getDefaultLevel(): VaniteLoggerLevel = VANITE_DEFAULT_LEVEL
+
+}
diff --git a/vanite-log/src/main/java/io/vanite/android/logger/config/VaniteLoggerOptions.kt b/vanite-log/src/main/java/io/vanite/android/logger/config/VaniteLoggerOptions.kt
new file mode 100644
index 0000000..502451d
--- /dev/null
+++ b/vanite-log/src/main/java/io/vanite/android/logger/config/VaniteLoggerOptions.kt
@@ -0,0 +1,32 @@
+package io.vanite.android.logger.config
+
+import io.vanite.android.logger.keys.VaniteLoggerLevel
+import io.vanite.android.logger.keys.VaniteLoggerMode
+import io.vanite.android.logger.keys.VaniteLoggingStatus
+
+/**
+ * You Can Use This Configuration When You Need To Refactor The Default Logging Configuration
+ */
+data class VaniteLoggerOptions(
+ private var globalTag: String = VANITE_DEFAULT_TAG,
+ private var loggingStatus: VaniteLoggingStatus = VANITE_DEFAULT_STATE,
+ private var preMode: VaniteLoggerMode = VANITE_LOGGER_PRE_MODE_DEFAULT,
+ private var postMode: VaniteLoggerMode = VANITE_LOGGER_POST_MODE_DEFAULT,
+ private var defaultLevel: VaniteLoggerLevel = VANITE_DEFAULT_LEVEL
+) : VaniteBaseOptionsInitializer {
+
+ companion object {
+ const val VANITE_DEFAULT_TAG = "Vanite Logger"
+ val VANITE_LOGGER_PRE_MODE_DEFAULT = VaniteLoggerMode.DASH
+ val VANITE_LOGGER_POST_MODE_DEFAULT = VaniteLoggerMode.DASH
+ val VANITE_DEFAULT_STATE = VaniteLoggingStatus.ENABLED
+ val VANITE_DEFAULT_LEVEL = VaniteLoggerLevel.DEBUG
+ }
+
+ override fun getGlobalTag(): String = globalTag
+ override fun getLoggingStatus(): VaniteLoggingStatus = loggingStatus
+ override fun getDefaultPreMode(): VaniteLoggerMode = preMode
+ override fun getDefaultPostMode(): VaniteLoggerMode = postMode
+ override fun getDefaultLevel(): VaniteLoggerLevel = defaultLevel
+
+}
diff --git a/vanite-log/src/main/java/io/vanite/android/logger/keys/VaniteLoggerLevel.kt b/vanite-log/src/main/java/io/vanite/android/logger/keys/VaniteLoggerLevel.kt
new file mode 100644
index 0000000..7801f1b
--- /dev/null
+++ b/vanite-log/src/main/java/io/vanite/android/logger/keys/VaniteLoggerLevel.kt
@@ -0,0 +1,5 @@
+package io.vanite.android.logger.keys
+
+enum class VaniteLoggerLevel {
+ DEBUG, ERROR, WARNING
+}
diff --git a/vanite-log/src/main/java/io/vanite/android/logger/keys/VaniteLoggerMode.kt b/vanite-log/src/main/java/io/vanite/android/logger/keys/VaniteLoggerMode.kt
new file mode 100644
index 0000000..6a0900f
--- /dev/null
+++ b/vanite-log/src/main/java/io/vanite/android/logger/keys/VaniteLoggerMode.kt
@@ -0,0 +1,8 @@
+package io.vanite.android.logger.keys
+
+enum class VaniteLoggerMode(value: String) {
+ DASH("-"),
+ SLASH("/"),
+ STAR("*"),
+ EQUAL("=")
+}
diff --git a/vanite-log/src/main/java/io/vanite/android/logger/keys/VaniteLoggingStatus.kt b/vanite-log/src/main/java/io/vanite/android/logger/keys/VaniteLoggingStatus.kt
new file mode 100644
index 0000000..ad401d5
--- /dev/null
+++ b/vanite-log/src/main/java/io/vanite/android/logger/keys/VaniteLoggingStatus.kt
@@ -0,0 +1,5 @@
+package io.vanite.android.logger.keys
+
+enum class VaniteLoggingStatus {
+ ENABLED, DISABLED
+}
\ No newline at end of file
diff --git a/vortex-permissions/build.gradle b/vanite-permissions/build.gradle
similarity index 89%
rename from vortex-permissions/build.gradle
rename to vanite-permissions/build.gradle
index 981bbaa..e6bb4d6 100644
--- a/vortex-permissions/build.gradle
+++ b/vanite-permissions/build.gradle
@@ -31,7 +31,7 @@ android {
}
ext {
- PUBLISH_ARTIFACT_ID = 'vortex-permissions'
+ PUBLISH_ARTIFACT_ID = 'vanite-permissions'
}
apply from: "${rootProject.projectDir}/scripts/publish-module.gradle"
@@ -43,7 +43,7 @@ dependencies { configuration ->
addCoroutinesLibraries(configuration)
addDefaultAppCompatDependencies(configuration)
- if (!project.name.equals("vortex")) {
- implementation project(":vortex")
+ if (!project.name.equals("vanite")) {
+ implementation project(":vanite")
}
}
\ No newline at end of file
diff --git a/vortex-permissions/consumer-rules.pro b/vanite-permissions/consumer-rules.pro
similarity index 100%
rename from vortex-permissions/consumer-rules.pro
rename to vanite-permissions/consumer-rules.pro
diff --git a/vortex-permissions/proguard-rules.pro b/vanite-permissions/proguard-rules.pro
similarity index 100%
rename from vortex-permissions/proguard-rules.pro
rename to vanite-permissions/proguard-rules.pro
diff --git a/vortex-permissions/src/main/AndroidManifest.xml b/vanite-permissions/src/main/AndroidManifest.xml
similarity index 59%
rename from vortex-permissions/src/main/AndroidManifest.xml
rename to vanite-permissions/src/main/AndroidManifest.xml
index 8ee3471..f0096b0 100644
--- a/vortex-permissions/src/main/AndroidManifest.xml
+++ b/vanite-permissions/src/main/AndroidManifest.xml
@@ -1,2 +1,2 @@
+ package="io.vanite.android.permissions" />
diff --git a/vortex-permissions/src/main/java/io/vortex/android/permissions/Permissions.kt b/vanite-permissions/src/main/java/io/vanite/android/permissions/Permissions.kt
similarity index 90%
rename from vortex-permissions/src/main/java/io/vortex/android/permissions/Permissions.kt
rename to vanite-permissions/src/main/java/io/vanite/android/permissions/Permissions.kt
index 6cd29db..617dcaf 100644
--- a/vortex-permissions/src/main/java/io/vortex/android/permissions/Permissions.kt
+++ b/vanite-permissions/src/main/java/io/vanite/android/permissions/Permissions.kt
@@ -1,6 +1,5 @@
-package io.vortex.android.permissions
+package io.vanite.android.permissions
-import android.content.Context
import androidx.fragment.app.FragmentActivity
/**
diff --git a/vortex-permissions/src/main/java/io/vortex/android/permissions/VortexPermissionCallback.kt b/vanite-permissions/src/main/java/io/vanite/android/permissions/VanitePermissionCallback.kt
similarity index 76%
rename from vortex-permissions/src/main/java/io/vortex/android/permissions/VortexPermissionCallback.kt
rename to vanite-permissions/src/main/java/io/vanite/android/permissions/VanitePermissionCallback.kt
index b1e2304..7e90d87 100644
--- a/vortex-permissions/src/main/java/io/vortex/android/permissions/VortexPermissionCallback.kt
+++ b/vanite-permissions/src/main/java/io/vanite/android/permissions/VanitePermissionCallback.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.permissions
+package io.vanite.android.permissions
/**
* Created By : Yazan Tarifi
@@ -6,7 +6,7 @@ package io.vortex.android.permissions
* Time : 2:28 PM
*/
-interface VortexPermissionCallback {
+interface VanitePermissionCallback {
suspend fun onPermissionGenerated(requestCode: Int , permissions: List)
diff --git a/vortex-permissions/src/main/java/io/vortex/android/permissions/VortexPermissions.kt b/vanite-permissions/src/main/java/io/vanite/android/permissions/VanitePermissions.kt
similarity index 85%
rename from vortex-permissions/src/main/java/io/vortex/android/permissions/VortexPermissions.kt
rename to vanite-permissions/src/main/java/io/vanite/android/permissions/VanitePermissions.kt
index 9993a6c..f17e01b 100644
--- a/vortex-permissions/src/main/java/io/vortex/android/permissions/VortexPermissions.kt
+++ b/vanite-permissions/src/main/java/io/vanite/android/permissions/VanitePermissions.kt
@@ -1,7 +1,6 @@
-package io.vortex.android.permissions
+package io.vanite.android.permissions
import android.app.Activity
-import android.content.Context
import android.content.pm.PackageManager
import androidx.core.app.ActivityCompat
import androidx.core.content.ContextCompat
@@ -15,15 +14,15 @@ import kotlinx.coroutines.withContext
* Time : 6:49 PM
*/
-class VortexPermissions : Permissions {
+class VanitePermissions : Permissions {
private var requestCode: Int = 0
- private var permissionCallback: VortexPermissionCallback? = null
+ private var permissionCallback: VanitePermissionCallback? = null
override suspend fun isPermissionGenerated(permission: String): Boolean {
return withContext(Dispatchers.IO) {
ContextCompat.checkSelfPermission(
- VortexPermissionsConfiguration.getContext(),
+ VanitePermissionsConfiguration.getContext(),
permission
) != PackageManager.PERMISSION_GRANTED
}
@@ -34,7 +33,7 @@ class VortexPermissions : Permissions {
withContext(Dispatchers.IO) {
permissions.forEach {
result = ContextCompat.checkSelfPermission(
- VortexPermissionsConfiguration.getContext(),
+ VanitePermissionsConfiguration.getContext(),
it
) != PackageManager.PERMISSION_GRANTED
}
@@ -46,7 +45,7 @@ class VortexPermissions : Permissions {
this.requestCode = requestCode
withContext(Dispatchers.Main) {
ActivityCompat.requestPermissions(
- VortexPermissionsConfiguration.getContext() as Activity,
+ VanitePermissionsConfiguration.getContext() as Activity,
arrayOf(permission),
requestCode
)
@@ -57,7 +56,7 @@ class VortexPermissions : Permissions {
this.requestCode = requestCode
withContext(Dispatchers.Main) {
ActivityCompat.requestPermissions(
- VortexPermissionsConfiguration.getContext() as Activity,
+ VanitePermissionsConfiguration.getContext() as Activity,
permissions,
requestCode
)
@@ -86,15 +85,15 @@ class VortexPermissions : Permissions {
}
}
- suspend fun registerPermissionCallback(permissionCallback: VortexPermissionCallback?) {
+ suspend fun registerPermissionCallback(permissionCallback: VanitePermissionCallback?) {
withContext(Dispatchers.IO) {
- this@VortexPermissions.permissionCallback = permissionCallback
+ this@VanitePermissions.permissionCallback = permissionCallback
}
}
suspend fun unRegisterPermissionCallback() {
withContext(Dispatchers.IO) {
- this@VortexPermissions.permissionCallback = null
+ this@VanitePermissions.permissionCallback = null
}
}
diff --git a/vortex-permissions/src/main/java/io/vortex/android/permissions/VortexPermissionsConfiguration.kt b/vanite-permissions/src/main/java/io/vanite/android/permissions/VanitePermissionsConfiguration.kt
similarity index 52%
rename from vortex-permissions/src/main/java/io/vortex/android/permissions/VortexPermissionsConfiguration.kt
rename to vanite-permissions/src/main/java/io/vanite/android/permissions/VanitePermissionsConfiguration.kt
index 2af9074..2c0d2bd 100644
--- a/vortex-permissions/src/main/java/io/vortex/android/permissions/VortexPermissionsConfiguration.kt
+++ b/vanite-permissions/src/main/java/io/vanite/android/permissions/VanitePermissionsConfiguration.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.permissions
+package io.vanite.android.permissions
import android.app.Application
import android.content.Context
@@ -9,16 +9,16 @@ import android.content.Context
* Time : 6:57 PM
*/
-object VortexPermissionsConfiguration {
+object VanitePermissionsConfiguration {
- private lateinit var vortexApplication: Application
+ private lateinit var vaniteApplication: Application
fun attachApplication(app: Application) {
- vortexApplication = app
+ vaniteApplication = app
}
fun getContext(): Context {
- return vortexApplication.applicationContext
+ return vaniteApplication.applicationContext
}
}
diff --git a/vortex-prefs/build.gradle b/vanite-prefs/build.gradle
similarity index 89%
rename from vortex-prefs/build.gradle
rename to vanite-prefs/build.gradle
index 7b763c3..b76e1e0 100644
--- a/vortex-prefs/build.gradle
+++ b/vanite-prefs/build.gradle
@@ -31,7 +31,7 @@ android {
}
ext {
- PUBLISH_ARTIFACT_ID = 'vortex-prefs'
+ PUBLISH_ARTIFACT_ID = 'vanite-prefs'
}
apply from: "${rootProject.projectDir}/scripts/publish-module.gradle"
@@ -43,7 +43,7 @@ dependencies { configuration ->
addCoroutinesLibraries(configuration)
addDefaultAppCompatDependencies(configuration)
- if (!project.name.equals("vortex")) {
- implementation project(":vortex")
+ if (!project.name.equals("vanite")) {
+ implementation project(":vanite")
}
}
\ No newline at end of file
diff --git a/vortex-prefs/consumer-rules.pro b/vanite-prefs/consumer-rules.pro
similarity index 100%
rename from vortex-prefs/consumer-rules.pro
rename to vanite-prefs/consumer-rules.pro
diff --git a/vortex-prefs/proguard-rules.pro b/vanite-prefs/proguard-rules.pro
similarity index 100%
rename from vortex-prefs/proguard-rules.pro
rename to vanite-prefs/proguard-rules.pro
diff --git a/vortex-prefs/src/main/AndroidManifest.xml b/vanite-prefs/src/main/AndroidManifest.xml
similarity index 62%
rename from vortex-prefs/src/main/AndroidManifest.xml
rename to vanite-prefs/src/main/AndroidManifest.xml
index 6576804..4282e02 100644
--- a/vortex-prefs/src/main/AndroidManifest.xml
+++ b/vanite-prefs/src/main/AndroidManifest.xml
@@ -1,2 +1,2 @@
+ package="io.vanite.android.prefs" />
diff --git a/vortex-prefs/src/main/java/io/vortex/android/prefs/VortexPrefs.kt b/vanite-prefs/src/main/java/io/vanite/android/prefs/VanitePrefs.kt
similarity index 66%
rename from vortex-prefs/src/main/java/io/vortex/android/prefs/VortexPrefs.kt
rename to vanite-prefs/src/main/java/io/vanite/android/prefs/VanitePrefs.kt
index ebf9c16..1617fa4 100644
--- a/vortex-prefs/src/main/java/io/vortex/android/prefs/VortexPrefs.kt
+++ b/vanite-prefs/src/main/java/io/vanite/android/prefs/VanitePrefs.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.prefs
+package io.vanite.android.prefs
import android.content.SharedPreferences
import kotlinx.coroutines.Dispatchers
@@ -10,10 +10,10 @@ import kotlinx.coroutines.withContext
* Time : 2:49 PM
*/
-object VortexPrefs {
+object VanitePrefs {
private val prefsEditor: SharedPreferences.Editor by lazy {
- VortexPrefsConfig.prefs.edit()
+ VanitePrefsConfig.prefs.edit()
}
suspend fun put(key: String, value: Any) {
@@ -34,11 +34,11 @@ object VortexPrefs {
suspend fun get(key: String, defVal: Any): Any? {
return withContext(Dispatchers.IO) {
when (defVal) {
- is String -> VortexPrefsConfig.prefs.getString(key, defVal) as Any
- is Long -> VortexPrefsConfig.prefs.getLong(key, defVal)
- is Float -> VortexPrefsConfig.prefs.getFloat(key, defVal)
- is Boolean -> VortexPrefsConfig.prefs.getBoolean(key, defVal)
- is Int -> VortexPrefsConfig.prefs.getInt(key, defVal)
+ is String -> VanitePrefsConfig.prefs.getString(key, defVal) as Any
+ is Long -> VanitePrefsConfig.prefs.getLong(key, defVal)
+ is Float -> VanitePrefsConfig.prefs.getFloat(key, defVal)
+ is Boolean -> VanitePrefsConfig.prefs.getBoolean(key, defVal)
+ is Int -> VanitePrefsConfig.prefs.getInt(key, defVal)
else -> {
}
}
@@ -60,43 +60,43 @@ object VortexPrefs {
fun getLocalKey(key: String, defVal: Any): Any? {
return when (defVal) {
- is String -> VortexPrefsConfig.prefs.getString(key, defVal) as Any
- is Long -> VortexPrefsConfig.prefs.getLong(key, defVal)
- is Float -> VortexPrefsConfig.prefs.getFloat(key, defVal)
- is Boolean -> VortexPrefsConfig.prefs.getBoolean(key, defVal)
- is Int -> VortexPrefsConfig.prefs.getInt(key, defVal)
+ is String -> VanitePrefsConfig.prefs.getString(key, defVal) as Any
+ is Long -> VanitePrefsConfig.prefs.getLong(key, defVal)
+ is Float -> VanitePrefsConfig.prefs.getFloat(key, defVal)
+ is Boolean -> VanitePrefsConfig.prefs.getBoolean(key, defVal)
+ is Int -> VanitePrefsConfig.prefs.getInt(key, defVal)
else -> {
}
}
}
suspend fun getAccessToken(): String? {
- return get(VortexPrefsConsts.ACCESS_TOKEN_KEY, "") as String
+ return get(VanitePrefsConsts.ACCESS_TOKEN_KEY, "") as String
}
suspend fun saveAccessToken(token: String) {
withContext(Dispatchers.IO) {
- put(VortexPrefsConsts.ACCESS_TOKEN_KEY, token)
+ put(VanitePrefsConsts.ACCESS_TOKEN_KEY, token)
}
}
suspend fun getSelectedLanguage(): String? {
- return get(VortexPrefsConsts.LANGUAGE, "") as String
+ return get(VanitePrefsConsts.LANGUAGE, "") as String
}
suspend fun saveSelectedLanguage(language: String) {
withContext(Dispatchers.IO) {
- put(VortexPrefsConsts.LANGUAGE, language)
+ put(VanitePrefsConsts.LANGUAGE, language)
}
}
suspend fun getUserStatus(): Boolean? {
- return get(VortexPrefsConsts.USER_STATUS, false) as Boolean
+ return get(VanitePrefsConsts.USER_STATUS, false) as Boolean
}
suspend fun saveUserStatus(status: Boolean) {
withContext(Dispatchers.IO) {
- put(VortexPrefsConsts.USER_STATUS, status)
+ put(VanitePrefsConsts.USER_STATUS, status)
}
}
diff --git a/vortex-prefs/src/main/java/io/vortex/android/prefs/VortexPrefsConfig.kt b/vanite-prefs/src/main/java/io/vanite/android/prefs/VanitePrefsConfig.kt
similarity index 71%
rename from vortex-prefs/src/main/java/io/vortex/android/prefs/VortexPrefsConfig.kt
rename to vanite-prefs/src/main/java/io/vanite/android/prefs/VanitePrefsConfig.kt
index f93da83..54fd66c 100644
--- a/vortex-prefs/src/main/java/io/vortex/android/prefs/VortexPrefsConfig.kt
+++ b/vanite-prefs/src/main/java/io/vanite/android/prefs/VanitePrefsConfig.kt
@@ -1,9 +1,7 @@
-package io.vortex.android.prefs
+package io.vanite.android.prefs
import android.content.Context
import android.content.SharedPreferences
-import kotlinx.coroutines.Dispatchers
-import kotlinx.coroutines.withContext
/**
* Created By : Yazan Tarifi
@@ -11,7 +9,7 @@ import kotlinx.coroutines.withContext
* Time : 2:50 PM
*/
-object VortexPrefsConfig {
+object VanitePrefsConfig {
lateinit var prefs: SharedPreferences
diff --git a/vortex-prefs/src/main/java/io/vortex/android/prefs/VortexPrefsConsts.kt b/vanite-prefs/src/main/java/io/vanite/android/prefs/VanitePrefsConsts.kt
similarity index 78%
rename from vortex-prefs/src/main/java/io/vortex/android/prefs/VortexPrefsConsts.kt
rename to vanite-prefs/src/main/java/io/vanite/android/prefs/VanitePrefsConsts.kt
index af3065d..457e309 100644
--- a/vortex-prefs/src/main/java/io/vortex/android/prefs/VortexPrefsConsts.kt
+++ b/vanite-prefs/src/main/java/io/vanite/android/prefs/VanitePrefsConsts.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.prefs
+package io.vanite.android.prefs
/**
* Created By : Yazan Tarifi
@@ -6,7 +6,7 @@ package io.vortex.android.prefs
* Time : 11:10 AM
*/
-object VortexPrefsConsts {
+object VanitePrefsConsts {
const val ACCESS_TOKEN_KEY = "AccessToken"
const val LANGUAGE = "LanguageSelected"
const val USER_STATUS = "UserStatus"
diff --git a/vortex-ui-binding/.gitignore b/vanite-ui-binding/.gitignore
similarity index 100%
rename from vortex-ui-binding/.gitignore
rename to vanite-ui-binding/.gitignore
diff --git a/vortex-ui-binding/build.gradle b/vanite-ui-binding/build.gradle
similarity index 88%
rename from vortex-ui-binding/build.gradle
rename to vanite-ui-binding/build.gradle
index 8e337f5..c05f580 100644
--- a/vortex-ui-binding/build.gradle
+++ b/vanite-ui-binding/build.gradle
@@ -31,7 +31,7 @@ android {
}
ext {
- PUBLISH_ARTIFACT_ID = 'vortex-ui-binding'
+ PUBLISH_ARTIFACT_ID = 'vanite-ui-binding'
}
apply from: "${rootProject.projectDir}/scripts/publish-module.gradle"
@@ -45,14 +45,14 @@ android {
dependencies { configuration ->
implementation 'com.google.android.material:material:1.5.0'
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.5.0-alpha01"
- implementation project(":vortex-ui")
+ implementation project(':vanite-ui')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${rootProject.ext.PluginsVersions.KotlinPluginV}"
addRxJavaLibraries(configuration)
addCoroutinesLibraries(configuration)
addDefaultAppCompatDependencies(configuration)
- if (!project.name.equals("vortex")) {
- implementation project(":vortex")
+ if (!project.name.equals("vanite")) {
+ implementation project(":vanite")
}
}
diff --git a/vortex-ui-binding/consumer-rules.pro b/vanite-ui-binding/consumer-rules.pro
similarity index 100%
rename from vortex-ui-binding/consumer-rules.pro
rename to vanite-ui-binding/consumer-rules.pro
diff --git a/vortex-ui-binding/proguard-rules.pro b/vanite-ui-binding/proguard-rules.pro
similarity index 100%
rename from vortex-ui-binding/proguard-rules.pro
rename to vanite-ui-binding/proguard-rules.pro
diff --git a/vortex-ui-binding/src/main/AndroidManifest.xml b/vanite-ui-binding/src/main/AndroidManifest.xml
similarity index 72%
rename from vortex-ui-binding/src/main/AndroidManifest.xml
rename to vanite-ui-binding/src/main/AndroidManifest.xml
index ba2918c..9495c6e 100644
--- a/vortex-ui-binding/src/main/AndroidManifest.xml
+++ b/vanite-ui-binding/src/main/AndroidManifest.xml
@@ -1,5 +1,5 @@
+ package="com.vanite.android.ui.binding">
\ No newline at end of file
diff --git a/vortex-ui-binding/src/main/java/com/vortex/android/ui/binding/VortexViewBindingFragment.kt b/vanite-ui-binding/src/main/java/com/vanite/android/ui/binding/VaniteViewBindingFragment.kt
similarity index 83%
rename from vortex-ui-binding/src/main/java/com/vortex/android/ui/binding/VortexViewBindingFragment.kt
rename to vanite-ui-binding/src/main/java/com/vanite/android/ui/binding/VaniteViewBindingFragment.kt
index 4b30455..08f642a 100644
--- a/vortex-ui-binding/src/main/java/com/vortex/android/ui/binding/VortexViewBindingFragment.kt
+++ b/vanite-ui-binding/src/main/java/com/vanite/android/ui/binding/VaniteViewBindingFragment.kt
@@ -1,4 +1,4 @@
-package com.vortex.android.ui.binding
+package com.vanite.android.ui.binding
import android.os.Bundle
import android.view.LayoutInflater
@@ -6,8 +6,8 @@ import android.view.View
import android.view.ViewGroup
import androidx.annotation.CallSuper
import androidx.viewbinding.ViewBinding
-import io.vortex.android.VortexViewModelType
-import io.vortex.android.ui.fragment.VortexBaseFragment
+import io.vanite.android.VaniteViewModelType
+import io.vanite.android.ui.fragment.VaniteBaseFragment
typealias Inflate = (LayoutInflater, ViewGroup?, Boolean) -> T
@@ -19,7 +19,7 @@ typealias Inflate = (LayoutInflater, ViewGroup?, Boolean) -> T
* This Class Has all Specific Classes in UI Layer
* and Remove The Code For Layout Inflation by Using isScreenLayoutBinding()
*/
-abstract class VortexViewBindingFragment(private val inflate: Inflate) : VortexBaseFragment() {
+abstract class VaniteViewBindingFragment(private val inflate: Inflate) : VaniteBaseFragment() {
protected var binding: ViewBindingType? = null
abstract val viewModel: ViewModel
diff --git a/vortex-ui-binding/src/main/java/com/vortex/android/ui/binding/VortexViewBindingScreen.kt b/vanite-ui-binding/src/main/java/com/vanite/android/ui/binding/VaniteViewBindingScreen.kt
similarity index 69%
rename from vortex-ui-binding/src/main/java/com/vortex/android/ui/binding/VortexViewBindingScreen.kt
rename to vanite-ui-binding/src/main/java/com/vanite/android/ui/binding/VaniteViewBindingScreen.kt
index 52c101d..0ab6400 100644
--- a/vortex-ui-binding/src/main/java/com/vortex/android/ui/binding/VortexViewBindingScreen.kt
+++ b/vanite-ui-binding/src/main/java/com/vanite/android/ui/binding/VaniteViewBindingScreen.kt
@@ -1,11 +1,11 @@
-package com.vortex.android.ui.binding
+package com.vanite.android.ui.binding
import android.os.Bundle
import android.view.LayoutInflater
import androidx.viewbinding.ViewBinding
-import io.vortex.android.ui.activity.VortexScreen
+import io.vanite.android.ui.activity.VaniteScreen
-abstract class VortexViewBindingScreen(val bindingFactory: (LayoutInflater) -> B) : VortexScreen() {
+abstract class VaniteViewBindingScreen(val bindingFactory: (LayoutInflater) -> B) : VaniteScreen() {
protected var binding: B? = null
diff --git a/vortex-ui-binding/src/main/java/com/vortex/android/ui/binding/VortexViewBindingSingleFragment.kt b/vanite-ui-binding/src/main/java/com/vanite/android/ui/binding/VaniteViewBindingSingleFragment.kt
similarity index 86%
rename from vortex-ui-binding/src/main/java/com/vortex/android/ui/binding/VortexViewBindingSingleFragment.kt
rename to vanite-ui-binding/src/main/java/com/vanite/android/ui/binding/VaniteViewBindingSingleFragment.kt
index 4b8ad3c..755f509 100644
--- a/vortex-ui-binding/src/main/java/com/vortex/android/ui/binding/VortexViewBindingSingleFragment.kt
+++ b/vanite-ui-binding/src/main/java/com/vanite/android/ui/binding/VaniteViewBindingSingleFragment.kt
@@ -1,4 +1,4 @@
-package com.vortex.android.ui.binding
+package com.vanite.android.ui.binding
import android.os.Bundle
import android.view.LayoutInflater
@@ -6,9 +6,9 @@ import android.view.View
import android.view.ViewGroup
import androidx.annotation.CallSuper
import androidx.viewbinding.ViewBinding
-import io.vortex.android.ui.fragment.VortexBaseFragment
+import io.vanite.android.ui.fragment.VaniteBaseFragment
-abstract class VortexViewBindingSingleFragment(private val inflate: Inflate) : VortexBaseFragment() {
+abstract class VaniteViewBindingSingleFragment(private val inflate: Inflate) : VaniteBaseFragment() {
protected var binding: ViewBindingType? = null
diff --git a/vortex-ui-binding/src/main/java/com/vortex/android/ui/binding/VortexViewBindingStateFragment.kt b/vanite-ui-binding/src/main/java/com/vanite/android/ui/binding/VaniteViewBindingStateFragment.kt
similarity index 74%
rename from vortex-ui-binding/src/main/java/com/vortex/android/ui/binding/VortexViewBindingStateFragment.kt
rename to vanite-ui-binding/src/main/java/com/vanite/android/ui/binding/VaniteViewBindingStateFragment.kt
index 6d42d87..7a4c928 100644
--- a/vortex-ui-binding/src/main/java/com/vortex/android/ui/binding/VortexViewBindingStateFragment.kt
+++ b/vanite-ui-binding/src/main/java/com/vanite/android/ui/binding/VaniteViewBindingStateFragment.kt
@@ -1,4 +1,4 @@
-package com.vortex.android.ui.binding
+package com.vanite.android.ui.binding
import android.os.Bundle
import android.view.LayoutInflater
@@ -8,13 +8,13 @@ import androidx.annotation.CallSuper
import androidx.lifecycle.Observer
import androidx.lifecycle.lifecycleScope
import androidx.viewbinding.ViewBinding
-import io.vortex.android.VortexAction
-import io.vortex.android.VortexRxStore
-import io.vortex.android.base.VortexViewModel
-import io.vortex.android.state.VortexState
-import io.vortex.android.ui.VortexErrorType
-import io.vortex.android.ui.VortexViewImpl
-import io.vortex.android.ui.fragment.VortexBaseFragment
+import io.vanite.android.VaniteAction
+import io.vanite.android.VaniteRxStore
+import io.vanite.android.base.VaniteViewModel
+import io.vanite.android.state.VaniteState
+import io.vanite.android.ui.VaniteErrorType
+import io.vanite.android.ui.VaniteViewImpl
+import io.vanite.android.ui.fragment.VaniteBaseFragment
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
@@ -27,12 +27,12 @@ import kotlinx.coroutines.withContext
* This Class Has all Specific Classes in UI Layer
* and Remove The Code For Layout Inflation by Using isScreenLayoutBinding()
*
- * Same As @see VortexViewBindingFragment
+ * Same As @see VaniteViewBindingFragment
* The New Thing Here is This Fragment Has State, Action, Reducer
* To Manage Specific Actions
*/
-abstract class VortexViewBindingStateFragment>(private val inflate: Inflate) : VortexBaseFragment(), VortexRxStore.VortexStateListener,
- VortexViewImpl {
+abstract class VaniteViewBindingStateFragment>(private val inflate: Inflate) : VaniteBaseFragment(), VaniteRxStore.VaniteStateListener,
+ VaniteViewImpl {
protected var binding: ViewBindingType? = null
abstract val viewModel: Reducer
@@ -70,20 +70,20 @@ abstract class VortexViewBindingStateFragment
message?.let {
when (type) {
- VortexErrorType.SHORT_TOAST -> messageController.showShortMessage(
+ VaniteErrorType.SHORT_TOAST -> messageController.showShortMessage(
message,
context
)
- VortexErrorType.LONG_TOAST -> messageController.showLongMessage(
+ VaniteErrorType.LONG_TOAST -> messageController.showLongMessage(
message,
context
)
- VortexErrorType.SNACK_BAR -> messageController.showSnackbar(
+ VaniteErrorType.SNACK_BAR -> messageController.showSnackbar(
context,
message
)
diff --git a/vortex-ui-binding/src/test/java/com/vortex/android/ui/binding/ExampleUnitTest.kt b/vanite-ui-binding/src/test/java/com/vanite/android/ui/binding/ExampleUnitTest.kt
similarity index 89%
rename from vortex-ui-binding/src/test/java/com/vortex/android/ui/binding/ExampleUnitTest.kt
rename to vanite-ui-binding/src/test/java/com/vanite/android/ui/binding/ExampleUnitTest.kt
index b69f81e..4e18d25 100644
--- a/vortex-ui-binding/src/test/java/com/vortex/android/ui/binding/ExampleUnitTest.kt
+++ b/vanite-ui-binding/src/test/java/com/vanite/android/ui/binding/ExampleUnitTest.kt
@@ -1,4 +1,4 @@
-package com.vortex.android.ui.binding
+package com.vanite.android.ui.binding
import org.junit.Test
diff --git a/vortex-ui/build.gradle b/vanite-ui/build.gradle
similarity index 90%
rename from vortex-ui/build.gradle
rename to vanite-ui/build.gradle
index 5f4843f..6db1354 100644
--- a/vortex-ui/build.gradle
+++ b/vanite-ui/build.gradle
@@ -31,7 +31,7 @@ android {
}
ext {
- PUBLISH_ARTIFACT_ID = 'vortex-ui'
+ PUBLISH_ARTIFACT_ID = 'vanite-ui'
}
apply from: "${rootProject.projectDir}/scripts/publish-module.gradle"
@@ -45,7 +45,7 @@ dependencies { configuration ->
addCoroutinesLibraries(configuration)
addDefaultAppCompatDependencies(configuration)
- if (!project.name.equals("vortex")) {
- implementation project(":vortex")
+ if (!project.name.equals("vanite")) {
+ implementation project(":vanite")
}
}
diff --git a/vortex-ui/consumer-rules.pro b/vanite-ui/consumer-rules.pro
similarity index 100%
rename from vortex-ui/consumer-rules.pro
rename to vanite-ui/consumer-rules.pro
diff --git a/vortex-ui/proguard-rules.pro b/vanite-ui/proguard-rules.pro
similarity index 100%
rename from vortex-ui/proguard-rules.pro
rename to vanite-ui/proguard-rules.pro
diff --git a/vortex-ui/src/main/AndroidManifest.xml b/vanite-ui/src/main/AndroidManifest.xml
similarity index 64%
rename from vortex-ui/src/main/AndroidManifest.xml
rename to vanite-ui/src/main/AndroidManifest.xml
index 124e334..a3cbf55 100644
--- a/vortex-ui/src/main/AndroidManifest.xml
+++ b/vanite-ui/src/main/AndroidManifest.xml
@@ -1,2 +1,2 @@
+ package="io.vanite.android.ui" />
diff --git a/vanite-ui/src/main/java/io/vanite/android/ui/VaniteErrorType.kt b/vanite-ui/src/main/java/io/vanite/android/ui/VaniteErrorType.kt
new file mode 100644
index 0000000..4020cb8
--- /dev/null
+++ b/vanite-ui/src/main/java/io/vanite/android/ui/VaniteErrorType.kt
@@ -0,0 +1,5 @@
+package io.vanite.android.ui
+
+enum class VaniteErrorType {
+ SHORT_TOAST, LONG_TOAST, SNACK_BAR
+}
\ No newline at end of file
diff --git a/vortex-ui/src/main/java/io/vortex/android/ui/VortexMessageDelegation.kt b/vanite-ui/src/main/java/io/vanite/android/ui/VaniteMessageDelegation.kt
similarity index 95%
rename from vortex-ui/src/main/java/io/vortex/android/ui/VortexMessageDelegation.kt
rename to vanite-ui/src/main/java/io/vanite/android/ui/VaniteMessageDelegation.kt
index e6dafa4..9ba1759 100644
--- a/vortex-ui/src/main/java/io/vortex/android/ui/VortexMessageDelegation.kt
+++ b/vanite-ui/src/main/java/io/vanite/android/ui/VaniteMessageDelegation.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.ui
+package io.vanite.android.ui
import android.app.AlertDialog
import android.content.Context
@@ -10,7 +10,7 @@ import androidx.annotation.ColorInt
import androidx.annotation.ColorRes
import androidx.fragment.app.FragmentActivity
import com.google.android.material.snackbar.Snackbar
-import io.vortex.android.ui.impl.MessageDelegationImpl
+import io.vanite.android.ui.impl.MessageDelegationImpl
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
@@ -21,7 +21,7 @@ import kotlinx.coroutines.withContext
* Time : 10:19 PM
*/
-class VortexMessageDelegation : MessageDelegationImpl {
+class VaniteMessageDelegation : MessageDelegationImpl {
override suspend fun showShortMessage(message: String, context: Context?) {
withContext(Dispatchers.Main) {
diff --git a/vanite-ui/src/main/java/io/vanite/android/ui/VaniteViewImpl.kt b/vanite-ui/src/main/java/io/vanite/android/ui/VaniteViewImpl.kt
new file mode 100644
index 0000000..8e16808
--- /dev/null
+++ b/vanite-ui/src/main/java/io/vanite/android/ui/VaniteViewImpl.kt
@@ -0,0 +1,23 @@
+package io.vanite.android.ui
+
+import io.vanite.android.VaniteAction
+import io.vanite.android.base.VaniteViewModel
+import io.vanite.android.state.VaniteState
+
+/**
+ * Created By : Yazan Tarifi
+ * Date : 10/10/2019
+ * Time : 11:37 AM
+ */
+
+interface VaniteViewImpl> {
+
+ fun getController(): Reducer
+
+ suspend fun getLoadingState(newState: Boolean)
+
+}
+
+interface VaniteLoadingStateView>: VaniteViewImpl {
+ suspend fun onLoadingChanged(status: Boolean)
+}
diff --git a/vanite-ui/src/main/java/io/vanite/android/ui/activity/VaniteDirectScreen.kt b/vanite-ui/src/main/java/io/vanite/android/ui/activity/VaniteDirectScreen.kt
new file mode 100644
index 0000000..902da2f
--- /dev/null
+++ b/vanite-ui/src/main/java/io/vanite/android/ui/activity/VaniteDirectScreen.kt
@@ -0,0 +1,11 @@
+package io.vanite.android.ui.activity
+
+import androidx.annotation.LayoutRes
+
+abstract class VaniteDirectScreen(@LayoutRes private val layoutRes: Int) : VaniteScreen() {
+
+ override fun getLayoutRes(): Int {
+ return layoutRes
+ }
+
+}
diff --git a/vortex-ui/src/main/java/io/vortex/android/ui/activity/VortexScreen.kt b/vanite-ui/src/main/java/io/vanite/android/ui/activity/VaniteScreen.kt
similarity index 89%
rename from vortex-ui/src/main/java/io/vortex/android/ui/activity/VortexScreen.kt
rename to vanite-ui/src/main/java/io/vanite/android/ui/activity/VaniteScreen.kt
index 3f7bc3a..ee78b90 100644
--- a/vortex-ui/src/main/java/io/vortex/android/ui/activity/VortexScreen.kt
+++ b/vanite-ui/src/main/java/io/vanite/android/ui/activity/VaniteScreen.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.ui.activity
+package io.vanite.android.ui.activity
import android.annotation.SuppressLint
import android.app.Activity
@@ -9,7 +9,7 @@ import android.os.Bundle
import androidx.annotation.CallSuper
import androidx.annotation.LayoutRes
import androidx.appcompat.app.AppCompatActivity
-import io.vortex.android.ui.VortexMessageDelegation
+import io.vanite.android.ui.VaniteMessageDelegation
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
@@ -19,10 +19,10 @@ import kotlinx.coroutines.withContext
* Time : 8:35 PM
*/
-abstract class VortexScreen : AppCompatActivity() {
+abstract class VaniteScreen : AppCompatActivity() {
- protected val messageController: VortexMessageDelegation by lazy {
- VortexMessageDelegation()
+ protected val messageController: VaniteMessageDelegation by lazy {
+ VaniteMessageDelegation()
}
@CallSuper
@@ -43,7 +43,7 @@ abstract class VortexScreen : AppCompatActivity() {
noinline init: Intent.() -> Unit = {}
) {
withContext(Dispatchers.Main) {
- val intent = newIntent(this@VortexScreen)
+ val intent = newIntent(this@VaniteScreen)
intent.init()
startActivity(intent, options)
if (isFinishEnabled) {
@@ -57,7 +57,7 @@ abstract class VortexScreen : AppCompatActivity() {
noinline init: Intent.() -> Unit = {}
) {
withContext(Dispatchers.Main) {
- val intent = newIntent(this@VortexScreen)
+ val intent = newIntent(this@VaniteScreen)
intent.init()
startActivityForResult(intent, reqCode)
}
diff --git a/vortex-ui/src/main/java/io/vortex/android/ui/dialog/VortexBottomDialog.kt b/vanite-ui/src/main/java/io/vanite/android/ui/dialog/VaniteBottomDialog.kt
similarity index 88%
rename from vortex-ui/src/main/java/io/vortex/android/ui/dialog/VortexBottomDialog.kt
rename to vanite-ui/src/main/java/io/vanite/android/ui/dialog/VaniteBottomDialog.kt
index 2ad8034..1cfb463 100644
--- a/vortex-ui/src/main/java/io/vortex/android/ui/dialog/VortexBottomDialog.kt
+++ b/vanite-ui/src/main/java/io/vanite/android/ui/dialog/VaniteBottomDialog.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.ui.dialog
+package io.vanite.android.ui.dialog
import android.app.Dialog
import android.os.Bundle
@@ -10,12 +10,12 @@ import androidx.lifecycle.Observer
import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.google.android.material.bottomsheet.BottomSheetDialog
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
-import io.vortex.android.VortexAction
-import io.vortex.android.base.VortexViewModel
-import io.vortex.android.state.VortexState
-import io.vortex.android.ui.R
+import io.vanite.android.VaniteAction
+import io.vanite.android.base.VaniteViewModel
+import io.vanite.android.state.VaniteState
+import io.vanite.android.ui.R
-abstract class VortexBottomDialog> :
+abstract class VaniteBottomDialog> :
BottomSheetDialogFragment() {
private lateinit var mainDialog: BottomSheetBehavior
diff --git a/vortex-ui/src/main/java/io/vortex/android/ui/dialog/VortexDialog.kt b/vanite-ui/src/main/java/io/vanite/android/ui/dialog/VaniteDialog.kt
similarity index 79%
rename from vortex-ui/src/main/java/io/vortex/android/ui/dialog/VortexDialog.kt
rename to vanite-ui/src/main/java/io/vanite/android/ui/dialog/VaniteDialog.kt
index b091f3b..f057d50 100644
--- a/vortex-ui/src/main/java/io/vortex/android/ui/dialog/VortexDialog.kt
+++ b/vanite-ui/src/main/java/io/vanite/android/ui/dialog/VaniteDialog.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.ui.dialog
+package io.vanite.android.ui.dialog
import android.os.Bundle
import android.view.LayoutInflater
@@ -7,11 +7,11 @@ import android.view.ViewGroup
import androidx.annotation.LayoutRes
import androidx.fragment.app.DialogFragment
import androidx.lifecycle.Observer
-import io.vortex.android.VortexAction
-import io.vortex.android.base.VortexViewModel
-import io.vortex.android.state.VortexState
+import io.vanite.android.VaniteAction
+import io.vanite.android.base.VaniteViewModel
+import io.vanite.android.state.VaniteState
-abstract class VortexDialog>: DialogFragment() {
+abstract class VaniteDialog>: DialogFragment() {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
return inflater.inflate(getLayoutRes(), container, false)
diff --git a/vortex-ui/src/main/java/io/vortex/android/ui/fragment/VortexBaseFragment.kt b/vanite-ui/src/main/java/io/vanite/android/ui/fragment/VaniteBaseFragment.kt
similarity index 92%
rename from vortex-ui/src/main/java/io/vortex/android/ui/fragment/VortexBaseFragment.kt
rename to vanite-ui/src/main/java/io/vanite/android/ui/fragment/VaniteBaseFragment.kt
index 7bebb7f..ead6fef 100644
--- a/vortex-ui/src/main/java/io/vortex/android/ui/fragment/VortexBaseFragment.kt
+++ b/vanite-ui/src/main/java/io/vanite/android/ui/fragment/VaniteBaseFragment.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.ui.fragment
+package io.vanite.android.ui.fragment
import android.annotation.SuppressLint
import android.content.Context
@@ -11,7 +11,7 @@ import android.view.ViewGroup
import androidx.annotation.CallSuper
import androidx.annotation.LayoutRes
import androidx.fragment.app.Fragment
-import io.vortex.android.ui.VortexMessageDelegation
+import io.vanite.android.ui.VaniteMessageDelegation
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
@@ -22,7 +22,7 @@ import kotlinx.coroutines.withContext
*/
/**
- * This Fragment is the Super Fragment in Vortex for All Types Of Fragments
+ * This Fragment is the Super Fragment in Vanite for All Types Of Fragments
* This One is Handling 2 Types of View Injection
* 1. Layout XML Injection
* 2. ViewBinding Injection
@@ -31,10 +31,10 @@ import kotlinx.coroutines.withContext
* And Provide One Structure of Fragments
* This Fragments is Customized By Passed Parameters in Generic Types
*/
-abstract class VortexBaseFragment : Fragment() {
+abstract class VaniteBaseFragment : Fragment() {
- protected val messageController: VortexMessageDelegation by lazy {
- VortexMessageDelegation()
+ protected val messageController: VaniteMessageDelegation by lazy {
+ VaniteMessageDelegation()
}
@CallSuper
diff --git a/vanite-ui/src/main/java/io/vanite/android/ui/fragment/VaniteDirectFragment.kt b/vanite-ui/src/main/java/io/vanite/android/ui/fragment/VaniteDirectFragment.kt
new file mode 100644
index 0000000..cccae5d
--- /dev/null
+++ b/vanite-ui/src/main/java/io/vanite/android/ui/fragment/VaniteDirectFragment.kt
@@ -0,0 +1,25 @@
+package io.vanite.android.ui.fragment
+
+import androidx.annotation.LayoutRes
+import io.vanite.android.VaniteAction
+import io.vanite.android.VaniteRxStore
+import io.vanite.android.base.VaniteViewModel
+import io.vanite.android.state.VaniteState
+import io.vanite.android.ui.VaniteViewImpl
+
+/**
+ * This Fragment Type is The Same as VaniteFragment With State, Action, Reducer
+ * The Only New Thing Here is getLayoutRes is Now Passed in Parameter not Self Implementation
+ * In Sub Class
+ *
+ * Note: Full Implementation in VaniteFragment, VaniteBaseFragment
+ */
+abstract class VaniteDirectFragment>
+ constructor(@LayoutRes private val layoutRes: Int) : VaniteFragment(), VaniteRxStore.VaniteStateListener,
+ VaniteViewImpl {
+
+ override fun getLayoutRes(): Int {
+ return layoutRes
+ }
+
+}
diff --git a/vortex-ui/src/main/java/io/vortex/android/ui/fragment/VortexFragment.kt b/vanite-ui/src/main/java/io/vanite/android/ui/fragment/VaniteFragment.kt
similarity index 65%
rename from vortex-ui/src/main/java/io/vortex/android/ui/fragment/VortexFragment.kt
rename to vanite-ui/src/main/java/io/vanite/android/ui/fragment/VaniteFragment.kt
index f857449..b201108 100644
--- a/vortex-ui/src/main/java/io/vortex/android/ui/fragment/VortexFragment.kt
+++ b/vanite-ui/src/main/java/io/vanite/android/ui/fragment/VaniteFragment.kt
@@ -1,16 +1,16 @@
-package io.vortex.android.ui.fragment
+package io.vanite.android.ui.fragment
import android.os.Bundle
import android.view.View
import androidx.annotation.CallSuper
import androidx.lifecycle.Observer
import androidx.lifecycle.lifecycleScope
-import io.vortex.android.VortexAction
-import io.vortex.android.VortexRxStore
-import io.vortex.android.base.VortexViewModel
-import io.vortex.android.state.VortexState
-import io.vortex.android.ui.VortexErrorType
-import io.vortex.android.ui.VortexViewImpl
+import io.vanite.android.VaniteAction
+import io.vanite.android.VaniteRxStore
+import io.vanite.android.base.VaniteViewModel
+import io.vanite.android.state.VaniteState
+import io.vanite.android.ui.VaniteErrorType
+import io.vanite.android.ui.VaniteViewImpl
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
@@ -22,12 +22,12 @@ import kotlinx.coroutines.withContext
*/
/**
- * This Class is The Main Fragment In Vortex and it's Recommended to Only Fragments that is Using
+ * This Class is The Main Fragment In Vanite and it's Recommended to Only Fragments that is Using
* XML Binding and This is a Managed Class in onViewCreated that will Use Action, State, Reducer
*/
-abstract class VortexFragment> :
- VortexBaseFragment(), VortexRxStore.VortexStateListener,
- VortexViewImpl {
+abstract class VaniteFragment> :
+ VaniteBaseFragment(), VaniteRxStore.VaniteStateListener,
+ VaniteViewImpl {
@CallSuper
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
@@ -46,20 +46,20 @@ abstract class VortexFragment
message?.let {
when (type) {
- VortexErrorType.SHORT_TOAST -> messageController.showShortMessage(
+ VaniteErrorType.SHORT_TOAST -> messageController.showShortMessage(
message,
context
)
- VortexErrorType.LONG_TOAST -> messageController.showLongMessage(
+ VaniteErrorType.LONG_TOAST -> messageController.showLongMessage(
message,
context
)
- VortexErrorType.SNACK_BAR -> messageController.showSnackbar(
+ VaniteErrorType.SNACK_BAR -> messageController.showSnackbar(
context,
message
)
diff --git a/vortex-ui/src/main/java/io/vortex/android/ui/fragment/VortexFragmentReadyState.kt b/vanite-ui/src/main/java/io/vanite/android/ui/fragment/VaniteFragmentReadyState.kt
similarity index 65%
rename from vortex-ui/src/main/java/io/vortex/android/ui/fragment/VortexFragmentReadyState.kt
rename to vanite-ui/src/main/java/io/vanite/android/ui/fragment/VaniteFragmentReadyState.kt
index d29bd11..d6f8ef7 100644
--- a/vortex-ui/src/main/java/io/vortex/android/ui/fragment/VortexFragmentReadyState.kt
+++ b/vanite-ui/src/main/java/io/vanite/android/ui/fragment/VaniteFragmentReadyState.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.ui.fragment
+package io.vanite.android.ui.fragment
import android.os.Bundle
import android.view.View
@@ -6,16 +6,16 @@ import androidx.annotation.CallSuper
import androidx.annotation.LayoutRes
import androidx.lifecycle.Observer
import androidx.lifecycle.lifecycleScope
-import io.vortex.android.keys.VortexViewModelState
-import io.vortex.android.base.VortexViewModelReadyState
+import io.vanite.android.keys.VaniteViewModelState
+import io.vanite.android.base.VaniteViewModelReadyState
import kotlinx.coroutines.launch
/**
* This ViewModel Type is Only To Pass ViewModel with ReadyState Generic Type and Layout In Constructor
*
- * Note: Full Implementation in VortexFragment, VortexBaseFragment
+ * Note: Full Implementation in VaniteFragment, VaniteBaseFragment
*/
-abstract class VortexFragmentReadyState(@LayoutRes private val layoutRes: Int) : VortexBaseFragment() {
+abstract class VaniteFragmentReadyState(@LayoutRes private val layoutRes: Int) : VaniteBaseFragment() {
@CallSuper
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
@@ -27,7 +27,7 @@ abstract class VortexFragmentReadyState(@LayoutRe
super.onViewCreated(view, savedInstanceState)
}
- protected abstract suspend fun onStateChanged(newState: VortexViewModelState)
+ protected abstract suspend fun onStateChanged(newState: VaniteViewModelState)
protected abstract fun getController(): VM
override fun getLayoutRes(): Int {
return layoutRes
diff --git a/vortex-ui/src/main/java/io/vortex/android/ui/fragment/VortexIndirectStateFragment.kt b/vanite-ui/src/main/java/io/vanite/android/ui/fragment/VaniteIndirectStateFragment.kt
similarity index 84%
rename from vortex-ui/src/main/java/io/vortex/android/ui/fragment/VortexIndirectStateFragment.kt
rename to vanite-ui/src/main/java/io/vanite/android/ui/fragment/VaniteIndirectStateFragment.kt
index cc0433f..b480fb1 100644
--- a/vortex-ui/src/main/java/io/vortex/android/ui/fragment/VortexIndirectStateFragment.kt
+++ b/vanite-ui/src/main/java/io/vanite/android/ui/fragment/VaniteIndirectStateFragment.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.ui.fragment
+package io.vanite.android.ui.fragment
import android.os.Bundle
import android.view.View
@@ -6,7 +6,7 @@ import androidx.annotation.CallSuper
import androidx.annotation.LayoutRes
import androidx.lifecycle.Observer
import androidx.lifecycle.lifecycleScope
-import io.vortex.android.base.VortexIndirectViewModel
+import io.vanite.android.base.VaniteIndirectViewModel
import kotlinx.coroutines.launch
/**
@@ -16,8 +16,8 @@ import kotlinx.coroutines.launch
*
*/
-abstract class VortexIndirectStateFragment>(@LayoutRes private val layoutId: Int) :
- VortexBaseFragment() {
+abstract class VaniteIndirectStateFragment>(@LayoutRes private val layoutId: Int) :
+ VaniteBaseFragment() {
override fun getLayoutRes(): Int {
return layoutId
diff --git a/vanite-ui/src/main/java/io/vanite/android/ui/fragment/VaniteLceFragment.kt b/vanite-ui/src/main/java/io/vanite/android/ui/fragment/VaniteLceFragment.kt
new file mode 100644
index 0000000..b35527a
--- /dev/null
+++ b/vanite-ui/src/main/java/io/vanite/android/ui/fragment/VaniteLceFragment.kt
@@ -0,0 +1,15 @@
+package io.vanite.android.ui.fragment
+
+import io.vanite.android.VaniteAction
+import io.vanite.android.VaniteRxStore
+import io.vanite.android.base.VaniteViewModel
+import io.vanite.android.state.VaniteState
+import io.vanite.android.ui.VaniteLoadingStateView
+
+
+abstract class VaniteLceFragment>
+ : VaniteFragment(), VaniteRxStore.VaniteStateListener, VaniteLoadingStateView {
+
+ // Code at the Super Class
+
+}
diff --git a/vortex-ui/src/main/java/io/vortex/android/ui/fragment/VortexSingleStateFragment.kt b/vanite-ui/src/main/java/io/vanite/android/ui/fragment/VaniteSingleStateFragment.kt
similarity index 76%
rename from vortex-ui/src/main/java/io/vortex/android/ui/fragment/VortexSingleStateFragment.kt
rename to vanite-ui/src/main/java/io/vanite/android/ui/fragment/VaniteSingleStateFragment.kt
index cae3847..3f0889e 100644
--- a/vortex-ui/src/main/java/io/vortex/android/ui/fragment/VortexSingleStateFragment.kt
+++ b/vanite-ui/src/main/java/io/vanite/android/ui/fragment/VaniteSingleStateFragment.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.ui.fragment
+package io.vanite.android.ui.fragment
import android.os.Bundle
import android.view.View
@@ -6,12 +6,12 @@ import androidx.annotation.CallSuper
import androidx.annotation.LayoutRes
import androidx.lifecycle.Observer
import androidx.lifecycle.lifecycleScope
-import io.vortex.android.base.VortexSingleStateViewModel
-import io.vortex.android.state.VortexState
+import io.vanite.android.base.VaniteSingleStateViewModel
+import io.vanite.android.state.VaniteState
import kotlinx.coroutines.launch
-abstract class VortexSingleStateFragment>
- (@LayoutRes private val layoutId: Int) : VortexBaseFragment() {
+abstract class VaniteSingleStateFragment>
+ (@LayoutRes private val layoutId: Int) : VaniteBaseFragment() {
override fun getLayoutRes(): Int {
return layoutId
diff --git a/vortex-ui/src/main/java/io/vortex/android/ui/fragment/manager/VortexFragmentManager.kt b/vanite-ui/src/main/java/io/vanite/android/ui/fragment/manager/VaniteFragmentManager.kt
similarity index 93%
rename from vortex-ui/src/main/java/io/vortex/android/ui/fragment/manager/VortexFragmentManager.kt
rename to vanite-ui/src/main/java/io/vanite/android/ui/fragment/manager/VaniteFragmentManager.kt
index 75f9410..47c7274 100644
--- a/vortex-ui/src/main/java/io/vortex/android/ui/fragment/manager/VortexFragmentManager.kt
+++ b/vanite-ui/src/main/java/io/vanite/android/ui/fragment/manager/VaniteFragmentManager.kt
@@ -1,10 +1,10 @@
-package io.vortex.android.ui.fragment.manager
+package io.vanite.android.ui.fragment.manager
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
-import io.vortex.android.ui.impl.VortexFragmentManagerImpl
+import io.vanite.android.ui.impl.VaniteFragmentManagerImpl
-open class VortexFragmentManager : VortexFragmentManagerImpl {
+open class VaniteFragmentManager : VaniteFragmentManagerImpl {
override fun addFragment(context: FragmentActivity?, fragment: Fragment, container: Int) {
context?.let {
diff --git a/vortex-ui/src/main/java/io/vortex/android/ui/fragment/manager/VortexThrededFragmentManager.kt b/vanite-ui/src/main/java/io/vanite/android/ui/fragment/manager/VaniteThrededFragmentManager.kt
similarity index 94%
rename from vortex-ui/src/main/java/io/vortex/android/ui/fragment/manager/VortexThrededFragmentManager.kt
rename to vanite-ui/src/main/java/io/vanite/android/ui/fragment/manager/VaniteThrededFragmentManager.kt
index df2cb05..3f7f25c 100644
--- a/vortex-ui/src/main/java/io/vortex/android/ui/fragment/manager/VortexThrededFragmentManager.kt
+++ b/vanite-ui/src/main/java/io/vanite/android/ui/fragment/manager/VaniteThrededFragmentManager.kt
@@ -1,13 +1,13 @@
-package io.vortex.android.ui.fragment.manager
+package io.vanite.android.ui.fragment.manager
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
-import io.vortex.android.ui.impl.VortexThrededFragmentManagerImpl
+import io.vanite.android.ui.impl.VaniteThrededFragmentManagerImpl
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
-class VortexThrededFragmentManager : VortexThrededFragmentManagerImpl {
+class VaniteThrededFragmentManager : VaniteThrededFragmentManagerImpl {
override suspend fun addFragment(
context: FragmentActivity?,
diff --git a/vortex-ui/src/main/java/io/vortex/android/ui/impl/MessageDelegationImpl.kt b/vanite-ui/src/main/java/io/vanite/android/ui/impl/MessageDelegationImpl.kt
similarity index 92%
rename from vortex-ui/src/main/java/io/vortex/android/ui/impl/MessageDelegationImpl.kt
rename to vanite-ui/src/main/java/io/vanite/android/ui/impl/MessageDelegationImpl.kt
index 99128e3..a7f2f41 100644
--- a/vortex-ui/src/main/java/io/vortex/android/ui/impl/MessageDelegationImpl.kt
+++ b/vanite-ui/src/main/java/io/vanite/android/ui/impl/MessageDelegationImpl.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.ui.impl
+package io.vanite.android.ui.impl
import android.content.Context
diff --git a/vortex-ui/src/main/java/io/vortex/android/ui/impl/VortexFragmentManagerImpl.kt b/vanite-ui/src/main/java/io/vanite/android/ui/impl/VaniteFragmentManagerImpl.kt
similarity index 93%
rename from vortex-ui/src/main/java/io/vortex/android/ui/impl/VortexFragmentManagerImpl.kt
rename to vanite-ui/src/main/java/io/vanite/android/ui/impl/VaniteFragmentManagerImpl.kt
index 6f894ef..7fad342 100644
--- a/vortex-ui/src/main/java/io/vortex/android/ui/impl/VortexFragmentManagerImpl.kt
+++ b/vanite-ui/src/main/java/io/vanite/android/ui/impl/VaniteFragmentManagerImpl.kt
@@ -1,11 +1,11 @@
-package io.vortex.android.ui.impl
+package io.vanite.android.ui.impl
import androidx.annotation.AnimRes
import androidx.annotation.IdRes
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
-interface VortexFragmentManagerImpl {
+interface VaniteFragmentManagerImpl {
fun addFragment(context: FragmentActivity?, fragment: Fragment, @IdRes container: Int)
@@ -23,7 +23,7 @@ interface VortexFragmentManagerImpl {
}
-interface VortexThrededFragmentManagerImpl {
+interface VaniteThrededFragmentManagerImpl {
suspend fun addFragment(context: FragmentActivity?, fragment: Fragment, @IdRes container: Int)
diff --git a/vortex/src/test/java/io/vortex/android/ExampleUnitTest.kt b/vanite-ui/src/test/java/io/vanite/android/ui/ExampleUnitTest.kt
similarity index 91%
rename from vortex/src/test/java/io/vortex/android/ExampleUnitTest.kt
rename to vanite-ui/src/test/java/io/vanite/android/ui/ExampleUnitTest.kt
index 73ef3e6..52d04fa 100644
--- a/vortex/src/test/java/io/vortex/android/ExampleUnitTest.kt
+++ b/vanite-ui/src/test/java/io/vanite/android/ui/ExampleUnitTest.kt
@@ -1,4 +1,4 @@
-package io.vortex.android
+package io.vanite.android.ui
import org.junit.Test
diff --git a/vortex-utils/build.gradle b/vanite-utils/build.gradle
similarity index 87%
rename from vortex-utils/build.gradle
rename to vanite-utils/build.gradle
index 987831e..474a473 100644
--- a/vortex-utils/build.gradle
+++ b/vanite-utils/build.gradle
@@ -32,7 +32,7 @@ android {
}
ext {
- PUBLISH_ARTIFACT_ID = 'vortex-utils'
+ PUBLISH_ARTIFACT_ID = 'vanite-utils'
}
apply from: "${rootProject.projectDir}/scripts/publish-module.gradle"
@@ -53,9 +53,9 @@ dependencies { configuration ->
implementation 'com.google.android.libraries.places:places:2.5.0'
implementation "com.google.android.gms:play-services-location:18.0.0"
- implementation project(":vortex-permissions")
- implementation project(":vortex-firebase")
- implementation project(":vortex-prefs")
+ implementation project(':vanite-permissions')
+ implementation project(':vanite-firebase')
+ implementation project(':vanite-prefs')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${rootProject.ext.PluginsVersions.KotlinPluginV}"
@@ -63,7 +63,7 @@ dependencies { configuration ->
addCoroutinesLibraries(configuration)
addDefaultAppCompatDependencies(configuration)
- if (!project.name.equals("vortex")) {
- implementation project(":vortex")
+ if (!project.name.equals("vanite")) {
+ implementation project(":vanite")
}
}
diff --git a/vortex-utils/consumer-rules.pro b/vanite-utils/consumer-rules.pro
similarity index 100%
rename from vortex-utils/consumer-rules.pro
rename to vanite-utils/consumer-rules.pro
diff --git a/vortex-utils/proguard-rules.pro b/vanite-utils/proguard-rules.pro
similarity index 100%
rename from vortex-utils/proguard-rules.pro
rename to vanite-utils/proguard-rules.pro
diff --git a/vortex-utils/src/main/AndroidManifest.xml b/vanite-utils/src/main/AndroidManifest.xml
similarity index 90%
rename from vortex-utils/src/main/AndroidManifest.xml
rename to vanite-utils/src/main/AndroidManifest.xml
index 997cae7..70f6434 100644
--- a/vortex-utils/src/main/AndroidManifest.xml
+++ b/vanite-utils/src/main/AndroidManifest.xml
@@ -1,5 +1,5 @@
+ package="io.vanite.android.utils" >
diff --git a/vortex-utils/src/main/java/io/vortex/android/utils/VortexApplication.kt b/vanite-utils/src/main/java/io/vanite/android/utils/VaniteApplication.kt
similarity index 78%
rename from vortex-utils/src/main/java/io/vortex/android/utils/VortexApplication.kt
rename to vanite-utils/src/main/java/io/vanite/android/utils/VaniteApplication.kt
index 1025b12..19c5ba9 100644
--- a/vortex-utils/src/main/java/io/vortex/android/utils/VortexApplication.kt
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/VaniteApplication.kt
@@ -1,11 +1,11 @@
-package io.vortex.android.utils
+package io.vanite.android.utils
import android.content.Context
import androidx.annotation.CallSuper
import androidx.multidex.MultiDex
import androidx.multidex.MultiDexApplication
-import io.vortex.android.models.ui.VortexNotificationDetails
-import io.vortex.android.utils.random.VortexDeviceInfo
+import io.vanite.android.models.ui.VaniteNotificationDetails
+import io.vanite.android.utils.random.VaniteDeviceInfo
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import timber.log.Timber
@@ -16,17 +16,17 @@ import timber.log.Timber
* Time : 1:49 AM
*/
-open class VortexApplication : MultiDexApplication() {
+open class VaniteApplication : MultiDexApplication() {
- protected val notificationsController: VortexNotificationController by lazy {
- VortexNotificationController()
+ protected val notificationsController: VaniteNotificationController by lazy {
+ VaniteNotificationController()
}
/**
* When You Need To Show Notifications THe New Android Sdk Requires Notification Channel
* To Show THis Notification For User And Here you are Initializing The Channels
*/
- protected suspend fun setupNotificationChannels(clannels: List) {
+ protected suspend fun setupNotificationChannels(clannels: List) {
withContext(Dispatchers.IO) {
applicationContext?.let {
notificationsController.createMultiNotificationChannels(
@@ -41,7 +41,7 @@ open class VortexApplication : MultiDexApplication() {
* Setup Fresco Configuration
* This Configuration Should Initialize Fresco On Background Thread With Buffer Memory
*/
- @Deprecated("Fresco Removed From Application", ReplaceWith("Glide Loading in VortexImageLoader"))
+ @Deprecated("Fresco Removed From Application", ReplaceWith("Glide Loading in VaniteImageLoader"))
protected suspend fun setupFresco() = Unit
/**
@@ -62,6 +62,6 @@ open class VortexApplication : MultiDexApplication() {
MultiDex.install(base)
}
- protected fun getDeviceInfo(): VortexDeviceInfo = VortexDeviceInfo(applicationContext)
+ protected fun getDeviceInfo(): VaniteDeviceInfo = VaniteDeviceInfo(applicationContext)
}
diff --git a/vortex-utils/src/main/java/io/vortex/android/utils/VortexConfiguration.kt b/vanite-utils/src/main/java/io/vanite/android/utils/VaniteConfiguration.kt
similarity index 68%
rename from vortex-utils/src/main/java/io/vortex/android/utils/VortexConfiguration.kt
rename to vanite-utils/src/main/java/io/vanite/android/utils/VaniteConfiguration.kt
index 72776c8..08939bd 100644
--- a/vortex-utils/src/main/java/io/vortex/android/utils/VortexConfiguration.kt
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/VaniteConfiguration.kt
@@ -1,14 +1,14 @@
-package io.vortex.android.utils
+package io.vanite.android.utils
import android.app.Application
import android.os.StrictMode
import androidx.appcompat.app.AppCompatDelegate
-import io.vortex.android.errors.VortexFirebaseConfigurationException
-import io.vortex.android.keys.ImageLoader
-import io.vortex.android.keys.LoggerType
-import io.vortex.android.models.VortexPrefsDetails
-import io.vortex.android.permissions.VortexPermissionsConfiguration
-import io.vortex.android.prefs.VortexPrefsConfig
+import io.vanite.android.errors.VaniteFirebaseConfigurationException
+import io.vanite.android.keys.ImageLoader
+import io.vanite.android.keys.LoggerType
+import io.vanite.android.models.VanitePrefsDetails
+import io.vanite.android.permissions.VanitePermissionsConfiguration
+import io.vanite.android.prefs.VanitePrefsConfig
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import timber.log.Timber
@@ -19,18 +19,18 @@ import timber.log.Timber
* Time : 9:52 PM
*/
-object VortexConfiguration : VortexConfigurationImpl {
+object VaniteConfiguration : VaniteConfigurationImpl {
private var applicationStatus: Boolean = false
- private lateinit var vortexApplication: Application
+ private lateinit var vaniteApplication: Application
private var isPlatformCheckRequired: Boolean = false
- override fun registerApplicationClass(app: Application): VortexConfiguration {
- vortexApplication = app
+ override fun registerApplicationClass(app: Application): VaniteConfiguration {
+ vaniteApplication = app
return this
}
- override suspend fun registerApplicationLogger(logger: LoggerType): VortexConfiguration {
+ override suspend fun registerApplicationLogger(logger: LoggerType): VaniteConfiguration {
withContext(Dispatchers.IO) {
when (logger) {
LoggerType.TIMBER -> {
@@ -39,7 +39,7 @@ object VortexConfiguration : VortexConfigurationImpl {
}
}
- LoggerType.VORTEX_LOGGER -> {
+ LoggerType.VANITE_LOGGER -> {
// implement this when create logger library (at the future xD )
}
}
@@ -51,11 +51,11 @@ object VortexConfiguration : VortexConfigurationImpl {
"Not Used Anymore, if You Want to Add Image Library Confiuration Should be From App Side Not Library Side",
ReplaceWith("Self Implementation in App Class Inside The Application")
)
- override suspend fun registerImageLoader(imageLoader: ImageLoader): VortexConfiguration {
+ override suspend fun registerImageLoader(imageLoader: ImageLoader): VaniteConfiguration {
return this
}
- override suspend fun registerApplicationState(state: Boolean): VortexConfiguration {
+ override suspend fun registerApplicationState(state: Boolean): VaniteConfiguration {
withContext(Dispatchers.IO) {
applicationStatus = state
}
@@ -66,12 +66,12 @@ object VortexConfiguration : VortexConfigurationImpl {
"Not Used Anymore, Declare Firebase from Your App Class",
ReplaceWith("ManualDeclaration")
)
- @Throws(VortexFirebaseConfigurationException::class)
- override suspend fun registerFirebaseConfiguration(moduleName: String): VortexConfiguration {
+ @Throws(VaniteFirebaseConfigurationException::class)
+ override suspend fun registerFirebaseConfiguration(moduleName: String): VaniteConfiguration {
return this
}
- override suspend fun registerStrictMode(): VortexConfiguration {
+ override suspend fun registerStrictMode(): VaniteConfiguration {
withContext(Dispatchers.IO) {
if (applicationStatus) {
StrictMode.setThreadPolicy(
@@ -91,14 +91,14 @@ object VortexConfiguration : VortexConfigurationImpl {
return this
}
- override suspend fun registerExceptionHandler(handler: Thread.UncaughtExceptionHandler): VortexConfiguration {
+ override suspend fun registerExceptionHandler(handler: Thread.UncaughtExceptionHandler): VaniteConfiguration {
withContext(Dispatchers.IO) {
Thread.currentThread().uncaughtExceptionHandler = handler
}
return this
}
- override suspend fun registerCompatVector(): VortexConfiguration {
+ override suspend fun registerCompatVector(): VaniteConfiguration {
withContext(Dispatchers.IO) {
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true)
}
@@ -106,33 +106,33 @@ object VortexConfiguration : VortexConfigurationImpl {
}
@Deprecated("Moved to Firebase Crashlytics", ReplaceWith("FirebaseCrashlytics"))
- override suspend fun registerFabric(): VortexConfiguration {
+ override suspend fun registerFabric(): VaniteConfiguration {
return this
}
- override suspend fun checkPlatformRequiredConfiguration(): VortexConfiguration {
+ override suspend fun checkPlatformRequiredConfiguration(): VaniteConfiguration {
isPlatformCheckRequired = true
return this
}
- override fun registerVortexPrefsConfiguration(
- details: VortexPrefsDetails,
+ override fun registerVanitePrefsConfiguration(
+ details: VanitePrefsDetails,
application: Application
- ): VortexConfiguration {
- VortexPrefsConfig.init(
+ ): VaniteConfiguration {
+ VanitePrefsConfig.init(
application.applicationContext,
application.packageName
)
return this
}
- override suspend fun registerUserStoryConfiguration(): VortexConfiguration {
+ override suspend fun registerUserStoryConfiguration(): VaniteConfiguration {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
- override suspend fun registerVortexPermissionsSettings(): VortexConfiguration {
+ override suspend fun registerVanitePermissionsSettings(): VaniteConfiguration {
withContext(Dispatchers.IO) {
- VortexPermissionsConfiguration.attachApplication(vortexApplication)
+ VanitePermissionsConfiguration.attachApplication(vaniteApplication)
}
return this
}
diff --git a/vanite-utils/src/main/java/io/vanite/android/utils/VaniteConfigurationImpl.kt b/vanite-utils/src/main/java/io/vanite/android/utils/VaniteConfigurationImpl.kt
new file mode 100644
index 0000000..a2b8ab3
--- /dev/null
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/VaniteConfigurationImpl.kt
@@ -0,0 +1,42 @@
+package io.vanite.android.utils
+
+import android.app.Application
+import io.vanite.android.errors.VaniteFirebaseConfigurationException
+import io.vanite.android.models.VanitePrefsDetails
+
+/**
+ * Created By : Yazan Tarifi
+ * Date : 10/10/2019
+ * Time : 9:52 PM
+ */
+
+interface VaniteConfigurationImpl {
+
+ fun registerApplicationClass(app: Application): VaniteConfiguration
+
+ suspend fun registerApplicationLogger(logger: L): VaniteConfiguration
+
+ suspend fun registerImageLoader(imageLoader: I): VaniteConfiguration
+
+ suspend fun registerApplicationState(state: Boolean): VaniteConfiguration
+
+ @Throws(VaniteFirebaseConfigurationException::class)
+ suspend fun registerFirebaseConfiguration(moduleName: String): VaniteConfiguration
+
+ suspend fun registerStrictMode(): VaniteConfiguration
+
+ suspend fun registerExceptionHandler(handler: Thread.UncaughtExceptionHandler): VaniteConfiguration
+
+ suspend fun registerCompatVector(): VaniteConfiguration
+
+ suspend fun registerFabric(): VaniteConfiguration
+
+ suspend fun checkPlatformRequiredConfiguration(): VaniteConfiguration
+
+ fun registerVanitePrefsConfiguration(details: VanitePrefsDetails, application: Application): VaniteConfiguration
+
+ suspend fun registerUserStoryConfiguration(): VaniteConfiguration
+
+ suspend fun registerVanitePermissionsSettings(): VaniteConfiguration
+
+}
diff --git a/vortex-utils/src/main/java/io/vortex/android/utils/VortexMessagesListener.kt b/vanite-utils/src/main/java/io/vanite/android/utils/VaniteMessagesListener.kt
similarity index 95%
rename from vortex-utils/src/main/java/io/vortex/android/utils/VortexMessagesListener.kt
rename to vanite-utils/src/main/java/io/vanite/android/utils/VaniteMessagesListener.kt
index cdae280..8493ca5 100644
--- a/vortex-utils/src/main/java/io/vortex/android/utils/VortexMessagesListener.kt
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/VaniteMessagesListener.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.utils
+package io.vanite.android.utils
import android.content.BroadcastReceiver
import android.content.Context
@@ -12,7 +12,7 @@ import android.telephony.SmsMessage
* Time : 11:49 PM
*/
-class VortexMessagesListener : BroadcastReceiver() {
+class VaniteMessagesListener : BroadcastReceiver() {
private val action: String = "android.provider.Telephony.SMS_RECEIVED"
diff --git a/vortex-utils/src/main/java/io/vortex/android/utils/VortexNotificationController.kt b/vanite-utils/src/main/java/io/vanite/android/utils/VaniteNotificationController.kt
similarity index 93%
rename from vortex-utils/src/main/java/io/vortex/android/utils/VortexNotificationController.kt
rename to vanite-utils/src/main/java/io/vanite/android/utils/VaniteNotificationController.kt
index b53ca89..ac05285 100644
--- a/vortex-utils/src/main/java/io/vortex/android/utils/VortexNotificationController.kt
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/VaniteNotificationController.kt
@@ -1,10 +1,10 @@
-package io.vortex.android.utils
+package io.vanite.android.utils
import android.app.NotificationChannel
import android.app.NotificationManager
import android.content.Context
import android.os.Build
-import io.vortex.android.models.ui.VortexNotificationDetails
+import io.vanite.android.models.ui.VaniteNotificationDetails
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
@@ -15,7 +15,7 @@ import kotlinx.coroutines.withContext
* Time : 9:51 PM
*/
-class VortexNotificationController {
+class VaniteNotificationController {
suspend fun createChannel(name: String, description: String, id: String, context: Context) {
withContext(Dispatchers.IO) {
@@ -48,7 +48,7 @@ class VortexNotificationController {
}
suspend fun createMultiNotificationChannels(
- data: List,
+ data: List,
context: Context
) {
withContext(Dispatchers.IO) {
diff --git a/vortex-utils/src/main/java/io/vortex/android/utils/VortexScope.kt b/vanite-utils/src/main/java/io/vanite/android/utils/VaniteScope.kt
similarity index 84%
rename from vortex-utils/src/main/java/io/vortex/android/utils/VortexScope.kt
rename to vanite-utils/src/main/java/io/vanite/android/utils/VaniteScope.kt
index 4bfeb32..40cffb0 100644
--- a/vortex-utils/src/main/java/io/vortex/android/utils/VortexScope.kt
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/VaniteScope.kt
@@ -1,9 +1,9 @@
-package io.vortex.android.utils
+package io.vanite.android.utils
import kotlinx.coroutines.*
import kotlin.coroutines.CoroutineContext
-open class VortexScope : CoroutineScope {
+open class VaniteScope : CoroutineScope {
private val scope = CoroutineScope(Dispatchers.IO + SupervisorJob())
override val coroutineContext: CoroutineContext
diff --git a/vanite-utils/src/main/java/io/vanite/android/utils/VaniteTextWatcher.kt b/vanite-utils/src/main/java/io/vanite/android/utils/VaniteTextWatcher.kt
new file mode 100644
index 0000000..a5cb68e
--- /dev/null
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/VaniteTextWatcher.kt
@@ -0,0 +1,27 @@
+package io.vanite.android.utils
+
+import android.text.Editable
+import android.text.TextWatcher
+import android.widget.EditText
+import com.google.android.material.textfield.TextInputEditText
+import io.vanite.android.utils.impl.VaniteTextWatcherAfter
+
+fun EditText.addVaniteTextWatcher(listener: VaniteTextWatcherAfter) {
+ this.addTextChangedListener(object : TextWatcher {
+ override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) = Unit
+ override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) = Unit
+ override fun afterTextChanged(s: Editable?) {
+ listener.onTextFinished(s)
+ }
+ })
+}
+
+fun TextInputEditText.addVaniteTextWatcher(listener: VaniteTextWatcherAfter) {
+ this.addTextChangedListener(object : TextWatcher {
+ override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) = Unit
+ override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) = Unit
+ override fun afterTextChanged(s: Editable?) {
+ listener.onTextFinished(s)
+ }
+ })
+}
diff --git a/vanite-utils/src/main/java/io/vanite/android/utils/impl/VaniteTextWatcherAfter.kt b/vanite-utils/src/main/java/io/vanite/android/utils/impl/VaniteTextWatcherAfter.kt
new file mode 100644
index 0000000..f6bd897
--- /dev/null
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/impl/VaniteTextWatcherAfter.kt
@@ -0,0 +1,9 @@
+package io.vanite.android.utils.impl
+
+import android.text.Editable
+
+interface VaniteTextWatcherAfter {
+
+ fun onTextFinished(s: Editable?)
+
+}
\ No newline at end of file
diff --git a/vortex-utils/src/main/java/io/vortex/android/utils/language/VortexLanguageToggle.kt b/vanite-utils/src/main/java/io/vanite/android/utils/language/VaniteLanguageToggle.kt
similarity index 65%
rename from vortex-utils/src/main/java/io/vortex/android/utils/language/VortexLanguageToggle.kt
rename to vanite-utils/src/main/java/io/vanite/android/utils/language/VaniteLanguageToggle.kt
index 8abe5bc..625d590 100644
--- a/vortex-utils/src/main/java/io/vortex/android/utils/language/VortexLanguageToggle.kt
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/language/VaniteLanguageToggle.kt
@@ -1,10 +1,10 @@
-package io.vortex.android.utils.language
+package io.vanite.android.utils.language
import android.content.Context
import android.content.SharedPreferences
-import io.vortex.android.details.VortexPrefsDetails
-import io.vortex.android.details.VortexPrefsDetailsException
-import io.vortex.android.errors.VortexPrefsNotInitializedException
+import io.vanite.android.details.VanitePrefsDetails
+import io.vanite.android.details.VanitePrefsDetailsException
+import io.vanite.android.errors.VanitePrefsNotInitializedException
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import java.util.*
@@ -15,7 +15,7 @@ import java.util.*
* Time : 1:39 AM
*/
-object VortexLanguageToggle {
+object VaniteLanguageToggle {
lateinit var prefs: SharedPreferences
@@ -28,13 +28,13 @@ object VortexLanguageToggle {
suspend fun saveSelectedLanguage(language: String) {
withContext(Dispatchers.IO) {
if (::prefs.isInitialized) {
- prefs.edit().putString("AttoSelectedLanguage", language).apply()
+ prefs.edit().putString("VaniteSelectedLanguage", language).apply()
} else {
- VortexPrefsNotInitializedException(VortexPrefsDetailsException(
- "Vortex Prefs Not Initialized",
- VortexPrefsDetails(
- "io.vortex.android.utils.language.VortexLanguageToggle",
- "This Error Happend When You Forget To Call VortexLanguageToggle.init(context)"
+ VanitePrefsNotInitializedException(VanitePrefsDetailsException(
+ "Vanite Prefs Not Initialized",
+ VanitePrefsDetails(
+ "io.vanite.android.utils.language.VaniteLanguageToggle",
+ "This Error Happend When You Forget To Call VaniteLanguageToggle.init(context)"
)
))
}
@@ -43,7 +43,7 @@ object VortexLanguageToggle {
suspend fun getSelectedLanguage(): String? {
return withContext(Dispatchers.IO) {
- prefs.getString("AttoSelectedLanguage", null)
+ prefs.getString("VaniteSelectedLanguage", null)
}
}
@@ -64,8 +64,8 @@ object VortexLanguageToggle {
suspend fun languagePreCondition(context: Context?) {
withContext(Dispatchers.IO) {
- VortexLanguageToggle.getSelectedLanguage()?.let {
- VortexLanguageToggle.changeApplicationLanguage(it, context)
+ VaniteLanguageToggle.getSelectedLanguage()?.let {
+ VaniteLanguageToggle.changeApplicationLanguage(it, context)
}
}
diff --git a/vortex-utils/src/main/java/io/vortex/android/utils/language/VortexLocaleManager.kt b/vanite-utils/src/main/java/io/vanite/android/utils/language/VaniteLocaleManager.kt
similarity index 97%
rename from vortex-utils/src/main/java/io/vortex/android/utils/language/VortexLocaleManager.kt
rename to vanite-utils/src/main/java/io/vanite/android/utils/language/VaniteLocaleManager.kt
index 56b0659..8fb0d9d 100644
--- a/vortex-utils/src/main/java/io/vortex/android/utils/language/VortexLocaleManager.kt
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/language/VaniteLocaleManager.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.utils.language
+package io.vanite.android.utils.language
import android.annotation.TargetApi
import android.content.Context
@@ -14,7 +14,7 @@ import java.util.*
* Time : 1:45 AM
*/
-object VortexLocaleManager {
+object VaniteLocaleManager {
val SELECTED_LANGUAGE = "Locale.Language"
diff --git a/vortex-utils/src/main/java/io/vortex/android/utils/picker/PickMethod.kt b/vanite-utils/src/main/java/io/vanite/android/utils/picker/PickMethod.kt
similarity index 56%
rename from vortex-utils/src/main/java/io/vortex/android/utils/picker/PickMethod.kt
rename to vanite-utils/src/main/java/io/vanite/android/utils/picker/PickMethod.kt
index 77e102a..59b964d 100644
--- a/vortex-utils/src/main/java/io/vortex/android/utils/picker/PickMethod.kt
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/picker/PickMethod.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.utils.picker
+package io.vanite.android.utils.picker
enum class PickMethod {
DOC, GALLERY, CAMERA
diff --git a/vortex-utils/src/main/java/io/vortex/android/utils/picker/VortexFileAttachPicker.kt b/vanite-utils/src/main/java/io/vanite/android/utils/picker/VaniteFileAttachPicker.kt
similarity index 92%
rename from vortex-utils/src/main/java/io/vortex/android/utils/picker/VortexFileAttachPicker.kt
rename to vanite-utils/src/main/java/io/vanite/android/utils/picker/VaniteFileAttachPicker.kt
index a88a5b4..7abd4bc 100644
--- a/vortex-utils/src/main/java/io/vortex/android/utils/picker/VortexFileAttachPicker.kt
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/picker/VaniteFileAttachPicker.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.utils.picker
+package io.vanite.android.utils.picker
import android.content.Intent
import android.graphics.Bitmap
@@ -9,10 +9,10 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import java.io.File
-class VortexFileAttachPicker {
+class VaniteFileAttachPicker {
private var pickerState: PickMethod = PickMethod.GALLERY
- private var listener: VortexFilePickerListener? = null
+ private var listener: VaniteFilePickerListener? = null
suspend fun startImagesAttach(context: FragmentActivity?, reqCode: Int) {
withContext(Dispatchers.Main) {
@@ -80,9 +80,9 @@ class VortexFileAttachPicker {
data?.let {
it.extras?.let {
val photo = it.get("data") as Bitmap
- val tempUri = VortexImageManager.getImageUri(context, photo)
+ val tempUri = VaniteImageManager.getImageUri(context, photo)
val finalFile =
- File(VortexImageManager.getRealPathFromURI(context, tempUri))
+ File(VaniteImageManager.getRealPathFromURI(context, tempUri))
listener?.let {
it.onFilePicked(
pickerState,
@@ -119,7 +119,7 @@ class VortexFileAttachPicker {
}
- suspend fun addFileListener(newListener: VortexFilePickerListener) {
+ suspend fun addFileListener(newListener: VaniteFilePickerListener) {
withContext(Dispatchers.IO) {
listener = newListener
}
diff --git a/vortex-utils/src/main/java/io/vortex/android/utils/picker/VortexFilePickerListener.kt b/vanite-utils/src/main/java/io/vanite/android/utils/picker/VaniteFilePickerListener.kt
similarity index 56%
rename from vortex-utils/src/main/java/io/vortex/android/utils/picker/VortexFilePickerListener.kt
rename to vanite-utils/src/main/java/io/vanite/android/utils/picker/VaniteFilePickerListener.kt
index 42c6c37..159e0db 100644
--- a/vortex-utils/src/main/java/io/vortex/android/utils/picker/VortexFilePickerListener.kt
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/picker/VaniteFilePickerListener.kt
@@ -1,7 +1,7 @@
-package io.vortex.android.utils.picker
+package io.vanite.android.utils.picker
import android.net.Uri
-interface VortexFilePickerListener {
+interface VaniteFilePickerListener {
suspend fun onFilePicked(type: PickMethod, data: Uri, reqCode: Int)
}
\ No newline at end of file
diff --git a/vortex-utils/src/main/java/io/vortex/android/utils/picker/VortexImageManager.kt b/vanite-utils/src/main/java/io/vanite/android/utils/picker/VaniteImageManager.kt
similarity index 95%
rename from vortex-utils/src/main/java/io/vortex/android/utils/picker/VortexImageManager.kt
rename to vanite-utils/src/main/java/io/vanite/android/utils/picker/VaniteImageManager.kt
index d83ff7c..8751a50 100644
--- a/vortex-utils/src/main/java/io/vortex/android/utils/picker/VortexImageManager.kt
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/picker/VaniteImageManager.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.utils.picker
+package io.vanite.android.utils.picker
import android.content.Context
import android.provider.MediaStore
@@ -10,7 +10,7 @@ import android.webkit.MimeTypeMap
import android.content.ContentResolver
import java.io.File
-object VortexImageManager {
+object VaniteImageManager {
fun getImageUri(inContext: Context, inImage: Bitmap): Uri {
val bytes = ByteArrayOutputStream()
diff --git a/vortex-utils/src/main/java/io/vortex/android/utils/random/VortexBaseAdapter.kt b/vanite-utils/src/main/java/io/vanite/android/utils/random/VaniteBaseAdapter.kt
similarity index 85%
rename from vortex-utils/src/main/java/io/vortex/android/utils/random/VortexBaseAdapter.kt
rename to vanite-utils/src/main/java/io/vanite/android/utils/random/VaniteBaseAdapter.kt
index 5608003..5579006 100644
--- a/vortex-utils/src/main/java/io/vortex/android/utils/random/VortexBaseAdapter.kt
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/random/VaniteBaseAdapter.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.utils.random
+package io.vanite.android.utils.random
import android.content.Context
import android.view.LayoutInflater
@@ -12,7 +12,7 @@ import androidx.recyclerview.widget.RecyclerView
* Time : 1:50 AM
*/
-abstract class VortexBaseAdapter : RecyclerView.Adapter() {
+abstract class VaniteBaseAdapter : RecyclerView.Adapter() {
lateinit var context: Context
diff --git a/vortex-utils/src/main/java/io/vortex/android/utils/random/VortexDeviceInfo.kt b/vanite-utils/src/main/java/io/vanite/android/utils/random/VaniteDeviceInfo.kt
similarity index 94%
rename from vortex-utils/src/main/java/io/vortex/android/utils/random/VortexDeviceInfo.kt
rename to vanite-utils/src/main/java/io/vanite/android/utils/random/VaniteDeviceInfo.kt
index 56f889b..d67afa7 100644
--- a/vortex-utils/src/main/java/io/vortex/android/utils/random/VortexDeviceInfo.kt
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/random/VaniteDeviceInfo.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.utils.random
+package io.vanite.android.utils.random
import android.annotation.SuppressLint
import android.content.Context
@@ -11,7 +11,7 @@ import android.provider.Settings
* Time : 1:49 AM
*/
-class VortexDeviceInfo(private val applicationContext: Context) {
+class VaniteDeviceInfo(private val applicationContext: Context) {
fun getAndroidVersion(): String {
val release = Build.VERSION.RELEASE
diff --git a/vortex-utils/src/main/java/io/vortex/android/utils/random/VortexRecyclerViewDecoration.kt b/vanite-utils/src/main/java/io/vanite/android/utils/random/VaniteRecyclerViewDecoration.kt
similarity index 97%
rename from vortex-utils/src/main/java/io/vortex/android/utils/random/VortexRecyclerViewDecoration.kt
rename to vanite-utils/src/main/java/io/vanite/android/utils/random/VaniteRecyclerViewDecoration.kt
index 82781a8..c1fd98e 100644
--- a/vortex-utils/src/main/java/io/vortex/android/utils/random/VortexRecyclerViewDecoration.kt
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/random/VaniteRecyclerViewDecoration.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.utils.random
+package io.vanite.android.utils.random
import android.content.Context
import android.graphics.Canvas
@@ -16,7 +16,7 @@ import kotlin.math.roundToInt
* Time : 1:52 AM
*/
-class VortexRecyclerViewDecoration(
+class VaniteRecyclerViewDecoration(
private val context: Context,
orientation: Int,
private val margin: Int
diff --git a/vortex-utils/src/main/java/io/vortex/android/utils/random/VortexWebViewController.kt b/vanite-utils/src/main/java/io/vanite/android/utils/random/VaniteWebViewController.kt
similarity index 85%
rename from vortex-utils/src/main/java/io/vortex/android/utils/random/VortexWebViewController.kt
rename to vanite-utils/src/main/java/io/vanite/android/utils/random/VaniteWebViewController.kt
index c52333e..6c53ace 100644
--- a/vortex-utils/src/main/java/io/vortex/android/utils/random/VortexWebViewController.kt
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/random/VaniteWebViewController.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.utils.random
+package io.vanite.android.utils.random
import android.graphics.Bitmap
import android.view.View
@@ -12,7 +12,7 @@ import android.widget.ProgressBar
* Time : 1:48 AM
*/
-open class VortexWebViewController(private val progressBar: ProgressBar) : WebViewClient() {
+open class VaniteWebViewController(private val progressBar: ProgressBar) : WebViewClient() {
override fun onPageFinished(view: WebView?, url: String?) {
super.onPageFinished(view, url)
diff --git a/vortex-utils/src/main/java/io/vortex/android/utils/ui/VortexAnimationUtils.kt b/vanite-utils/src/main/java/io/vanite/android/utils/ui/VaniteAnimationUtils.kt
similarity index 98%
rename from vortex-utils/src/main/java/io/vortex/android/utils/ui/VortexAnimationUtils.kt
rename to vanite-utils/src/main/java/io/vanite/android/utils/ui/VaniteAnimationUtils.kt
index 64b6abd..906bb86 100644
--- a/vortex-utils/src/main/java/io/vortex/android/utils/ui/VortexAnimationUtils.kt
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/ui/VaniteAnimationUtils.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.utils.ui
+package io.vanite.android.utils.ui
import android.content.Context
import android.graphics.Paint
diff --git a/vortex-utils/src/main/java/io/vortex/android/utils/ui/VortexGifController.kt b/vanite-utils/src/main/java/io/vanite/android/utils/ui/VaniteGifController.kt
similarity index 88%
rename from vortex-utils/src/main/java/io/vortex/android/utils/ui/VortexGifController.kt
rename to vanite-utils/src/main/java/io/vanite/android/utils/ui/VaniteGifController.kt
index 492df4b..f88767c 100644
--- a/vortex-utils/src/main/java/io/vortex/android/utils/ui/VortexGifController.kt
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/ui/VaniteGifController.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.utils.ui
+package io.vanite.android.utils.ui
import android.content.Context
import android.graphics.drawable.Drawable
@@ -12,7 +12,7 @@ import com.bumptech.glide.load.engine.GlideException
import com.bumptech.glide.load.resource.gif.GifDrawable
import com.bumptech.glide.request.RequestListener
import com.bumptech.glide.request.target.Target
-import io.vortex.android.models.ui.VortexAnimationSettings
+import io.vanite.android.models.ui.VaniteAnimationSettings
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
@@ -23,12 +23,12 @@ import kotlinx.coroutines.withContext
* Time : 9:31 PM
*/
-object VortexGifController {
+object VaniteGifController {
- private var listener: VortexGifListener? = null
+ private var listener: VaniteGifListener? = null
suspend fun startAnimationWithGlide(
- settings: VortexAnimationSettings,
+ settings: VaniteAnimationSettings,
context: Context,
image: ImageView?
) {
@@ -75,14 +75,14 @@ object VortexGifController {
}
}
- @Deprecated("Fresco Removed From Application", ReplaceWith("Replaced With : VortexGifController.startAnimationWithGlide"))
+ @Deprecated("Fresco Removed From Application", ReplaceWith("Replaced With : VaniteGifController.startAnimationWithGlide"))
suspend fun startAnimationWithFresco(
- settings: VortexAnimationSettings,
+ settings: VaniteAnimationSettings,
image: View,
isAutoPlay: Boolean
) = Unit
- fun attachListener(listener: VortexGifListener) {
+ fun attachListener(listener: VaniteGifListener) {
this.listener = listener
}
diff --git a/vortex-utils/src/main/java/io/vortex/android/utils/ui/VortexGifListener.kt b/vanite-utils/src/main/java/io/vanite/android/utils/ui/VaniteGifListener.kt
similarity index 63%
rename from vortex-utils/src/main/java/io/vortex/android/utils/ui/VortexGifListener.kt
rename to vanite-utils/src/main/java/io/vanite/android/utils/ui/VaniteGifListener.kt
index eabcafe..987a59a 100644
--- a/vortex-utils/src/main/java/io/vortex/android/utils/ui/VortexGifListener.kt
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/ui/VaniteGifListener.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.utils.ui
+package io.vanite.android.utils.ui
/**
* Created By : Yazan Tarifi
@@ -6,7 +6,7 @@ package io.vortex.android.utils.ui
* Time : 9:43 PM
*/
-interface VortexGifListener {
+interface VaniteGifListener {
fun onAnimationFinished()
diff --git a/vortex-utils/src/main/java/io/vortex/android/utils/ui/VortexImageLoader.kt b/vanite-utils/src/main/java/io/vanite/android/utils/ui/VaniteImageLoader.kt
similarity index 97%
rename from vortex-utils/src/main/java/io/vortex/android/utils/ui/VortexImageLoader.kt
rename to vanite-utils/src/main/java/io/vanite/android/utils/ui/VaniteImageLoader.kt
index ff8bb18..2d70caa 100644
--- a/vortex-utils/src/main/java/io/vortex/android/utils/ui/VortexImageLoader.kt
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/ui/VaniteImageLoader.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.utils.ui
+package io.vanite.android.utils.ui
import android.graphics.drawable.Drawable
import android.view.View
@@ -18,7 +18,7 @@ import kotlinx.coroutines.withContext
* Time : 2:43 PM
*/
-object VortexImageLoader {
+object VaniteImageLoader {
@Deprecated("Removed From Library", ReplaceWith("Load Image With Glide"))
suspend fun loadImageWithPicasso(url: String, image: ImageView) = Unit
diff --git a/vortex-utils/src/main/java/io/vortex/android/utils/ui/VortexMapBuilder.kt b/vanite-utils/src/main/java/io/vanite/android/utils/ui/VaniteMapBuilder.kt
similarity index 98%
rename from vortex-utils/src/main/java/io/vortex/android/utils/ui/VortexMapBuilder.kt
rename to vanite-utils/src/main/java/io/vanite/android/utils/ui/VaniteMapBuilder.kt
index e9fcebd..2dc3282 100644
--- a/vortex-utils/src/main/java/io/vortex/android/utils/ui/VortexMapBuilder.kt
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/ui/VaniteMapBuilder.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.utils.ui
+package io.vanite.android.utils.ui
import android.content.Context
import androidx.appcompat.app.AppCompatActivity
@@ -26,7 +26,7 @@ import java.util.*
* Time : 10:13 PM
*/
-object VortexMapBuilder {
+object VaniteMapBuilder {
fun createMapFromFragment(fragment: Fragment, id: Int): SupportMapFragment {
return fragment.childFragmentManager.findFragmentById(id) as SupportMapFragment
diff --git a/vortex-utils/src/main/java/io/vortex/android/utils/ui/VortexPagerExt.kt b/vanite-utils/src/main/java/io/vanite/android/utils/ui/VanitePagerExt.kt
similarity index 73%
rename from vortex-utils/src/main/java/io/vortex/android/utils/ui/VortexPagerExt.kt
rename to vanite-utils/src/main/java/io/vanite/android/utils/ui/VanitePagerExt.kt
index dabf6da..c34fbc3 100644
--- a/vortex-utils/src/main/java/io/vortex/android/utils/ui/VortexPagerExt.kt
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/ui/VanitePagerExt.kt
@@ -1,16 +1,16 @@
-package io.vortex.android.utils.ui
+package io.vanite.android.utils.ui
import androidx.viewpager.widget.ViewPager
import com.google.android.material.bottomnavigation.BottomNavigationView
-fun BottomNavigationView.vortexIdSelection(listener: VortexPagerSelectionListener) {
+fun BottomNavigationView.vaniteIdSelection(listener: VanitePagerSelectionListener) {
setOnNavigationItemSelectedListener { item ->
listener.onSelected(item.itemId)
true
}
}
-fun ViewPager.vortexPositionSelection(listener: VortexViewPagerSelectionListener) {
+fun ViewPager.vanitePositionSelection(listener: VaniteViewPagerSelectionListener) {
addOnPageChangeListener(object : ViewPager.OnPageChangeListener {
override fun onPageScrollStateChanged(state: Int) = Unit
override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) = Unit
@@ -20,10 +20,10 @@ fun ViewPager.vortexPositionSelection(listener: VortexViewPagerSelectionListener
})
}
-interface VortexPagerSelectionListener {
+interface VanitePagerSelectionListener {
fun onSelected(id: Int)
}
-interface VortexViewPagerSelectionListener {
+interface VaniteViewPagerSelectionListener {
fun onPageSelected(position: Int)
}
diff --git a/vortex-utils/src/main/java/io/vortex/android/utils/utils/DateTimeUtils.kt b/vanite-utils/src/main/java/io/vanite/android/utils/utils/DateTimeUtils.kt
similarity index 96%
rename from vortex-utils/src/main/java/io/vortex/android/utils/utils/DateTimeUtils.kt
rename to vanite-utils/src/main/java/io/vanite/android/utils/utils/DateTimeUtils.kt
index 4d0d87f..73c8de0 100644
--- a/vortex-utils/src/main/java/io/vortex/android/utils/utils/DateTimeUtils.kt
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/utils/DateTimeUtils.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.utils.utils
+package io.vanite.android.utils.utils
import android.annotation.SuppressLint
import java.text.SimpleDateFormat
diff --git a/vortex-utils/src/main/java/io/vortex/android/utils/utils/KeyboardUtils.kt b/vanite-utils/src/main/java/io/vanite/android/utils/utils/KeyboardUtils.kt
similarity index 97%
rename from vortex-utils/src/main/java/io/vortex/android/utils/utils/KeyboardUtils.kt
rename to vanite-utils/src/main/java/io/vanite/android/utils/utils/KeyboardUtils.kt
index 179dbad..6cf8e0d 100644
--- a/vortex-utils/src/main/java/io/vortex/android/utils/utils/KeyboardUtils.kt
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/utils/KeyboardUtils.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.utils.utils
+package io.vanite.android.utils.utils
import android.content.Context
import android.graphics.Rect
diff --git a/vortex-utils/src/main/java/io/vortex/android/utils/utils/LocationUtils.kt b/vanite-utils/src/main/java/io/vanite/android/utils/utils/LocationUtils.kt
similarity index 97%
rename from vortex-utils/src/main/java/io/vortex/android/utils/utils/LocationUtils.kt
rename to vanite-utils/src/main/java/io/vanite/android/utils/utils/LocationUtils.kt
index 90b732a..3e93ebf 100644
--- a/vortex-utils/src/main/java/io/vortex/android/utils/utils/LocationUtils.kt
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/utils/LocationUtils.kt
@@ -1,10 +1,9 @@
-package io.vortex.android.utils.utils
+package io.vanite.android.utils.utils
import android.app.Activity
import android.content.Context
import android.content.IntentSender
import android.location.Location
-import android.preference.PreferenceManager
import com.google.android.gms.common.api.ResolvableApiException
import com.google.android.gms.location.LocationRequest
import com.google.android.gms.location.LocationServices
diff --git a/vortex-utils/src/main/java/io/vortex/android/utils/utils/NetworkUtils.kt b/vanite-utils/src/main/java/io/vanite/android/utils/utils/NetworkUtils.kt
similarity index 96%
rename from vortex-utils/src/main/java/io/vortex/android/utils/utils/NetworkUtils.kt
rename to vanite-utils/src/main/java/io/vanite/android/utils/utils/NetworkUtils.kt
index 967c646..d4bbdf2 100644
--- a/vortex-utils/src/main/java/io/vortex/android/utils/utils/NetworkUtils.kt
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/utils/NetworkUtils.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.utils.utils
+package io.vanite.android.utils.utils
import android.annotation.SuppressLint
import android.content.Context
diff --git a/vortex-utils/src/main/java/io/vortex/android/utils/utils/RecyclerViewUtils.kt b/vanite-utils/src/main/java/io/vanite/android/utils/utils/RecyclerViewUtils.kt
similarity index 92%
rename from vortex-utils/src/main/java/io/vortex/android/utils/utils/RecyclerViewUtils.kt
rename to vanite-utils/src/main/java/io/vanite/android/utils/utils/RecyclerViewUtils.kt
index b218b6c..2702214 100644
--- a/vortex-utils/src/main/java/io/vortex/android/utils/utils/RecyclerViewUtils.kt
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/utils/RecyclerViewUtils.kt
@@ -1,7 +1,6 @@
-package io.vortex.android.utils.utils
+package io.vanite.android.utils.utils
import android.content.Context
-import android.view.View
import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
diff --git a/vortex-utils/src/main/java/io/vortex/android/utils/utils/ScreenOrientationUtils.kt b/vanite-utils/src/main/java/io/vanite/android/utils/utils/ScreenOrientationUtils.kt
similarity index 98%
rename from vortex-utils/src/main/java/io/vortex/android/utils/utils/ScreenOrientationUtils.kt
rename to vanite-utils/src/main/java/io/vanite/android/utils/utils/ScreenOrientationUtils.kt
index 66c245b..6173d3f 100644
--- a/vortex-utils/src/main/java/io/vortex/android/utils/utils/ScreenOrientationUtils.kt
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/utils/ScreenOrientationUtils.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.utils.utils
+package io.vanite.android.utils.utils
import android.annotation.SuppressLint
import android.content.Context
diff --git a/vortex-utils/src/main/java/io/vortex/android/utils/utils/ScreenUtils.kt b/vanite-utils/src/main/java/io/vanite/android/utils/utils/ScreenUtils.kt
similarity index 96%
rename from vortex-utils/src/main/java/io/vortex/android/utils/utils/ScreenUtils.kt
rename to vanite-utils/src/main/java/io/vanite/android/utils/utils/ScreenUtils.kt
index 27a69ae..2b17d20 100644
--- a/vortex-utils/src/main/java/io/vortex/android/utils/utils/ScreenUtils.kt
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/utils/ScreenUtils.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.utils.utils
+package io.vanite.android.utils.utils
import android.content.Context
import android.content.res.Configuration
diff --git a/vortex-utils/src/main/java/io/vortex/android/utils/utils/VortexBackPressedUtils.kt b/vanite-utils/src/main/java/io/vanite/android/utils/utils/VaniteBackPressedUtils.kt
similarity index 90%
rename from vortex-utils/src/main/java/io/vortex/android/utils/utils/VortexBackPressedUtils.kt
rename to vanite-utils/src/main/java/io/vanite/android/utils/utils/VaniteBackPressedUtils.kt
index 773b22f..7c74c8d 100644
--- a/vortex-utils/src/main/java/io/vortex/android/utils/utils/VortexBackPressedUtils.kt
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/utils/VaniteBackPressedUtils.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.utils.utils
+package io.vanite.android.utils.utils
import android.webkit.WebView
import androidx.fragment.app.FragmentActivity
@@ -10,7 +10,7 @@ import androidx.viewpager.widget.ViewPager
* Time : 1:57 AM
*/
-object VortexBackPressedUtils {
+object VaniteBackPressedUtils {
fun getViewPagerHandler(viewpager: ViewPager, context: FragmentActivity) {
if (viewpager.currentItem == 0) {
diff --git a/vortex-utils/src/main/java/io/vortex/android/utils/utils/VortexDeviceUtils.kt b/vanite-utils/src/main/java/io/vanite/android/utils/utils/VaniteDeviceUtils.kt
similarity index 95%
rename from vortex-utils/src/main/java/io/vortex/android/utils/utils/VortexDeviceUtils.kt
rename to vanite-utils/src/main/java/io/vanite/android/utils/utils/VaniteDeviceUtils.kt
index 2451cae..5f33816 100644
--- a/vortex-utils/src/main/java/io/vortex/android/utils/utils/VortexDeviceUtils.kt
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/utils/VaniteDeviceUtils.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.utils.utils
+package io.vanite.android.utils.utils
import android.annotation.SuppressLint
import android.os.Build
@@ -9,7 +9,7 @@ import android.os.Build
* Time : 1:57 AM
*/
-object VortexDeviceUtils {
+object VaniteDeviceUtils {
fun getDeviceModel(): String = android.os.Build.MODEL
diff --git a/vortex-utils/src/main/java/io/vortex/android/utils/utils/VortexGsonUtils.kt b/vanite-utils/src/main/java/io/vanite/android/utils/utils/VaniteGsonUtils.kt
similarity index 96%
rename from vortex-utils/src/main/java/io/vortex/android/utils/utils/VortexGsonUtils.kt
rename to vanite-utils/src/main/java/io/vanite/android/utils/utils/VaniteGsonUtils.kt
index b247dbe..37aba54 100644
--- a/vortex-utils/src/main/java/io/vortex/android/utils/utils/VortexGsonUtils.kt
+++ b/vanite-utils/src/main/java/io/vanite/android/utils/utils/VaniteGsonUtils.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.utils.utils
+package io.vanite.android.utils.utils
import android.util.Base64
import android.util.Base64.URL_SAFE
@@ -13,7 +13,7 @@ import java.nio.charset.Charset
* Time : 1:56 AM
*/
-object VortexGsonUtils {
+object VaniteGsonUtils {
fun convertToGson(data: Any): String {
return Gson().toJson(data)
diff --git a/vortex-data/src/test/java/io/vortex/android/data/ExampleUnitTest.kt b/vanite-utils/src/test/java/io/vanite/android/utils/ExampleUnitTest.kt
similarity index 90%
rename from vortex-data/src/test/java/io/vortex/android/data/ExampleUnitTest.kt
rename to vanite-utils/src/test/java/io/vanite/android/utils/ExampleUnitTest.kt
index 2ca03eb..7a0fda3 100644
--- a/vortex-data/src/test/java/io/vortex/android/data/ExampleUnitTest.kt
+++ b/vanite-utils/src/test/java/io/vanite/android/utils/ExampleUnitTest.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.data
+package io.vanite.android.utils
import org.junit.Test
diff --git a/vortex/build.gradle b/vanite/build.gradle
similarity index 98%
rename from vortex/build.gradle
rename to vanite/build.gradle
index 37d4158..9f0a6c6 100644
--- a/vortex/build.gradle
+++ b/vanite/build.gradle
@@ -32,7 +32,7 @@ android {
}
ext {
- PUBLISH_ARTIFACT_ID = 'vortex'
+ PUBLISH_ARTIFACT_ID = 'vanite'
}
apply from: "${rootProject.projectDir}/scripts/publish-module.gradle"
diff --git a/vortex/consumer-rules.pro b/vanite/consumer-rules.pro
similarity index 100%
rename from vortex/consumer-rules.pro
rename to vanite/consumer-rules.pro
diff --git a/vortex/proguard-rules.pro b/vanite/proguard-rules.pro
similarity index 100%
rename from vortex/proguard-rules.pro
rename to vanite/proguard-rules.pro
diff --git a/vortex/src/main/AndroidManifest.xml b/vanite/src/main/AndroidManifest.xml
similarity index 82%
rename from vortex/src/main/AndroidManifest.xml
rename to vanite/src/main/AndroidManifest.xml
index e58c45e..c96d7b9 100644
--- a/vortex/src/main/AndroidManifest.xml
+++ b/vanite/src/main/AndroidManifest.xml
@@ -1,5 +1,5 @@
+ package="io.vanite.android" >
diff --git a/vanite/src/main/java/io/vanite/android/VaniteAction.kt b/vanite/src/main/java/io/vanite/android/VaniteAction.kt
new file mode 100644
index 0000000..2af3a3a
--- /dev/null
+++ b/vanite/src/main/java/io/vanite/android/VaniteAction.kt
@@ -0,0 +1,9 @@
+package io.vanite.android
+
+/**
+ * Created By : Yazan Tarifi
+ * Date : 10/9/2019
+ * Time : 10:43 PM
+ */
+
+interface VaniteAction
diff --git a/vortex/src/main/java/io/vortex/android/VortexIndirectViewModelImpl.kt b/vanite/src/main/java/io/vanite/android/VaniteIndirectViewModelImpl.kt
similarity index 75%
rename from vortex/src/main/java/io/vortex/android/VortexIndirectViewModelImpl.kt
rename to vanite/src/main/java/io/vanite/android/VaniteIndirectViewModelImpl.kt
index dc272dd..278a52d 100644
--- a/vortex/src/main/java/io/vortex/android/VortexIndirectViewModelImpl.kt
+++ b/vanite/src/main/java/io/vanite/android/VaniteIndirectViewModelImpl.kt
@@ -1,8 +1,8 @@
-package io.vortex.android
+package io.vanite.android
import androidx.lifecycle.MutableLiveData
-interface VortexIndirectViewModelImpl {
+interface VaniteIndirectViewModelImpl {
suspend fun execute(newAction: Any)
diff --git a/vanite/src/main/java/io/vanite/android/VaniteModelStateImpl.kt b/vanite/src/main/java/io/vanite/android/VaniteModelStateImpl.kt
new file mode 100644
index 0000000..4467e70
--- /dev/null
+++ b/vanite/src/main/java/io/vanite/android/VaniteModelStateImpl.kt
@@ -0,0 +1,22 @@
+package io.vanite.android
+
+import androidx.lifecycle.MutableLiveData
+import io.reactivex.disposables.Disposable
+import io.vanite.android.keys.VaniteViewModelState
+import io.vanite.android.rx.VaniteRxRepository
+
+interface VaniteModelStateImpl {
+
+ suspend fun acceptNewState(newState: VaniteViewModelState)
+
+ fun getStateHandler(): MutableLiveData
+
+ fun getRepositoryHandler(): VaniteRxRepository
+
+ fun getCurrentViewModelState(): VaniteViewModelState?
+
+ suspend fun addRxRequest(request: Disposable)
+
+ suspend fun execute(newAction: Any)
+
+}
\ No newline at end of file
diff --git a/vortex/src/main/java/io/vortex/android/VortexNetworkListener.kt b/vanite/src/main/java/io/vanite/android/VaniteNetworkListener.kt
similarity index 70%
rename from vortex/src/main/java/io/vortex/android/VortexNetworkListener.kt
rename to vanite/src/main/java/io/vanite/android/VaniteNetworkListener.kt
index 1daf7fe..cb72cb7 100644
--- a/vortex/src/main/java/io/vortex/android/VortexNetworkListener.kt
+++ b/vanite/src/main/java/io/vanite/android/VaniteNetworkListener.kt
@@ -1,4 +1,4 @@
-package io.vortex.android
+package io.vanite.android
/**
* Created By : Yazan Tarifi
@@ -6,7 +6,7 @@ package io.vortex.android
* Time : 3:00 AM
*/
-interface VortexNetworkListener {
+interface VaniteNetworkListener {
fun onNetworkConnected()
diff --git a/vortex/src/main/java/io/vortex/android/VortexRxStore.kt b/vanite/src/main/java/io/vanite/android/VaniteRxStore.kt
similarity index 60%
rename from vortex/src/main/java/io/vortex/android/VortexRxStore.kt
rename to vanite/src/main/java/io/vanite/android/VaniteRxStore.kt
index 4af4860..1011e98 100644
--- a/vortex/src/main/java/io/vortex/android/VortexRxStore.kt
+++ b/vanite/src/main/java/io/vanite/android/VaniteRxStore.kt
@@ -1,6 +1,6 @@
-package io.vortex.android
+package io.vanite.android
-import io.vortex.android.state.VortexState
+import io.vanite.android.state.VaniteState
/**
* Created By : Yazan Tarifi
@@ -8,7 +8,7 @@ import io.vortex.android.state.VortexState
* Time : 3:54 AM
*/
-interface VortexRxStore {
+interface VaniteRxStore {
suspend fun getCurrentState(): State?
@@ -20,9 +20,9 @@ interface VortexRxStore {
suspend fun getStateObserver(): O
- suspend fun attachStateListener(listener: VortexStateListener)
+ suspend fun attachStateListener(listener: VaniteStateListener)
- interface VortexStateListener {
+ interface VaniteStateListener {
suspend fun onStateChanged(newState: State)
}
diff --git a/vortex/src/main/java/io/vortex/android/VortexSingleStateViewModelImpl.kt b/vanite/src/main/java/io/vanite/android/VaniteSingleStateViewModelImpl.kt
similarity index 50%
rename from vortex/src/main/java/io/vortex/android/VortexSingleStateViewModelImpl.kt
rename to vanite/src/main/java/io/vanite/android/VaniteSingleStateViewModelImpl.kt
index 10fda5a..e76a37b 100644
--- a/vortex/src/main/java/io/vortex/android/VortexSingleStateViewModelImpl.kt
+++ b/vanite/src/main/java/io/vanite/android/VaniteSingleStateViewModelImpl.kt
@@ -1,12 +1,12 @@
-package io.vortex.android
+package io.vanite.android
import androidx.lifecycle.MutableLiveData
import io.reactivex.disposables.Disposable
-import io.vortex.android.rx.VortexRxRepository
-import io.vortex.android.state.VortexLoadingState
-import io.vortex.android.state.VortexState
+import io.vanite.android.rx.VaniteRxRepository
+import io.vanite.android.state.VaniteLoadingState
+import io.vanite.android.state.VaniteState
-interface VortexSingleStateViewModelImpl {
+interface VaniteSingleStateViewModelImpl {
suspend fun execute(newAction: Any)
@@ -18,8 +18,8 @@ interface VortexSingleStateViewModelImpl {
fun getStateHandler(): MutableLiveData
- fun getLoadingStateHandler(): MutableLiveData
+ fun getLoadingStateHandler(): MutableLiveData
- fun getRxRepository(): VortexRxRepository
+ fun getRxRepository(): VaniteRxRepository
}
diff --git a/vortex/src/main/java/io/vortex/android/VortexViewModelType.kt b/vanite/src/main/java/io/vanite/android/VaniteViewModelType.kt
similarity index 60%
rename from vortex/src/main/java/io/vortex/android/VortexViewModelType.kt
rename to vanite/src/main/java/io/vanite/android/VaniteViewModelType.kt
index 38b2270..0bfc9fb 100644
--- a/vortex/src/main/java/io/vortex/android/VortexViewModelType.kt
+++ b/vanite/src/main/java/io/vanite/android/VaniteViewModelType.kt
@@ -1,7 +1,7 @@
-package io.vortex.android
+package io.vanite.android
/**
* This Method Used To Tell Views That This Type of Object is Implementing One of ViewModels Types
- * From Vortex
+ * From Vanite
*/
-interface VortexViewModelType
+interface VaniteViewModelType
diff --git a/vortex/src/main/java/io/vortex/android/VortexViewModelsBaseImplementation.kt b/vanite/src/main/java/io/vanite/android/VaniteViewModelsBaseImplementation.kt
similarity index 72%
rename from vortex/src/main/java/io/vortex/android/VortexViewModelsBaseImplementation.kt
rename to vanite/src/main/java/io/vanite/android/VaniteViewModelsBaseImplementation.kt
index 3c7fe24..f46f62c 100644
--- a/vortex/src/main/java/io/vortex/android/VortexViewModelsBaseImplementation.kt
+++ b/vanite/src/main/java/io/vanite/android/VaniteViewModelsBaseImplementation.kt
@@ -1,10 +1,10 @@
-package io.vortex.android
+package io.vanite.android
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import io.reactivex.disposables.Disposable
-import io.vortex.android.state.VortexLoadingState
-import io.vortex.android.state.VortexState
+import io.vanite.android.state.VaniteLoadingState
+import io.vanite.android.state.VaniteState
/**
* Created By : Yazan Tarifi
@@ -12,7 +12,7 @@ import io.vortex.android.state.VortexState
* Time : 3:47 AM
*/
-interface VortexRxReducer {
+interface VaniteRxReducer {
suspend fun execute(newAction: Action)
@@ -30,7 +30,7 @@ interface VortexRxReducer {
}
-interface VortexMultiViewModelImpl {
+interface VaniteMultiViewModelImpl {
suspend fun execute(newAction: Action)
@@ -44,6 +44,6 @@ interface VortexMultiViewModelImpl {
suspend fun getState(): LiveData
- suspend fun getLoadingState(): MutableLiveData
+ suspend fun getLoadingState(): MutableLiveData
}
diff --git a/vortex/src/main/java/io/vortex/android/base/VortexIndirectViewModel.kt b/vanite/src/main/java/io/vanite/android/base/VaniteIndirectViewModel.kt
similarity index 68%
rename from vortex/src/main/java/io/vortex/android/base/VortexIndirectViewModel.kt
rename to vanite/src/main/java/io/vanite/android/base/VaniteIndirectViewModel.kt
index f19fa7b..cfd89ea 100644
--- a/vortex/src/main/java/io/vortex/android/base/VortexIndirectViewModel.kt
+++ b/vanite/src/main/java/io/vanite/android/base/VaniteIndirectViewModel.kt
@@ -1,19 +1,19 @@
-package io.vortex.android.base
+package io.vanite.android.base
import androidx.lifecycle.MutableLiveData
-import io.vortex.android.VortexIndirectViewModelImpl
-import io.vortex.android.VortexViewModelType
+import io.vanite.android.VaniteIndirectViewModelImpl
+import io.vanite.android.VaniteViewModelType
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
/**
- * VortexViewModel Class (One of Supported ViewModels)
+ * VaniteViewModel Class (One of Supported ViewModels)
* Used to ViewModels That only Needs to Manage State Without Actions
*
- * Note: Full Implementation of An Vortex ViewModel With State, Action, RxJava is Available at @see VortexViewModel
+ * Note: Full Implementation of An Vanite ViewModel With State, Action, RxJava is Available at @see VaniteViewModel
*/
-abstract class VortexIndirectViewModel : VortexPureViewModel(), VortexIndirectViewModelImpl,
- VortexViewModelType {
+abstract class VaniteIndirectViewModel : VanitePureViewModel(), VaniteIndirectViewModelImpl,
+ VaniteViewModelType {
private val state: MutableLiveData by lazy {
MutableLiveData()
diff --git a/vortex/src/main/java/io/vortex/android/base/VortexMultiViewModel.kt b/vanite/src/main/java/io/vanite/android/base/VaniteMultiViewModel.kt
similarity index 64%
rename from vortex/src/main/java/io/vortex/android/base/VortexMultiViewModel.kt
rename to vanite/src/main/java/io/vanite/android/base/VaniteMultiViewModel.kt
index 2a907cc..1c3463d 100644
--- a/vortex/src/main/java/io/vortex/android/base/VortexMultiViewModel.kt
+++ b/vanite/src/main/java/io/vanite/android/base/VaniteMultiViewModel.kt
@@ -1,13 +1,13 @@
-package io.vortex.android.base
+package io.vanite.android.base
import androidx.lifecycle.*
import io.reactivex.disposables.Disposable
-import io.vortex.android.VortexAction
-import io.vortex.android.VortexMultiViewModelImpl
-import io.vortex.android.VortexViewModelType
-import io.vortex.android.rx.VortexRxRepository
-import io.vortex.android.state.VortexLoadingState
-import io.vortex.android.state.VortexState
+import io.vanite.android.VaniteAction
+import io.vanite.android.VaniteMultiViewModelImpl
+import io.vanite.android.VaniteViewModelType
+import io.vanite.android.rx.VaniteRxRepository
+import io.vanite.android.state.VaniteLoadingState
+import io.vanite.android.state.VaniteState
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
@@ -17,21 +17,21 @@ import java.lang.Exception
* This ViewModel Used When You Want to add Multiple MutableLiveData Inside MediatorLiveData
* The Current State Will be MediatorLiveData To Hold More Than One State Per Screen
*
- * Note: Full Implementation of An Vortex ViewModel With State, Action, RxJava is Available at @see VortexViewModel
+ * Note: Full Implementation of An Vanite ViewModel With State, Action, RxJava is Available at @see VaniteViewModel
*/
-abstract class VortexMultiViewModel : ViewModel(), VortexMultiViewModelImpl,
- VortexViewModelType {
+abstract class VaniteMultiViewModel : ViewModel(), VaniteMultiViewModelImpl,
+ VaniteViewModelType {
private val state: MediatorLiveData by lazy {
MediatorLiveData()
}
- private val repository: VortexRxRepository by lazy {
- VortexRxRepository()
+ private val repository: VaniteRxRepository by lazy {
+ VaniteRxRepository()
}
- private val loadingState: MutableLiveData by lazy {
- MutableLiveData()
+ private val loadingState: MutableLiveData by lazy {
+ MutableLiveData()
}
override suspend fun acceptNewState(newState: LiveData) {
@@ -44,11 +44,11 @@ abstract class VortexMultiViewModel :
override suspend fun acceptLoadingState(newState: Boolean) {
withContext(Dispatchers.IO) {
- loadingState.postValue(VortexLoadingState(newState))
+ loadingState.postValue(VaniteLoadingState(newState))
}
}
- override suspend fun getLoadingState(): MutableLiveData {
+ override suspend fun getLoadingState(): MutableLiveData {
return withContext(Dispatchers.IO) {
loadingState
}
diff --git a/vanite/src/main/java/io/vanite/android/base/VanitePureViewModel.kt b/vanite/src/main/java/io/vanite/android/base/VanitePureViewModel.kt
new file mode 100644
index 0000000..8e68511
--- /dev/null
+++ b/vanite/src/main/java/io/vanite/android/base/VanitePureViewModel.kt
@@ -0,0 +1,42 @@
+package io.vanite.android.base
+
+import androidx.lifecycle.ViewModel
+import io.reactivex.disposables.Disposable
+import io.vanite.android.VaniteViewModelType
+import io.vanite.android.rx.VaniteRxRepository
+
+/**
+ * This ViewModel Type Used To Handle Api's Without Any State Saved or The State Will be Managed
+ * By The Sub Class
+ *
+ * This ViewModel Only Managed VaniteRxRepository With RxJava Requests
+ * Note: Full Implementation of An Vanite ViewModel With State, Action, RxJava is Available at @see VaniteViewModel
+ */
+abstract class VanitePureViewModel : ViewModel(), VanitePureViewModelImpl, VaniteViewModelType {
+
+ private val repository: VaniteRxRepository by lazy {
+ VaniteRxRepository()
+ }
+
+ override fun getRxRepository(): VaniteRxRepository {
+ return repository
+ }
+
+ override fun addRxRequest(request: Disposable) {
+ getRxRepository().addRequest(request)
+ }
+
+ override fun onCleared() {
+ getRxRepository().clearRepository()
+ super.onCleared()
+ }
+
+}
+
+interface VanitePureViewModelImpl {
+
+ fun getRxRepository(): VaniteRxRepository
+
+ fun addRxRequest(request: Disposable)
+
+}
diff --git a/vortex/src/main/java/io/vortex/android/base/VortexSingleLiveData.kt b/vanite/src/main/java/io/vanite/android/base/VaniteSingleLiveData.kt
similarity index 88%
rename from vortex/src/main/java/io/vortex/android/base/VortexSingleLiveData.kt
rename to vanite/src/main/java/io/vanite/android/base/VaniteSingleLiveData.kt
index 94b29aa..fbc2de8 100644
--- a/vortex/src/main/java/io/vortex/android/base/VortexSingleLiveData.kt
+++ b/vanite/src/main/java/io/vanite/android/base/VaniteSingleLiveData.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.base
+package io.vanite.android.base
import android.util.Log
import androidx.annotation.MainThread
@@ -7,7 +7,7 @@ import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.Observer
import java.util.concurrent.atomic.AtomicBoolean
-class VortexSingleLiveData : MutableLiveData() {
+class VaniteSingleLiveData : MutableLiveData() {
private val pending = AtomicBoolean(false)
@@ -39,7 +39,7 @@ class VortexSingleLiveData : MutableLiveData() {
}
companion object {
- private val TAG = "VortexSingleLiveData"
+ private val TAG = "VaniteSingleLiveData"
}
}
\ No newline at end of file
diff --git a/vortex/src/main/java/io/vortex/android/base/VortexSingleStateViewModel.kt b/vanite/src/main/java/io/vanite/android/base/VaniteSingleStateViewModel.kt
similarity index 54%
rename from vortex/src/main/java/io/vortex/android/base/VortexSingleStateViewModel.kt
rename to vanite/src/main/java/io/vanite/android/base/VaniteSingleStateViewModel.kt
index 7addaba..41752b4 100644
--- a/vortex/src/main/java/io/vortex/android/base/VortexSingleStateViewModel.kt
+++ b/vanite/src/main/java/io/vanite/android/base/VaniteSingleStateViewModel.kt
@@ -1,36 +1,36 @@
-package io.vortex.android.base
+package io.vanite.android.base
import androidx.lifecycle.MediatorLiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import io.reactivex.disposables.Disposable
-import io.vortex.android.VortexSingleStateViewModelImpl
-import io.vortex.android.VortexViewModelType
-import io.vortex.android.rx.VortexRxRepository
-import io.vortex.android.state.VortexLoadingState
-import io.vortex.android.state.VortexState
+import io.vanite.android.VaniteSingleStateViewModelImpl
+import io.vanite.android.VaniteViewModelType
+import io.vanite.android.rx.VaniteRxRepository
+import io.vanite.android.state.VaniteLoadingState
+import io.vanite.android.state.VaniteState
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
/**
* This ViewModel Used To Create ViewModel With Only State, Without Actions To ViewModel
- * Not Recommended To Use But It's Option Available in Vortex
+ * Not Recommended To Use But It's Option Available in Vanite
*
- * Note: Full Implementation of An Vortex ViewModel With State, Action, RxJava is Available at @see VortexViewModel
+ * Note: Full Implementation of An Vanite ViewModel With State, Action, RxJava is Available at @see VaniteViewModel
*/
-abstract class VortexSingleStateViewModel : ViewModel(), VortexSingleStateViewModelImpl,
- VortexViewModelType {
+abstract class VaniteSingleStateViewModel : ViewModel(), VaniteSingleStateViewModelImpl,
+ VaniteViewModelType {
private val state: MediatorLiveData by lazy {
MediatorLiveData()
}
- private val repository: VortexRxRepository by lazy {
- VortexRxRepository()
+ private val repository: VaniteRxRepository by lazy {
+ VaniteRxRepository()
}
- private val loadingState: MutableLiveData by lazy {
- MutableLiveData()
+ private val loadingState: MutableLiveData by lazy {
+ MutableLiveData()
}
override suspend fun acceptNewState(newState: State) {
@@ -41,7 +41,7 @@ abstract class VortexSingleStateViewModel : ViewModel(), Vo
override suspend fun acceptLoadingState(newState: Boolean) {
withContext(Dispatchers.IO) {
- getLoadingStateHandler().postValue(VortexLoadingState(newState))
+ getLoadingStateHandler().postValue(VaniteLoadingState(newState))
}
}
@@ -55,11 +55,11 @@ abstract class VortexSingleStateViewModel : ViewModel(), Vo
return state
}
- override fun getLoadingStateHandler(): MutableLiveData {
+ override fun getLoadingStateHandler(): MutableLiveData {
return loadingState
}
- override fun getRxRepository(): VortexRxRepository {
+ override fun getRxRepository(): VaniteRxRepository {
return repository
}
diff --git a/vortex/src/main/java/io/vortex/android/base/VortexViewModel.kt b/vanite/src/main/java/io/vanite/android/base/VaniteViewModel.kt
similarity index 84%
rename from vortex/src/main/java/io/vortex/android/base/VortexViewModel.kt
rename to vanite/src/main/java/io/vanite/android/base/VaniteViewModel.kt
index 0b9adf7..9c16b06 100644
--- a/vortex/src/main/java/io/vortex/android/base/VortexViewModel.kt
+++ b/vanite/src/main/java/io/vanite/android/base/VaniteViewModel.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.base
+package io.vanite.android.base
import android.content.Context
import android.net.ConnectivityManager
@@ -7,13 +7,13 @@ import androidx.lifecycle.ViewModel
import io.reactivex.Observable
import io.reactivex.disposables.Disposable
import io.reactivex.schedulers.Schedulers
-import io.vortex.android.VortexAction
-import io.vortex.android.VortexNetworkListener
-import io.vortex.android.VortexRxReducer
-import io.vortex.android.VortexViewModelType
-import io.vortex.android.rx.VortexRxRepository
-import io.vortex.android.state.VortexLoadingState
-import io.vortex.android.state.VortexState
+import io.vanite.android.VaniteAction
+import io.vanite.android.VaniteNetworkListener
+import io.vanite.android.VaniteRxReducer
+import io.vanite.android.VaniteViewModelType
+import io.vanite.android.rx.VaniteRxRepository
+import io.vanite.android.state.VaniteLoadingState
+import io.vanite.android.state.VaniteState
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
@@ -24,7 +24,7 @@ import kotlinx.coroutines.withContext
*/
/**
- * VortexViewModel is the initial point at application logic
+ * VaniteViewModel is the initial point at application logic
* this class should always notify the View about his state because (The View) at application don't know abything
* about application just apply the incoming state from ViewModel To View
*
@@ -44,8 +44,8 @@ import kotlinx.coroutines.withContext
*
* Each Method At ViewModel executed On Background Thread And The View Handler Should Apply The Result On Main Thread
*/
-abstract class VortexViewModel : ViewModel(),
- VortexRxReducer, VortexViewModelType {
+abstract class VaniteViewModel : ViewModel(),
+ VaniteRxReducer, VaniteViewModelType {
/**
* This State Here is to notify the view that you should start show loading to the user
@@ -53,8 +53,8 @@ abstract class VortexViewModel : Vie
*
* Here you should implement onLoadingStateListener that provide you the viewModel status
*/
- private val loadingState: MutableLiveData by lazy {
- MutableLiveData()
+ private val loadingState: MutableLiveData by lazy {
+ MutableLiveData()
}
/**
@@ -75,7 +75,7 @@ abstract class VortexViewModel : Vie
*
* THis Case using just for Application using Internet At Each Screen With Realtime Operations
*/
- private var networkLister: VortexNetworkListener? = null
+ private var networkLister: VaniteNetworkListener? = null
/**
* At Data Layer THere are An Observables Each Observable always listening to The Target
@@ -84,8 +84,8 @@ abstract class VortexViewModel : Vie
*
* At This Case Observable is not important anymore and should UnSubscribe Them
*/
- private val repo: VortexRxRepository by lazy {
- VortexRxRepository()
+ private val repo: VaniteRxRepository by lazy {
+ VaniteRxRepository()
}
/**
@@ -103,7 +103,7 @@ abstract class VortexViewModel : Vie
*/
override suspend fun acceptLoadingState(newState: Boolean) {
withContext(Dispatchers.IO) {
- loadingState.postValue(VortexLoadingState(newState))
+ loadingState.postValue(VaniteLoadingState(newState))
}
}
@@ -168,15 +168,15 @@ abstract class VortexViewModel : Vie
return stateObserver
}
- fun getLoadingStateHandler(): MutableLiveData {
+ fun getLoadingStateHandler(): MutableLiveData {
return loadingState
}
- fun attachNetworkListener(networkListener: VortexNetworkListener) {
+ fun attachNetworkListener(networkListener: VaniteNetworkListener) {
this.networkLister = networkListener
}
- fun getRxRepository(): VortexRxRepository {
+ fun getRxRepository(): VaniteRxRepository {
return repo
}
@@ -188,7 +188,7 @@ abstract class VortexViewModel : Vie
suspend fun handleStateWithLoading(state: State) {
withContext(Dispatchers.IO) {
stateObserver.postValue(state)
- loadingState.postValue(VortexLoadingState(false))
+ loadingState.postValue(VaniteLoadingState(false))
}
}
diff --git a/vortex/src/main/java/io/vortex/android/base/VortexViewModelReadyState.kt b/vanite/src/main/java/io/vanite/android/base/VaniteViewModelReadyState.kt
similarity index 69%
rename from vortex/src/main/java/io/vortex/android/base/VortexViewModelReadyState.kt
rename to vanite/src/main/java/io/vanite/android/base/VaniteViewModelReadyState.kt
index aba7ca1..cdc5a24 100644
--- a/vortex/src/main/java/io/vortex/android/base/VortexViewModelReadyState.kt
+++ b/vanite/src/main/java/io/vanite/android/base/VaniteViewModelReadyState.kt
@@ -1,24 +1,24 @@
-package io.vortex.android.base
+package io.vanite.android.base
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import io.reactivex.disposables.Disposable
-import io.vortex.android.VortexModelStateImpl
-import io.vortex.android.VortexViewModelType
-import io.vortex.android.keys.VortexViewModelState
-import io.vortex.android.rx.VortexRxRepository
+import io.vanite.android.VaniteModelStateImpl
+import io.vanite.android.VaniteViewModelType
+import io.vanite.android.keys.VaniteViewModelState
+import io.vanite.android.rx.VaniteRxRepository
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
/**
* This ViewModel Type Used When You want to Build ViewModel Without Passing Specific State to it
- * this one can handle Any State that Extends VortexViewModelState in the Application
+ * this one can handle Any State that Extends VaniteViewModelState in the Application
* This Will Reduce A lot of Classes if you want to Build ViewModel For Each State
* One Can Handle all Stats
*
- * Note: Full Implementation of An Vortex ViewModel With State, Action, RxJava is Available at @see VortexViewModel
+ * Note: Full Implementation of An Vanite ViewModel With State, Action, RxJava is Available at @see VaniteViewModel
*/
-abstract class VortexViewModelReadyState : ViewModel(), VortexModelStateImpl, VortexViewModelType {
+abstract class VaniteViewModelReadyState : ViewModel(), VaniteModelStateImpl, VaniteViewModelType {
/**
* State Handler Type
@@ -26,14 +26,14 @@ abstract class VortexViewModelReadyState : ViewModel(), VortexModelStateImpl, Vo
* Use This Type Of ViewModel State When You Just Want THis Kind Of State Implementation
* Without that Hard Logic When You Reflect The Data From ViewModel To View
*
- * Vortex Default State Handler you must declare each State With Response Type, Items
+ * Vanite Default State Handler you must declare each State With Response Type, Items
* And You can Send The Result via State to View
* that's th problem you always creating new Class For Each State Handling
* but we can just use this kind of State Handler with Common logic at each Screen
* THe Common cases at each screen -> {LOADING, EMPTY, SUCCESS, ERROR}
*/
- private val state: MutableLiveData by lazy {
- MutableLiveData()
+ private val state: MutableLiveData by lazy {
+ MutableLiveData()
}
/**
@@ -43,15 +43,15 @@ abstract class VortexViewModelReadyState : ViewModel(), VortexModelStateImpl, Vo
*
* At This Case Observable is not important anymore and should UnSubscribe Them
*/
- private val repo: VortexRxRepository by lazy {
- VortexRxRepository()
+ private val repo: VaniteRxRepository by lazy {
+ VaniteRxRepository()
}
/**
* Here you can easily send a new state to View With The Following Provided State
* The Available States -> {LOADING, ERROR, SUCCESS, EMPTY}
*/
- override suspend fun acceptNewState(newState: VortexViewModelState) {
+ override suspend fun acceptNewState(newState: VaniteViewModelState) {
withContext(Dispatchers.IO) {
state.postValue(newState)
}
@@ -69,15 +69,15 @@ abstract class VortexViewModelReadyState : ViewModel(), VortexModelStateImpl, Vo
}
}
- override fun getRepositoryHandler(): VortexRxRepository {
+ override fun getRepositoryHandler(): VaniteRxRepository {
return repo
}
- override fun getCurrentViewModelState(): VortexViewModelState? {
+ override fun getCurrentViewModelState(): VaniteViewModelState? {
return state.value
}
- override fun getStateHandler(): MutableLiveData {
+ override fun getStateHandler(): MutableLiveData {
return state
}
diff --git a/vanite/src/main/java/io/vanite/android/base/VaniteViewModelResult.kt b/vanite/src/main/java/io/vanite/android/base/VaniteViewModelResult.kt
new file mode 100644
index 0000000..ccac434
--- /dev/null
+++ b/vanite/src/main/java/io/vanite/android/base/VaniteViewModelResult.kt
@@ -0,0 +1,25 @@
+package io.vanite.android.base
+
+import io.vanite.android.VaniteAction
+import io.vanite.android.VaniteViewModelType
+import io.vanite.android.rx.VaniteRequestProvider
+import io.vanite.android.state.VaniteState
+
+/**
+ * Created By : Yazan Tarifi
+ * Date : 10/13/2019
+ * Time : 2:15 PM
+ */
+
+/**
+ * This ViewModel Type Used To Build ViewModel With Specific Api Response and Access
+ * VaniteRequestProvider Directly Without Create it from Sub Class
+ *
+ * Note: Full Implementation of An Vanite ViewModel With State, Action, RxJava is Available at @see VaniteViewModel
+ */
+abstract class VaniteViewModelResult : VaniteViewModel(),
+ VaniteViewModelType {
+
+ protected fun getRequestProvider(): VaniteRequestProvider = VaniteRequestProvider()
+
+}
diff --git a/vortex/src/main/java/io/vortex/android/details/VortexFirebaseDetailsException.kt b/vanite/src/main/java/io/vanite/android/details/VaniteFirebaseDetailsException.kt
similarity index 64%
rename from vortex/src/main/java/io/vortex/android/details/VortexFirebaseDetailsException.kt
rename to vanite/src/main/java/io/vanite/android/details/VaniteFirebaseDetailsException.kt
index 943ab73..3ffe3ed 100644
--- a/vortex/src/main/java/io/vortex/android/details/VortexFirebaseDetailsException.kt
+++ b/vanite/src/main/java/io/vanite/android/details/VaniteFirebaseDetailsException.kt
@@ -1,6 +1,6 @@
-package io.vortex.android.details
+package io.vanite.android.details
-import io.vortex.android.models.VortexExceptionDetails
+import io.vanite.android.models.VaniteExceptionDetails
/**
* Created By : Yazan Tarifi
@@ -8,10 +8,10 @@ import io.vortex.android.models.VortexExceptionDetails
* Time : 1:25 AM
*/
-data class VortexFirebaseDetailsException(
+data class VaniteFirebaseDetailsException(
val message: String,
val body: FirebaseAppException
-) : VortexExceptionDetails {
+) : VaniteExceptionDetails {
override fun getExceptionMessage(): String = message
override fun getExceptionBody(): FirebaseAppException = body
}
diff --git a/vortex/src/main/java/io/vortex/android/details/VortexPrefsDetailsException.kt b/vanite/src/main/java/io/vanite/android/details/VanitePrefsDetailsException.kt
similarity index 58%
rename from vortex/src/main/java/io/vortex/android/details/VortexPrefsDetailsException.kt
rename to vanite/src/main/java/io/vanite/android/details/VanitePrefsDetailsException.kt
index 11f96d2..2f7a092 100644
--- a/vortex/src/main/java/io/vortex/android/details/VortexPrefsDetailsException.kt
+++ b/vanite/src/main/java/io/vanite/android/details/VanitePrefsDetailsException.kt
@@ -1,6 +1,6 @@
-package io.vortex.android.details
+package io.vanite.android.details
-import io.vortex.android.models.VortexExceptionDetails
+import io.vanite.android.models.VaniteExceptionDetails
/**
* Created By : Yazan Tarifi
@@ -8,15 +8,15 @@ import io.vortex.android.models.VortexExceptionDetails
* Time : 1:40 AM
*/
-class VortexPrefsDetailsException(
+class VanitePrefsDetailsException(
val message: String,
val body: Reason
-) : VortexExceptionDetails {
+) : VaniteExceptionDetails {
override fun getExceptionMessage(): String = message
override fun getExceptionBody(): Reason = body
}
-data class VortexPrefsDetails(
+data class VanitePrefsDetails(
val path: String,
val fullReason: String
)
\ No newline at end of file
diff --git a/vanite/src/main/java/io/vanite/android/errors/VaniteContextException.kt b/vanite/src/main/java/io/vanite/android/errors/VaniteContextException.kt
new file mode 100644
index 0000000..0dabdbe
--- /dev/null
+++ b/vanite/src/main/java/io/vanite/android/errors/VaniteContextException.kt
@@ -0,0 +1,11 @@
+package io.vanite.android.errors
+
+import io.vanite.android.models.VaniteExceptionDetails
+
+/**
+ * Created By : Yazan Tarifi
+ * Date : 10/9/2019
+ * Time : 9:00 PM
+ */
+
+class VaniteContextException(details: VaniteExceptionDetails<*>) : VaniteException(details)
diff --git a/vortex/src/main/java/io/vortex/android/errors/VortexException.kt b/vanite/src/main/java/io/vanite/android/errors/VaniteException.kt
similarity index 67%
rename from vortex/src/main/java/io/vortex/android/errors/VortexException.kt
rename to vanite/src/main/java/io/vanite/android/errors/VaniteException.kt
index cc46067..0b7e7f2 100644
--- a/vortex/src/main/java/io/vortex/android/errors/VortexException.kt
+++ b/vanite/src/main/java/io/vanite/android/errors/VaniteException.kt
@@ -1,6 +1,6 @@
-package io.vortex.android.errors
+package io.vanite.android.errors
-import io.vortex.android.models.VortexExceptionDetails
+import io.vanite.android.models.VaniteExceptionDetails
/**
* Created By : Yazan Tarifi
@@ -9,18 +9,18 @@ import io.vortex.android.models.VortexExceptionDetails
*/
/**
- * This Exception is the base exception for all errors at vortex library to log the exception details at logcat
+ * This Exception is the base exception for all errors at Vanite library to log the exception details at logcat
*/
-open class VortexException(details: VortexExceptionDetails<*>) : RuntimeException(details.getExceptionMessage()) {
+open class VaniteException(details: VaniteExceptionDetails<*>) : RuntimeException(details.getExceptionMessage()) {
init {
println(
"""
${repeatDash()}
- Vortex Exception Started ...
+ Vanite Exception Started ...
Exception Message : ${details.getExceptionMessage()}
Exception Body : ${details.getExceptionBody().toString()}
Exception Stacktrace : ${this.printStackTrace()}
- Vortex Exception End ...
+ Vanite Exception End ...
${repeatDash()}
""".trimIndent()
)
diff --git a/vanite/src/main/java/io/vanite/android/errors/VaniteFirebaseConfigurationException.kt b/vanite/src/main/java/io/vanite/android/errors/VaniteFirebaseConfigurationException.kt
new file mode 100644
index 0000000..e725c03
--- /dev/null
+++ b/vanite/src/main/java/io/vanite/android/errors/VaniteFirebaseConfigurationException.kt
@@ -0,0 +1,11 @@
+package io.vanite.android.errors
+
+import io.vanite.android.models.VaniteExceptionDetails
+
+/**
+ * Created By : Yazan Tarifi
+ * Date : 10/9/2019
+ * Time : 9:01 PM
+ */
+
+class VaniteFirebaseConfigurationException(details: VaniteExceptionDetails<*>) : VaniteException(details)
diff --git a/vanite/src/main/java/io/vanite/android/errors/VaniteInvalidValueException.kt b/vanite/src/main/java/io/vanite/android/errors/VaniteInvalidValueException.kt
new file mode 100644
index 0000000..c451ed1
--- /dev/null
+++ b/vanite/src/main/java/io/vanite/android/errors/VaniteInvalidValueException.kt
@@ -0,0 +1,11 @@
+package io.vanite.android.errors
+
+import io.vanite.android.models.VaniteExceptionDetails
+
+/**
+ * Created By : Yazan Tarifi
+ * Date : 10/9/2019
+ * Time : 9:01 PM
+ */
+
+class VaniteInvalidValueException(details: VaniteExceptionDetails<*>) : VaniteException(details)
diff --git a/vanite/src/main/java/io/vanite/android/errors/VaniteOperationBlockedException.kt b/vanite/src/main/java/io/vanite/android/errors/VaniteOperationBlockedException.kt
new file mode 100644
index 0000000..3795147
--- /dev/null
+++ b/vanite/src/main/java/io/vanite/android/errors/VaniteOperationBlockedException.kt
@@ -0,0 +1,11 @@
+package io.vanite.android.errors
+
+import io.vanite.android.models.VaniteExceptionDetails
+
+/**
+ * Created By : Yazan Tarifi
+ * Date : 10/9/2019
+ * Time : 8:56 PM
+ */
+
+class VaniteOperationBlockedException(details: VaniteExceptionDetails<*>) : VaniteException(details)
diff --git a/vanite/src/main/java/io/vanite/android/errors/VanitePlatformMissingException.kt b/vanite/src/main/java/io/vanite/android/errors/VanitePlatformMissingException.kt
new file mode 100644
index 0000000..66a7ab6
--- /dev/null
+++ b/vanite/src/main/java/io/vanite/android/errors/VanitePlatformMissingException.kt
@@ -0,0 +1,11 @@
+package io.vanite.android.errors
+
+import io.vanite.android.models.VaniteExceptionDetails
+
+/**
+ * Created By : Yazan Tarifi
+ * Date : 10/9/2019
+ * Time : 9:00 PM
+ */
+
+class VanitePlatformMissingException(details: VaniteExceptionDetails<*>) : VaniteException(details)
diff --git a/vortex/src/main/java/io/vortex/android/errors/VortexPrefsException.kt b/vanite/src/main/java/io/vanite/android/errors/VanitePrefsException.kt
similarity index 55%
rename from vortex/src/main/java/io/vortex/android/errors/VortexPrefsException.kt
rename to vanite/src/main/java/io/vanite/android/errors/VanitePrefsException.kt
index c59110f..5846107 100644
--- a/vortex/src/main/java/io/vortex/android/errors/VortexPrefsException.kt
+++ b/vanite/src/main/java/io/vanite/android/errors/VanitePrefsException.kt
@@ -1,6 +1,6 @@
-package io.vortex.android.errors
+package io.vanite.android.errors
-import io.vortex.android.models.VortexExceptionDetails
+import io.vanite.android.models.VaniteExceptionDetails
/**
* Created By : Yazan Tarifi
@@ -8,14 +8,14 @@ import io.vortex.android.models.VortexExceptionDetails
* Time : 2:52 PM
*/
-class VortexPrefsException : VortexException(object : VortexExceptionDetails {
+class VanitePrefsException : VaniteException(object : VaniteExceptionDetails {
override fun getExceptionMessage(): String {
- return "Maybe You Forget To Config The Prefs At VortexApplication"
+ return "Maybe You Forget To Config The Prefs At VaniteApplication"
}
override fun getExceptionBody(): PrefsException {
return PrefsException(
- "Maybe You Forget To Config The Prefs At VortexApplication"
+ "Maybe You Forget To Config The Prefs At VaniteApplication"
)
}
diff --git a/vanite/src/main/java/io/vanite/android/errors/VanitePrefsNotInitializedException.kt b/vanite/src/main/java/io/vanite/android/errors/VanitePrefsNotInitializedException.kt
new file mode 100644
index 0000000..286daa2
--- /dev/null
+++ b/vanite/src/main/java/io/vanite/android/errors/VanitePrefsNotInitializedException.kt
@@ -0,0 +1,11 @@
+package io.vanite.android.errors
+
+import io.vanite.android.models.VaniteExceptionDetails
+
+/**
+ * Created By : Yazan Tarifi
+ * Date : 10/13/2019
+ * Time : 1:40 AM
+ */
+
+class VanitePrefsNotInitializedException(details: VaniteExceptionDetails<*>) : VaniteException(details)
diff --git a/vortex/src/main/java/io/vortex/android/keys/ImageLoader.kt b/vanite/src/main/java/io/vanite/android/keys/ImageLoader.kt
similarity index 81%
rename from vortex/src/main/java/io/vortex/android/keys/ImageLoader.kt
rename to vanite/src/main/java/io/vanite/android/keys/ImageLoader.kt
index 632a345..8d3a82a 100644
--- a/vortex/src/main/java/io/vortex/android/keys/ImageLoader.kt
+++ b/vanite/src/main/java/io/vanite/android/keys/ImageLoader.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.keys
+package io.vanite.android.keys
/**
* Created By : Yazan Tarifi
diff --git a/vortex/src/main/java/io/vortex/android/keys/LoggerType.kt b/vanite/src/main/java/io/vanite/android/keys/LoggerType.kt
similarity index 64%
rename from vortex/src/main/java/io/vortex/android/keys/LoggerType.kt
rename to vanite/src/main/java/io/vanite/android/keys/LoggerType.kt
index 6fd7163..9e21cd9 100644
--- a/vortex/src/main/java/io/vortex/android/keys/LoggerType.kt
+++ b/vanite/src/main/java/io/vanite/android/keys/LoggerType.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.keys
+package io.vanite.android.keys
/**
* Created By : Yazan Tarifi
@@ -7,5 +7,5 @@ package io.vortex.android.keys
*/
enum class LoggerType {
- TIMBER , VORTEX_LOGGER
+ TIMBER , VANITE_LOGGER
}
\ No newline at end of file
diff --git a/vanite/src/main/java/io/vanite/android/keys/VaniteViewModelState.kt b/vanite/src/main/java/io/vanite/android/keys/VaniteViewModelState.kt
new file mode 100644
index 0000000..1b677ea
--- /dev/null
+++ b/vanite/src/main/java/io/vanite/android/keys/VaniteViewModelState.kt
@@ -0,0 +1,5 @@
+package io.vanite.android.keys
+
+enum class VaniteViewModelState {
+ EMPTY, LOADING, ERROR, SUCCESS
+}
diff --git a/vortex/src/main/java/io/vortex/android/models/VortexAuth.kt b/vanite/src/main/java/io/vanite/android/models/VaniteAuth.kt
similarity index 80%
rename from vortex/src/main/java/io/vortex/android/models/VortexAuth.kt
rename to vanite/src/main/java/io/vanite/android/models/VaniteAuth.kt
index 3515a3c..611659d 100644
--- a/vortex/src/main/java/io/vortex/android/models/VortexAuth.kt
+++ b/vanite/src/main/java/io/vanite/android/models/VaniteAuth.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.models
+package io.vanite.android.models
/**
* Created By : Yazan Tarifi
@@ -7,7 +7,7 @@ package io.vortex.android.models
*/
@Deprecated("Not Used Anymore, Should be Declared in Retrofit Instance Interceptors")
-data class VortexAuth(
+data class VaniteAuth(
var username: String = "",
var password: String = ""
)
diff --git a/vortex/src/main/java/io/vortex/android/models/VortexExceptionDetails.kt b/vanite/src/main/java/io/vanite/android/models/VaniteExceptionDetails.kt
similarity index 67%
rename from vortex/src/main/java/io/vortex/android/models/VortexExceptionDetails.kt
rename to vanite/src/main/java/io/vanite/android/models/VaniteExceptionDetails.kt
index e301aa3..8b61d6a 100644
--- a/vortex/src/main/java/io/vortex/android/models/VortexExceptionDetails.kt
+++ b/vanite/src/main/java/io/vanite/android/models/VaniteExceptionDetails.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.models
+package io.vanite.android.models
/**
* Created By : Yazan Tarifi
@@ -6,7 +6,7 @@ package io.vortex.android.models
* Time : 8:48 PM
*/
-interface VortexExceptionDetails {
+interface VaniteExceptionDetails {
fun getExceptionMessage(): String
diff --git a/vortex/src/main/java/io/vortex/android/models/VortexPrefsDetails.kt b/vanite/src/main/java/io/vanite/android/models/VanitePrefsDetails.kt
similarity index 75%
rename from vortex/src/main/java/io/vortex/android/models/VortexPrefsDetails.kt
rename to vanite/src/main/java/io/vanite/android/models/VanitePrefsDetails.kt
index 12000a5..b1c7fc6 100644
--- a/vortex/src/main/java/io/vortex/android/models/VortexPrefsDetails.kt
+++ b/vanite/src/main/java/io/vanite/android/models/VanitePrefsDetails.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.models
+package io.vanite.android.models
import android.content.ContextWrapper
@@ -8,7 +8,7 @@ import android.content.ContextWrapper
* Time : 10:10 PM
*/
-data class VortexPrefsDetails(
+data class VanitePrefsDetails(
var mode: Int = ContextWrapper.MODE_PRIVATE,
var packageName: String = ""
)
diff --git a/vanite/src/main/java/io/vanite/android/models/VaniteRequestDetails.kt b/vanite/src/main/java/io/vanite/android/models/VaniteRequestDetails.kt
new file mode 100644
index 0000000..2e9851e
--- /dev/null
+++ b/vanite/src/main/java/io/vanite/android/models/VaniteRequestDetails.kt
@@ -0,0 +1,19 @@
+package io.vanite.android.models
+
+import io.vanite.android.models.data.VaniteInterceptorMode
+
+/**
+ * Created By : Yazan Tarifi
+ * Date : 10/13/2019
+ * Time : 1:59 PM
+ */
+
+interface VaniteRequestDetails
+
+data class VaniteRequestDetailsProvider(
+ var token: String = "",
+ var language: String = "",
+ var isLoggingEnabled: Boolean = true,
+ var loggingTag: String = "",
+ var loggingMode: VaniteInterceptorMode = VaniteInterceptorMode.FULL
+) : VaniteRequestDetails
diff --git a/vortex/src/main/java/io/vortex/android/models/data/VortexInterceptorMode.kt b/vanite/src/main/java/io/vanite/android/models/data/VaniteInterceptorMode.kt
similarity index 58%
rename from vortex/src/main/java/io/vortex/android/models/data/VortexInterceptorMode.kt
rename to vanite/src/main/java/io/vanite/android/models/data/VaniteInterceptorMode.kt
index 2a097ec..56985d8 100644
--- a/vortex/src/main/java/io/vortex/android/models/data/VortexInterceptorMode.kt
+++ b/vanite/src/main/java/io/vanite/android/models/data/VaniteInterceptorMode.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.models.data
+package io.vanite.android.models.data
/**
* Created By : Yazan Tarifi
@@ -6,6 +6,6 @@ package io.vortex.android.models.data
* Time : 1:13 PM
*/
-enum class VortexInterceptorMode {
+enum class VaniteInterceptorMode {
NONE, HEADER, FULL
}
\ No newline at end of file
diff --git a/vanite/src/main/java/io/vanite/android/models/data/VaniteRequestController.kt b/vanite/src/main/java/io/vanite/android/models/data/VaniteRequestController.kt
new file mode 100644
index 0000000..f8f5445
--- /dev/null
+++ b/vanite/src/main/java/io/vanite/android/models/data/VaniteRequestController.kt
@@ -0,0 +1,13 @@
+package io.vanite.android.models.data
+
+/**
+ * Created By : Yazan Tarifi
+ * Date : 12/25/2019
+ * Time : 12:35 AM
+ */
+
+data class VaniteRequestController(
+ var loggingMode: VaniteInterceptorMode,
+ var loggingTag: String? = "Vanite Request Logger ",
+ var isLoggingEnabled: Boolean = true
+)
diff --git a/vortex/src/main/java/io/vortex/android/models/ui/VortexAnimationSettings.kt b/vanite/src/main/java/io/vanite/android/models/ui/VaniteAnimationSettings.kt
similarity index 78%
rename from vortex/src/main/java/io/vortex/android/models/ui/VortexAnimationSettings.kt
rename to vanite/src/main/java/io/vanite/android/models/ui/VaniteAnimationSettings.kt
index d42aea6..7bceef3 100644
--- a/vortex/src/main/java/io/vortex/android/models/ui/VortexAnimationSettings.kt
+++ b/vanite/src/main/java/io/vanite/android/models/ui/VaniteAnimationSettings.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.models.ui
+package io.vanite.android.models.ui
import androidx.annotation.DrawableRes
import androidx.annotation.RawRes
@@ -9,7 +9,7 @@ import androidx.annotation.RawRes
* Time : 9:33 PM
*/
-data class VortexAnimationSettings(
+data class VaniteAnimationSettings(
var loopCountAnimation: Int = 1,
@RawRes @DrawableRes var image: Int,
var dp: Float = 200f
diff --git a/vortex/src/main/java/io/vortex/android/models/ui/VortexNotificationDetails.kt b/vanite/src/main/java/io/vanite/android/models/ui/VaniteNotificationDetails.kt
similarity index 68%
rename from vortex/src/main/java/io/vortex/android/models/ui/VortexNotificationDetails.kt
rename to vanite/src/main/java/io/vanite/android/models/ui/VaniteNotificationDetails.kt
index 84d84a4..78ab6fa 100644
--- a/vortex/src/main/java/io/vortex/android/models/ui/VortexNotificationDetails.kt
+++ b/vanite/src/main/java/io/vanite/android/models/ui/VaniteNotificationDetails.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.models.ui
+package io.vanite.android.models.ui
/**
* Created By : Yazan Tarifi
@@ -6,7 +6,7 @@ package io.vortex.android.models.ui
* Time : 9:54 PM
*/
-data class VortexNotificationDetails(
+data class VaniteNotificationDetails(
var name: String = "",
var description: String = "",
var id: String = ""
diff --git a/vortex/src/main/java/io/vortex/android/rx/VortexRequestProvider.kt b/vanite/src/main/java/io/vanite/android/rx/VaniteRequestProvider.kt
similarity index 90%
rename from vortex/src/main/java/io/vortex/android/rx/VortexRequestProvider.kt
rename to vanite/src/main/java/io/vanite/android/rx/VaniteRequestProvider.kt
index 9584894..159c092 100644
--- a/vortex/src/main/java/io/vortex/android/rx/VortexRequestProvider.kt
+++ b/vanite/src/main/java/io/vanite/android/rx/VaniteRequestProvider.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.rx
+package io.vanite.android.rx
import io.reactivex.Flowable
import io.reactivex.Maybe
@@ -11,7 +11,7 @@ import io.reactivex.Single
* Time : 10:54 PM
*/
-class VortexRequestProvider {
+class VaniteRequestProvider {
fun getListObservable(request: Observable>): Observable> {
return request.subscribeOn(getThreadProvider().getBackgroundThread())
@@ -45,6 +45,6 @@ class VortexRequestProvider {
return request.subscribeOn(getThreadProvider().getBackgroundThread())
}
- private fun getThreadProvider(): VortexThreadProvider = object : VortexThreadProvider {}
+ private fun getThreadProvider(): VaniteThreadProvider = object : VaniteThreadProvider {}
}
\ No newline at end of file
diff --git a/vortex/src/main/java/io/vortex/android/rx/VortexRxRepository.kt b/vanite/src/main/java/io/vanite/android/rx/VaniteRxRepository.kt
similarity index 89%
rename from vortex/src/main/java/io/vortex/android/rx/VortexRxRepository.kt
rename to vanite/src/main/java/io/vanite/android/rx/VaniteRxRepository.kt
index 52930ca..71b09e0 100644
--- a/vortex/src/main/java/io/vortex/android/rx/VortexRxRepository.kt
+++ b/vanite/src/main/java/io/vanite/android/rx/VaniteRxRepository.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.rx
+package io.vanite.android.rx
import io.reactivex.disposables.CompositeDisposable
import io.reactivex.disposables.Disposable
@@ -9,7 +9,7 @@ import io.reactivex.disposables.Disposable
* Time : 10:52 PM
*/
-class VortexRxRepository {
+class VaniteRxRepository {
private val repo: CompositeDisposable by lazy {
CompositeDisposable()
diff --git a/vortex/src/main/java/io/vortex/android/rx/VortexThreadProvider.kt b/vanite/src/main/java/io/vanite/android/rx/VaniteThreadProvider.kt
similarity index 84%
rename from vortex/src/main/java/io/vortex/android/rx/VortexThreadProvider.kt
rename to vanite/src/main/java/io/vanite/android/rx/VaniteThreadProvider.kt
index e84b15e..dc7a71a 100644
--- a/vortex/src/main/java/io/vortex/android/rx/VortexThreadProvider.kt
+++ b/vanite/src/main/java/io/vanite/android/rx/VaniteThreadProvider.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.rx
+package io.vanite.android.rx
import io.reactivex.Scheduler
import io.reactivex.android.schedulers.AndroidSchedulers
@@ -10,7 +10,7 @@ import io.reactivex.schedulers.Schedulers
* Time : 9:04 PM
*/
-interface VortexThreadProvider {
+interface VaniteThreadProvider {
fun getMainThread(): Scheduler = AndroidSchedulers.mainThread()
diff --git a/vortex/src/main/java/io/vortex/android/state/VortexEmptyState.kt b/vanite/src/main/java/io/vanite/android/state/VaniteEmptyState.kt
similarity index 53%
rename from vortex/src/main/java/io/vortex/android/state/VortexEmptyState.kt
rename to vanite/src/main/java/io/vanite/android/state/VaniteEmptyState.kt
index 21b53a2..c0f4223 100644
--- a/vortex/src/main/java/io/vortex/android/state/VortexEmptyState.kt
+++ b/vanite/src/main/java/io/vanite/android/state/VaniteEmptyState.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.state
+package io.vanite.android.state
/**
* Created By : Yazan Tarifi
@@ -6,4 +6,4 @@ package io.vortex.android.state
* Time : 12:01 PM
*/
-class VortexEmptyState : VortexState
\ No newline at end of file
+class VaniteEmptyState : VaniteState
\ No newline at end of file
diff --git a/vanite/src/main/java/io/vanite/android/state/VaniteErrorState.kt b/vanite/src/main/java/io/vanite/android/state/VaniteErrorState.kt
new file mode 100644
index 0000000..8508e5c
--- /dev/null
+++ b/vanite/src/main/java/io/vanite/android/state/VaniteErrorState.kt
@@ -0,0 +1,13 @@
+package io.vanite.android.state
+
+import io.vanite.android.errors.VaniteException
+
+/**
+ * Created By : Yazan Tarifi
+ * Date : 10/10/2019
+ * Time : 9:41 PM
+ */
+
+class VaniteErrorState(private val error: VaniteException) : VaniteState {
+ fun getError(): VaniteException = error
+}
diff --git a/vortex/src/main/java/io/vortex/android/state/VortexLoadingState.kt b/vanite/src/main/java/io/vanite/android/state/VaniteLoadingState.kt
similarity index 54%
rename from vortex/src/main/java/io/vortex/android/state/VortexLoadingState.kt
rename to vanite/src/main/java/io/vanite/android/state/VaniteLoadingState.kt
index 0394c7f..10612c6 100644
--- a/vortex/src/main/java/io/vortex/android/state/VortexLoadingState.kt
+++ b/vanite/src/main/java/io/vanite/android/state/VaniteLoadingState.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.state
+package io.vanite.android.state
/**
* Created By : Yazan Tarifi
@@ -6,6 +6,6 @@ package io.vortex.android.state
* Time : 12:01 PM
*/
-class VortexLoadingState(private val loadingState: Boolean) : VortexState {
+class VaniteLoadingState(private val loadingState: Boolean) : VaniteState {
fun getLoadingState(): Boolean = loadingState
}
diff --git a/vortex/src/main/java/io/vortex/android/state/VortexState.kt b/vanite/src/main/java/io/vanite/android/state/VaniteState.kt
similarity index 59%
rename from vortex/src/main/java/io/vortex/android/state/VortexState.kt
rename to vanite/src/main/java/io/vanite/android/state/VaniteState.kt
index 6072039..a7c84b4 100644
--- a/vortex/src/main/java/io/vortex/android/state/VortexState.kt
+++ b/vanite/src/main/java/io/vanite/android/state/VaniteState.kt
@@ -1,4 +1,4 @@
-package io.vortex.android.state
+package io.vanite.android.state
/**
* Created By : Yazan Tarifi
@@ -6,4 +6,4 @@ package io.vortex.android.state
* Time : 3:46 AM
*/
-interface VortexState
+interface VaniteState
diff --git a/vortex-data/src/androidTest/java/io/vortex/android/data/ExampleInstrumentedTest.kt b/vortex-data/src/androidTest/java/io/vortex/android/data/ExampleInstrumentedTest.kt
deleted file mode 100644
index 5a211f2..0000000
--- a/vortex-data/src/androidTest/java/io/vortex/android/data/ExampleInstrumentedTest.kt
+++ /dev/null
@@ -1,24 +0,0 @@
-package io.vortex.android.data
-
-import androidx.test.platform.app.InstrumentationRegistry
-import androidx.test.ext.junit.runners.AndroidJUnit4
-
-import org.junit.Test
-import org.junit.runner.RunWith
-
-import org.junit.Assert.*
-
-/**
- * Instrumented test, which will execute on an Android device.
- *
- * See [testing documentation](http://d.android.com/tools/testing).
- */
-@RunWith(AndroidJUnit4::class)
-class ExampleInstrumentedTest {
- @Test
- fun useAppContext() {
- // Context of the app under test.
- val appContext = InstrumentationRegistry.getInstrumentation().targetContext
- assertEquals("io.vortex.android.data.test", appContext.packageName)
- }
-}
diff --git a/vortex-data/src/main/java/io/vortex/android/data/memory/VortexMemoryListener.kt b/vortex-data/src/main/java/io/vortex/android/data/memory/VortexMemoryListener.kt
deleted file mode 100644
index 2afb724..0000000
--- a/vortex-data/src/main/java/io/vortex/android/data/memory/VortexMemoryListener.kt
+++ /dev/null
@@ -1,7 +0,0 @@
-package io.vortex.android.data.memory
-
-interface VortexMemoryListener {
-
- fun acceptMemoryKeys(items: HashMap)
-
-}
diff --git a/vortex-data/src/main/java/io/vortex/android/data/utils/VortexMapper.kt b/vortex-data/src/main/java/io/vortex/android/data/utils/VortexMapper.kt
deleted file mode 100644
index 34ee455..0000000
--- a/vortex-data/src/main/java/io/vortex/android/data/utils/VortexMapper.kt
+++ /dev/null
@@ -1,9 +0,0 @@
-package io.vortex.android.data.utils
-
-interface VortexMapper {
-
- fun from(to: To): From
-
- fun to(from: From): To
-
-}
diff --git a/vortex-data/src/main/java/io/vortex/android/data/utils/VortexOneWayMapper.kt b/vortex-data/src/main/java/io/vortex/android/data/utils/VortexOneWayMapper.kt
deleted file mode 100644
index 4de471e..0000000
--- a/vortex-data/src/main/java/io/vortex/android/data/utils/VortexOneWayMapper.kt
+++ /dev/null
@@ -1,7 +0,0 @@
-package io.vortex.android.data.utils
-
-interface VortexOneWayMapper {
-
- fun convert(from: From): To
-
-}
diff --git a/vortex-dependencies-plugin/.gitattributes b/vortex-dependencies-plugin/.gitattributes
deleted file mode 100644
index e69de29..0000000
diff --git a/vortex-dependencies-plugin/.gitignore b/vortex-dependencies-plugin/.gitignore
deleted file mode 100644
index e7e9d11..0000000
--- a/vortex-dependencies-plugin/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-# Default ignored files
-/workspace.xml
diff --git a/vortex-dependencies-plugin/.idea/.gitignore b/vortex-dependencies-plugin/.idea/.gitignore
deleted file mode 100644
index e69de29..0000000
diff --git a/vortex-dependencies-plugin/.idea/compiler.xml b/vortex-dependencies-plugin/.idea/compiler.xml
deleted file mode 100644
index 61a9130..0000000
--- a/vortex-dependencies-plugin/.idea/compiler.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-