-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
…architecture with the help of Koin for dependency injection, used Firebase as database.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/caches | ||
/.idea/libraries | ||
/.idea/modules.xml | ||
/.idea/workspace.xml | ||
/.idea/navEditor.xml | ||
/.idea/assetWizardSettings.xml | ||
.DS_Store | ||
/build | ||
/captures | ||
.externalNativeBuild | ||
.cxx |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
apply plugin: 'com.android.application' | ||
|
||
apply plugin: 'kotlin-android' | ||
|
||
apply plugin: 'kotlin-android-extensions' | ||
apply plugin: 'com.google.gms.google-services' | ||
|
||
android { | ||
compileSdkVersion 29 | ||
defaultConfig { | ||
applicationId "com.dawar.sparknetwork" | ||
minSdkVersion 23 | ||
targetSdkVersion 29 | ||
versionCode 1 | ||
versionName "1.0" | ||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" | ||
implementation 'androidx.appcompat:appcompat:1.1.0' | ||
implementation 'androidx.core:core-ktx:1.1.0' | ||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' | ||
implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0' | ||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.1.0' | ||
implementation 'com.google.firebase:firebase-database:19.2.0' | ||
testImplementation 'junit:junit:4.12' | ||
androidTestImplementation 'androidx.test:runner:1.2.0' | ||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' | ||
// For activity rules | ||
androidTestImplementation 'androidx.test:rules:1.2.0' | ||
// for fragment testing | ||
implementation 'androidx.fragment:fragment-testing:1.2.0-rc01' | ||
|
||
implementation 'com.github.bumptech.glide:glide:4.9.0' | ||
|
||
// or Koin for Android Architecture ViewModel | ||
implementation 'org.koin:koin-androidx-viewmodel:2.0.1' | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"project_info": { | ||
"project_number": "936486760126", | ||
"firebase_url": "https://sparknetwork-8a4c5.firebaseio.com", | ||
"project_id": "sparknetwork-8a4c5", | ||
"storage_bucket": "sparknetwork-8a4c5.appspot.com" | ||
}, | ||
"client": [ | ||
{ | ||
"client_info": { | ||
"mobilesdk_app_id": "1:936486760126:android:a9dba482344d1eb41978ef", | ||
"android_client_info": { | ||
"package_name": "com.dawar.sparknetwork" | ||
} | ||
}, | ||
"oauth_client": [ | ||
{ | ||
"client_id": "936486760126-fecc7vl57bisjd2mvfo7ivvbs9pu1phn.apps.googleusercontent.com", | ||
"client_type": 1, | ||
"android_info": { | ||
"package_name": "com.dawar.sparknetwork", | ||
"certificate_hash": "97766a16950abdbc0f2be1ef5f8828248d26bd96" | ||
} | ||
}, | ||
{ | ||
"client_id": "936486760126-tpp36861fk3lb56dkj42i98egvt902k6.apps.googleusercontent.com", | ||
"client_type": 3 | ||
} | ||
], | ||
"api_key": [ | ||
{ | ||
"current_key": "AIzaSyBJIhTaoBwdWVBjLo4G52qCGscQP8innuE" | ||
} | ||
], | ||
"services": { | ||
"appinvite_service": { | ||
"other_platform_oauth_client": [ | ||
{ | ||
"client_id": "936486760126-tpp36861fk3lb56dkj42i98egvt902k6.apps.googleusercontent.com", | ||
"client_type": 3 | ||
} | ||
] | ||
} | ||
} | ||
} | ||
], | ||
"configuration_version": "1" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.dawar.sparknetwork"> | ||
|
||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<application | ||
android:allowBackup="false" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:supportsRtl="true" | ||
android:theme="@style/AppTheme"> | ||
<activity android:name="com.dawar.sparknetwork.ui.main.MainActivity"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
<intent-filter> | ||
<action android:name="android.intent.action.VIEW" /> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.dawar.sparknetwork.models | ||
|
||
|
||
data class User(var name: String? = null) { | ||
var image: String? = null | ||
var phone: String? = null | ||
var email: String? = null | ||
|
||
var address: String? = null | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.dawar.sparknetwork.ui.main | ||
|
||
import androidx.fragment.app.Fragment | ||
|
||
abstract class BaseFragment:Fragment() |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.dawar.sparknetwork.ui.main | ||
|
||
import com.dawar.sparknetwork.ui.main.database.AppDatabase | ||
|
||
abstract class BaseRepository { | ||
protected val mAppDatabase = AppDatabase.getInstance() | ||
} |