Skip to content

Commit 16c4948

Browse files
committed
initial mvp-clean project
0 parents  commit 16c4948

Some content is hidden

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

59 files changed

+1328
-0
lines changed

.gitignore

+9
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

+18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+33
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations.xml

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/build.gradle

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
apply plugin: 'com.android.application'
2+
apply plugin: 'com.neenbedankt.android-apt'
3+
4+
5+
android {
6+
compileSdkVersion 25
7+
buildToolsVersion "25.0.2"
8+
defaultConfig {
9+
applicationId "org.mifos.mobilewallet"
10+
minSdkVersion 15
11+
targetSdkVersion 25
12+
versionCode 1
13+
versionName "1.0"
14+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
15+
}
16+
buildTypes {
17+
release {
18+
minifyEnabled false
19+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
20+
}
21+
}
22+
compileOptions.incremental = false
23+
}
24+
25+
dependencies {
26+
compile fileTree(dir: 'libs', include: ['*.jar'])
27+
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
28+
exclude group: 'com.android.support', module: 'support-annotations'
29+
})
30+
compile 'com.android.support:appcompat-v7:25.3.1'
31+
32+
compile 'com.jakewharton:butterknife:8.6.0'
33+
apt 'com.jakewharton:butterknife-compiler:8.6.0'
34+
annotationProcessor 'com.jakewharton:butterknife-compiler:8.6.0'
35+
36+
compile 'com.google.dagger:dagger:2.11'
37+
annotationProcessor 'com.google.dagger:dagger-compiler:2.11'
38+
apt 'com.google.dagger:dagger-compiler:2.11'
39+
40+
41+
testCompile 'junit:junit:4.12'
42+
}

app/proguard-rules.pro

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Add project specific ProGuard rules here.
2+
# By default, the flags in this file are appended to flags specified
3+
# in /home/naman/sdk/tools/proguard/proguard-android.txt
4+
# You can edit the include path and order by changing the proguardFiles
5+
# directive in build.gradle.
6+
#
7+
# For more details, see
8+
# http://developer.android.com/guide/developing/tools/proguard.html
9+
10+
# Add any project specific keep options here:
11+
12+
# If your project uses WebView with JS, uncomment the following
13+
# and specify the fully qualified class name to the JavaScript interface
14+
# class:
15+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16+
# public *;
17+
#}
18+
19+
# Uncomment this to preserve the line number information for
20+
# debugging stack traces.
21+
#-keepattributes SourceFile,LineNumberTable
22+
23+
# If you keep the line number information, uncomment this to
24+
# hide the original source file name.
25+
#-renamesourcefileattribute SourceFile
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package org.mifos.mobilewallet;
2+
3+
import android.content.Context;
4+
import android.support.test.InstrumentationRegistry;
5+
import android.support.test.runner.AndroidJUnit4;
6+
7+
import org.junit.Test;
8+
import org.junit.runner.RunWith;
9+
10+
import static org.junit.Assert.*;
11+
12+
/**
13+
* Instrumentation test, which will execute on an Android device.
14+
*
15+
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
16+
*/
17+
@RunWith(AndroidJUnit4.class)
18+
public class ExampleInstrumentedTest {
19+
@Test
20+
public void useAppContext() throws Exception {
21+
// Context of the app under test.
22+
Context appContext = InstrumentationRegistry.getTargetContext();
23+
24+
assertEquals("org.mifos.mobilewallet", appContext.getPackageName());
25+
}
26+
}

app/src/main/AndroidManifest.xml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="org.mifos.mobilewallet">
3+
<application
4+
android:name=".MifosWalletApp" android:icon="@mipmap/ic_launcher"
5+
android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round"
6+
android:supportsRtl="true" android:theme="@style/AppTheme" >
7+
8+
<activity android:name=".auth.ui.LandingActivity">
9+
10+
<intent-filter>
11+
<action android:name="android.intent.action.MAIN"/>
12+
13+
<category android:name="android.intent.category.LAUNCHER"/>
14+
</intent-filter>
15+
</activity>
16+
17+
<activity android:name=".auth.ui.LoginActivity"/>
18+
<activity android:name=".auth.ui.SignupActivity"/>
19+
</application>
20+
21+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
package org.mifos.mobilewallet;
2+
3+
import android.app.Application;
4+
import android.content.Context;
5+
6+
import org.mifos.mobilewallet.injection.component.ApplicationComponent;
7+
import org.mifos.mobilewallet.injection.component.DaggerApplicationComponent;
8+
import org.mifos.mobilewallet.injection.module.ApplicationModule;
9+
10+
import butterknife.ButterKnife;
11+
12+
/**
13+
* Created by naman on 16/6/17.
14+
*/
15+
16+
public class MifosWalletApp extends Application {
17+
18+
ApplicationComponent applicationComponent;
19+
20+
private static MifosWalletApp instance;
21+
22+
public static MifosWalletApp get(Context context) {
23+
return (MifosWalletApp) context.getApplicationContext();
24+
}
25+
26+
public static Context getContext() {
27+
return instance;
28+
}
29+
30+
@Override
31+
public void onCreate() {
32+
super.onCreate();
33+
instance = this;
34+
ButterKnife.setDebug(true);
35+
}
36+
37+
public ApplicationComponent component() {
38+
if (applicationComponent == null) {
39+
applicationComponent = DaggerApplicationComponent.builder()
40+
.applicationModule(new ApplicationModule(this))
41+
.build();
42+
}
43+
return applicationComponent;
44+
}
45+
46+
// Needed to replace the component with a test specific one
47+
public void setComponent(ApplicationComponent applicationComponent) {
48+
this.applicationComponent = applicationComponent;
49+
}
50+
51+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
package org.mifos.mobilewallet.auth;
2+
3+
import org.mifos.mobilewallet.core.BasePresenter;
4+
import org.mifos.mobilewallet.core.BaseView;
5+
6+
/**
7+
* Created by naman on 16/6/17.
8+
*/
9+
10+
/**
11+
* This specifies the contract between the view and the presenter.
12+
*/
13+
public interface AuthContract {
14+
15+
interface LoginView extends BaseView<LoginPresenter> {
16+
17+
}
18+
19+
interface LoginPresenter extends BasePresenter {
20+
21+
22+
}
23+
24+
25+
interface SignupView extends BaseView<SignupPresenter> {
26+
27+
}
28+
29+
interface SignupPresenter extends BasePresenter {
30+
31+
32+
}
33+
34+
35+
interface LandingView extends BaseView<LandingPresenter> {
36+
37+
void openLoginScreen();
38+
void openSignupScreen();
39+
}
40+
41+
interface LandingPresenter extends BasePresenter {
42+
43+
void navigateLogin();
44+
void navigateSignup();
45+
46+
}
47+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package org.mifos.mobilewallet.auth.domain.model;
2+
3+
import android.support.annotation.NonNull;
4+
5+
/**
6+
* Created by naman on 16/6/17.
7+
*/
8+
9+
public class UserLogin {
10+
11+
@NonNull
12+
private final String mUserName;
13+
14+
@NonNull
15+
private final String mPassword;
16+
17+
public UserLogin(@NonNull String username, @NonNull String password) {
18+
this.mUserName = username;
19+
this.mPassword = password;
20+
}
21+
22+
@NonNull
23+
public String getmPassword() {
24+
return mPassword;
25+
}
26+
27+
@NonNull
28+
public String getmUserName() {
29+
return mUserName;
30+
}
31+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package org.mifos.mobilewallet.auth.domain.usecase;
2+
3+
import org.mifos.mobilewallet.core.UseCase;
4+
5+
/**
6+
* Created by naman on 16/6/17.
7+
*/
8+
9+
public class AuthenticateUser extends UseCase<AuthenticateUser.RequestValues, AuthenticateUser.ResponseValue> {
10+
11+
12+
@Override
13+
protected void executeUseCase(RequestValues requestValues) {
14+
15+
}
16+
17+
public static final class RequestValues implements UseCase.RequestValues {
18+
19+
20+
public RequestValues() {
21+
22+
}
23+
24+
}
25+
26+
public static final class ResponseValue implements UseCase.ResponseValue {
27+
}
28+
}

0 commit comments

Comments
 (0)