Skip to content

Commit f2e3d5c

Browse files
author
shreya-concetto
committed
first commit
0 parents  commit f2e3d5c

File tree

80 files changed

+3495
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+3495
-0
lines changed

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/workspace.xml
5+
/.idea/libraries
6+
.DS_Store
7+
/build
8+
/captures
9+
.externalNativeBuild

.idea/gradle.xml

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations.xml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/build.gradle

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
compileSdkVersion 27
5+
defaultConfig {
6+
applicationId "com.prashant.mvpdaggerdemo"
7+
minSdkVersion 21
8+
targetSdkVersion 27
9+
versionCode 1
10+
versionName "1.0"
11+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
12+
}
13+
buildTypes {
14+
release {
15+
minifyEnabled false
16+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17+
}
18+
}
19+
dataBinding {
20+
enabled = true
21+
}
22+
}
23+
24+
dependencies {
25+
implementation fileTree(dir: 'libs', include: ['*.jar'])
26+
implementation 'com.android.support:appcompat-v7:27.0.2'
27+
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
28+
implementation 'com.android.support:design:27.0.2'
29+
testImplementation 'junit:junit:4.12'
30+
androidTestImplementation 'com.android.support.test:runner:1.0.1'
31+
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
32+
33+
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
34+
compile 'com.squareup.retrofit2:retrofit:2.3.0'
35+
compile 'com.google.code.gson:gson:2.8.2'
36+
compile 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
37+
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
38+
39+
compile 'com.google.dagger:dagger:2.14.1'
40+
annotationProcessor 'com.google.dagger:dagger-compiler:2.14.1'
41+
implementation 'com.google.code.findbugs:jsr305:3.0.2'
42+
43+
}

app/proguard-rules.pro

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
package com.prashant.mvpdaggerdemo;
2+
3+
import android.content.Context;
4+
import android.support.test.InstrumentationRegistry;
5+
import android.support.test.runner.AndroidJUnit4;
6+
7+
import com.prashant.mvpdaggerdemo.utils.ConnectivityUtils;
8+
import com.prashant.mvpdaggerdemo.utils.ValidationUtils;
9+
10+
import org.junit.Test;
11+
import org.junit.runner.RunWith;
12+
13+
import static org.junit.Assert.assertEquals;
14+
15+
/**
16+
* Instrumented test, which will execute on an Android device.
17+
*
18+
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
19+
*/
20+
@RunWith(AndroidJUnit4.class)
21+
public class ExampleInstrumentedTest {
22+
@Test
23+
public void testInternet() throws Exception {
24+
// Context of the app under test.
25+
Context appContext = InstrumentationRegistry.getTargetContext();
26+
boolean isConnected = ConnectivityUtils.isConnectedToInternet(appContext);
27+
28+
assertEquals(true, isConnected);
29+
}
30+
31+
@Test
32+
public void validateEmail() throws Exception {
33+
34+
boolean isValid = ValidationUtils.validateEmail("sadfjasdlfj@fks.com");
35+
36+
assertEquals(true, isValid);
37+
}
38+
}

app/src/main/AndroidManifest.xml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.prashant.mvpdaggerdemo">
4+
5+
<!-- To auto-complete the email text field in the login form with the user's emails -->
6+
<uses-permission android:name="android.permission.INTERNET" />
7+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
8+
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
9+
10+
<application
11+
android:name=".AppClass"
12+
android:allowBackup="true"
13+
android:icon="@mipmap/ic_launcher"
14+
android:label="@string/app_name"
15+
android:roundIcon="@mipmap/ic_launcher_round"
16+
android:supportsRtl="true"
17+
android:theme="@style/AppTheme">
18+
<activity android:name=".main.MainActivity"></activity>
19+
<activity
20+
android:name=".login.LoginActivity"
21+
android:label="@string/title_activity_login">
22+
<intent-filter>
23+
<action android:name="android.intent.action.MAIN" />
24+
25+
<category android:name="android.intent.category.LAUNCHER" />
26+
</intent-filter>
27+
</activity>
28+
<activity android:name=".base.BaseActivity" />
29+
</application>
30+
31+
</manifest>

0 commit comments

Comments
 (0)