From b715f2fd9453672cdbf494337305fee8e629c5e7 Mon Sep 17 00:00:00 2001 From: Ehma Ugbogo Date: Sun, 30 May 2021 22:07:08 +0100 Subject: [PATCH 1/9] Create README.md --- README.md | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..67479e9 --- /dev/null +++ b/README.md @@ -0,0 +1,95 @@ +# EasyPref + +> EasyPrefLib +___ + +### Description: +A SharedPreference Library that can be used to store all types including your custom classes. +___ + +### Features: +- Easily store primitive types +- Easily store custom classes + +___ + +### Setup. +To get a Git project into your build: + +1. Add the JitPack repository to you root build.gradle at the end of repositories: + +```groovy +allprojects { + repositories { + ... + maven { url 'https://jitpack.io' } + } +} +``` + +2. Add the dependency + +```groovy +dependencies { + implementation 'com.github.EhmaUgbogo:EasyPref:Tag' +} +``` +___ + +### Usage + +1. Initialize EasyPref in your application class of MainActivity + +```kotlin + EasyPref.initialize(this) // If setup in your application class + EasyPref.initialize(application) // If setup in MainActivity +``` + +2. Use as needed + +```kotlin + // Store custom types + EasyPref.putBoolean(key, boolValue) + EasyPref.getBoolean(key) + + // ... Same for Strings, Int, etc + + // Store custom types + EasyPref.putObject(OBJ_KEY, yourData) + EasyPref.getObject(OBJ_KEY, YourData::class.java) + +``` + +### Licence + +Copyright (c) [2021] Ehma Ugbogo + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +___ + +### Author Info + +[@EhmaUgbogo](https://twitter.com/EhmaUgbogo) + + +[Back To The Top](#easypref) + + From 0cc88b82785b4d53538598eff4eac40740e9eb8b Mon Sep 17 00:00:00 2001 From: Ehma Ugbogo Date: Sun, 30 May 2021 22:08:56 +0100 Subject: [PATCH 2/9] Update README.md --- README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 67479e9..bda9499 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # EasyPref > EasyPrefLib -___ ### Description: A SharedPreference Library that can be used to store all types including your custom classes. @@ -20,10 +19,10 @@ To get a Git project into your build: ```groovy allprojects { - repositories { - ... - maven { url 'https://jitpack.io' } - } + repositories { + ... + maven { url 'https://jitpack.io' } + } } ``` @@ -31,7 +30,7 @@ allprojects { ```groovy dependencies { - implementation 'com.github.EhmaUgbogo:EasyPref:Tag' + implementation 'com.github.EhmaUgbogo:EasyPref:Tag' } ``` ___ From 80d1335da182504ff934e22d85c8db90727375ad Mon Sep 17 00:00:00 2001 From: Ehma Ugbogo Date: Sun, 30 May 2021 22:12:40 +0100 Subject: [PATCH 3/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bda9499..0da46e3 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ allprojects { ```groovy dependencies { - implementation 'com.github.EhmaUgbogo:EasyPref:Tag' + implementation 'com.github.EhmaUgbogo:EasyPref:1.0' } ``` ___ From 13dbf18432c324f48b1f11082b837d799f51e407 Mon Sep 17 00:00:00 2001 From: Ehma Ugbogo Date: Sun, 30 May 2021 23:01:43 +0100 Subject: [PATCH 4/9] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 0da46e3..214f3bd 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +![GitHub release (latest by date)](https://img.shields.io/github/v/release/EhmaUgbogo/EasyPref?style=plastic) ![GitHub top language](https://img.shields.io/github/languages/top/EhmaUgbogo/EasyPref?style=plastic) ![GitHub release (by tag)](https://img.shields.io/github/downloads/EhmaUgbogo/EasyPref/1.0/total?style=plastic) ![GitHub](https://img.shields.io/github/license/EhmaUgbogo/EasyPref?style=plastic) ![Twitter Follow](https://img.shields.io/twitter/follow/EhmaUgbogo?style=social) + # EasyPref > EasyPrefLib @@ -61,6 +63,8 @@ ___ ### Licence +MIT Licence + Copyright (c) [2021] Ehma Ugbogo Permission is hereby granted, free of charge, to any person obtaining From 7efe0f62b6c636ceeb7637044241f3007447f5e2 Mon Sep 17 00:00:00 2001 From: Ehma Ugbogo Date: Sun, 30 May 2021 23:02:21 +0100 Subject: [PATCH 5/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 214f3bd..7f9564c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![GitHub release (latest by date)](https://img.shields.io/github/v/release/EhmaUgbogo/EasyPref?style=plastic) ![GitHub top language](https://img.shields.io/github/languages/top/EhmaUgbogo/EasyPref?style=plastic) ![GitHub release (by tag)](https://img.shields.io/github/downloads/EhmaUgbogo/EasyPref/1.0/total?style=plastic) ![GitHub](https://img.shields.io/github/license/EhmaUgbogo/EasyPref?style=plastic) ![Twitter Follow](https://img.shields.io/twitter/follow/EhmaUgbogo?style=social) +![GitHub release (latest by date)](https://img.shields.io/github/v/release/EhmaUgbogo/EasyPref?style=plastic) ![GitHub top language](https://img.shields.io/github/languages/top/EhmaUgbogo/EasyPref?style=plastic) ![GitHub release (by 1.0)](https://img.shields.io/github/downloads/EhmaUgbogo/EasyPref/1.0/total?style=plastic) ![GitHub](https://img.shields.io/github/license/EhmaUgbogo/EasyPref?style=plastic) ![Twitter Follow](https://img.shields.io/twitter/follow/EhmaUgbogo?style=social) # EasyPref From e88506dde0ecac6f0857438fb0c9a7e06a6e0bdc Mon Sep 17 00:00:00 2001 From: Ehma Ugbogo Date: Sun, 30 May 2021 23:06:22 +0100 Subject: [PATCH 6/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7f9564c..abb9af4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![GitHub release (latest by date)](https://img.shields.io/github/v/release/EhmaUgbogo/EasyPref?style=plastic) ![GitHub top language](https://img.shields.io/github/languages/top/EhmaUgbogo/EasyPref?style=plastic) ![GitHub release (by 1.0)](https://img.shields.io/github/downloads/EhmaUgbogo/EasyPref/1.0/total?style=plastic) ![GitHub](https://img.shields.io/github/license/EhmaUgbogo/EasyPref?style=plastic) ![Twitter Follow](https://img.shields.io/twitter/follow/EhmaUgbogo?style=social) +![GitHub release (latest by date)](https://img.shields.io/github/v/release/EhmaUgbogo/EasyPref?style=flat-square) ![GitHub top language](https://img.shields.io/github/languages/top/EhmaUgbogo/EasyPref?style=flat-square) ![GitHub release (by 1.0)](https://img.shields.io/github/downloads/EhmaUgbogo/EasyPref/1.0/total?style=flat-square) ![Twitter Follow](https://img.shields.io/twitter/follow/EhmaUgbogo?style=social) # EasyPref From 0c8706d7c8052d9d95793fed87747c2b91685863 Mon Sep 17 00:00:00 2001 From: Ehma Ugbogo Date: Sun, 30 May 2021 23:11:34 +0100 Subject: [PATCH 7/9] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index abb9af4..3b1c55c 100644 --- a/README.md +++ b/README.md @@ -50,12 +50,14 @@ ___ ```kotlin // Store custom types + EasyPref.putBoolean(key, boolValue) EasyPref.getBoolean(key) // ... Same for Strings, Int, etc // Store custom types + EasyPref.putObject(OBJ_KEY, yourData) EasyPref.getObject(OBJ_KEY, YourData::class.java) From 33ffee9bb7b28b36a772f81a4907f2b8caa65733 Mon Sep 17 00:00:00 2001 From: Ehma Ugbogo Date: Sun, 30 May 2021 23:13:38 +0100 Subject: [PATCH 8/9] Update README.md --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 3b1c55c..e9d5076 100644 --- a/README.md +++ b/README.md @@ -49,12 +49,10 @@ ___ 2. Use as needed ```kotlin - // Store custom types EasyPref.putBoolean(key, boolValue) - EasyPref.getBoolean(key) + EasyPref.getBoolean(key) // ... Same for Strings, Int, etc - // ... Same for Strings, Int, etc // Store custom types From 5d4ffd81601df0ad98d071ab3955c067af91786f Mon Sep 17 00:00:00 2001 From: Ehma Ugbogo Date: Sun, 30 May 2021 23:31:30 +0100 Subject: [PATCH 9/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e9d5076..8f4322b 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ ___ ### Usage -1. Initialize EasyPref in your application class of MainActivity +1. Initialize EasyPref in your application class or MainActivity ```kotlin EasyPref.initialize(this) // If setup in your application class