Skip to content

Commit b094b16

Browse files
author
rifqi.fardi
committed
- initial commit
0 parents  commit b094b16

File tree

98 files changed

+3333
-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.

98 files changed

+3333
-0
lines changed

.gitignore

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Built application files
2+
*.apk
3+
*.ap_
4+
5+
# Files for the ART/Dalvik VM
6+
*.dex
7+
8+
# Java class files
9+
*.class
10+
11+
# Generated files
12+
bin/
13+
gen/
14+
out/
15+
16+
# Gradle files
17+
.gradle/
18+
build/
19+
20+
# Local configuration file (sdk path, etc)
21+
local.properties
22+
23+
# Proguard folder generated by Eclipse
24+
proguard/
25+
26+
# Log Files
27+
*.log
28+
29+
# Android Studio Navigation editor temp files
30+
.navigation/
31+
32+
# Android Studio captures folder
33+
captures/
34+
35+
# IntelliJ
36+
*.iml
37+
.idea/workspace.xml
38+
.idea/tasks.xml
39+
.idea/gradle.xml
40+
.idea/assetWizardSettings.xml
41+
.idea/dictionaries
42+
.idea/libraries
43+
.idea/caches
44+
45+
# Keystore files
46+
# Uncomment the following line if you do not want to check your keystore files in.
47+
#*.jks
48+
49+
# External native build folder generated in Android Studio 2.2 and later
50+
.externalNativeBuild

.idea/codeStyles/Project.xml

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

.idea/misc.xml

+34
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.

.idea/vcs.xml

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

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
compileSdkVersion 27
5+
defaultConfig {
6+
applicationId "io.github.jboxx.catering_subscribe"
7+
minSdkVersion 19
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+
lintOptions {
20+
disable 'InvalidPackage'
21+
}
22+
23+
packagingOptions {
24+
exclude 'META-INF/services/javax.annotation.processing.Processor'
25+
exclude 'META-INF/rxjava.properties'
26+
}
27+
28+
compileOptions {
29+
sourceCompatibility JavaVersion.VERSION_1_8
30+
targetCompatibility JavaVersion.VERSION_1_8
31+
}
32+
}
33+
34+
ext {
35+
supportLibVersion = '27.1.1'
36+
okhttpVersion = '3.9.0'
37+
daggerVersion = '2.5'
38+
}
39+
40+
repositories {
41+
maven { url 'https://jitpack.io' }
42+
}
43+
44+
dependencies {
45+
implementation fileTree(dir: 'libs', include: ['*.jar'])
46+
47+
//Support
48+
implementation "com.android.support:cardview-v7:${supportLibVersion}"
49+
implementation "com.android.support:gridlayout-v7:${supportLibVersion}"
50+
implementation "com.android.support:design:${supportLibVersion}"
51+
implementation "com.android.support:support-v4:${supportLibVersion}"
52+
implementation "com.android.support:support-annotations:${supportLibVersion}"
53+
implementation "com.android.support:palette-v7:${supportLibVersion}"
54+
implementation "com.android.support:appcompat-v7:${supportLibVersion}"
55+
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
56+
57+
// Other
58+
implementation "com.github.prolificinteractive:material-calendarview:1.6.1"
59+
implementation 'com.jakewharton:butterknife:8.8.1'
60+
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
61+
62+
// Dependency Injection
63+
annotationProcessor "com.google.dagger:dagger-compiler:${daggerVersion}"
64+
implementation "com.google.dagger:dagger:${daggerVersion}"
65+
compileOnly 'javax.annotation:jsr250-api:1.0'
66+
67+
testImplementation 'junit:junit:4.12'
68+
androidTestImplementation 'com.android.support.test:runner:1.0.2'
69+
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
70+
}

app/proguard-rules.pro

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

app/release/output.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package io.github.jboxx.catering_subscribe;
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+
* Instrumented 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() {
21+
// Context of the app under test.
22+
Context appContext = InstrumentationRegistry.getTargetContext();
23+
24+
assertEquals("io.github.jboxx.catering_subscribe", appContext.getPackageName());
25+
}
26+
}

app/src/main/AndroidManifest.xml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="io.github.jboxx.catering_subscribe">
4+
5+
<application
6+
android:name=".BaseApplication"
7+
android:allowBackup="true"
8+
android:icon="@mipmap/ic_launcher"
9+
android:label="@string/app_name"
10+
android:roundIcon="@mipmap/ic_launcher_round"
11+
android:supportsRtl="true"
12+
android:theme="@style/AppTheme">
13+
<activity android:name=".MainActivity">
14+
<intent-filter>
15+
<action android:name="android.intent.action.MAIN" />
16+
17+
<category android:name="android.intent.category.LAUNCHER" />
18+
</intent-filter>
19+
</activity>
20+
<activity
21+
android:name=".subcripstions.SubcriptionsActivity"
22+
android:parentActivityName=".MainActivity"
23+
android:theme="@style/AppTheme">
24+
<meta-data
25+
android:name="android.support.PARENT_ACTIVITY"
26+
android:value=".MainActivity"/>
27+
</activity>
28+
</application>
29+
30+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package io.github.jboxx.catering_subscribe;
2+
3+
import javax.inject.Singleton;
4+
5+
import dagger.Component;
6+
import io.github.jboxx.catering_subscribe.subcripstions.di.SubcriptionsComponent;
7+
import io.github.jboxx.catering_subscribe.subcripstions.di.SubcriptionsModule;
8+
9+
@Singleton
10+
@Component(modules = {
11+
AppModule.class})
12+
public interface AppComponent {
13+
14+
SubcriptionsComponent plus(SubcriptionsModule subcriptionsModule);
15+
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
package io.github.jboxx.catering_subscribe;
2+
3+
import android.app.Application;
4+
import android.content.Context;
5+
import android.content.res.Resources;
6+
7+
import javax.inject.Singleton;
8+
9+
import dagger.Module;
10+
import dagger.Provides;
11+
import io.github.jboxx.catering_subscribe.utils.UiUtils;
12+
13+
@Module
14+
public class AppModule {
15+
16+
private Context context;
17+
18+
AppModule(Application application)
19+
{
20+
context = application;
21+
}
22+
23+
@Provides
24+
@Singleton
25+
public Context provideContext()
26+
{
27+
return context;
28+
}
29+
30+
@Provides
31+
@Singleton
32+
public Resources provideResources(Context context)
33+
{
34+
return context.getResources();
35+
}
36+
37+
@Provides
38+
@Singleton
39+
public UiUtils provideUiUtils() {
40+
return new UiUtils();
41+
}
42+
43+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package io.github.jboxx.catering_subscribe;
2+
3+
import android.app.Application;
4+
import android.os.StrictMode;
5+
6+
import io.github.jboxx.catering_subscribe.subcripstions.di.SubcriptionsComponent;
7+
import io.github.jboxx.catering_subscribe.subcripstions.di.SubcriptionsModule;
8+
9+
public class BaseApplication extends Application {
10+
11+
private AppComponent appComponent;
12+
13+
@Override
14+
public void onCreate() {
15+
super.onCreate();
16+
StrictMode.enableDefaults();
17+
appComponent = createAppComponent();
18+
}
19+
20+
private AppComponent createAppComponent() {
21+
return DaggerAppComponent.builder()
22+
.appModule(new AppModule(this))
23+
.build();
24+
}
25+
26+
public SubcriptionsComponent createSubcriptionsComponent() {
27+
return appComponent.plus(new SubcriptionsModule());
28+
}
29+
}

0 commit comments

Comments
 (0)