Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rei-m committed Sep 18, 2016
0 parents commit 7343ab8
Show file tree
Hide file tree
Showing 63 changed files with 1,299 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .gitignore
@@ -0,0 +1,8 @@
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/copyright/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions .idea/dictionaries/rei_m.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/.gitignore
@@ -0,0 +1 @@
/build
105 changes: 105 additions & 0 deletions app/build.gradle
@@ -0,0 +1,105 @@
apply plugin: 'com.android.application'
apply plugin: 'me.tatarka.retrolambda'
apply plugin: 'android-apt'
apply plugin: 'com.cookpad.android.licensetools'

android {
compileSdkVersion 24
buildToolsVersion "24.0.1"

defaultConfig {
applicationId "me.rei_m.hyakuninisshu"
minSdkVersion 18
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
debug {
debuggable true
applicationIdSuffix ".debug"
versionNameSuffix "d"
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
}
}

dependencies {
ext.android_support_lib_version = '24.2.1'
ext.okhttp_version = '3.4.1'
ext.retrofit_version = '2.1.0'
ext.streamsupport_version = '1.5.1'

compile fileTree(dir: 'libs', include: ['*.jar'])

compile "com.android.support:support-annotations:$android_support_lib_version"
compile "com.android.support:appcompat-v7:$android_support_lib_version"

provided 'javax.annotation:jsr250-api:1.0'
apt 'com.google.dagger:dagger-compiler:2.7'
compile 'com.google.dagger:dagger:2.7'

compile 'io.reactivex:rxandroid:1.2.1'
compile 'io.reactivex:rxjava:1.1.10'

compile "com.squareup.okhttp3:okhttp:$okhttp_version"
compile "com.squareup.okhttp3:logging-interceptor:$okhttp_version"

compile "com.squareup.retrofit2:retrofit:$retrofit_version"
compile "com.squareup.retrofit2:adapter-rxjava:$retrofit_version"
compile "com.squareup.retrofit2:converter-moshi:$retrofit_version"

compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.jakewharton:butterknife:8.4.0'
apt 'com.jakewharton:butterknife-compiler:8.4.0'

compile "net.sourceforge.streamsupport:streamsupport:$streamsupport_version"
compile "net.sourceforge.streamsupport:streamsupport-cfuture:$streamsupport_version"
compile "net.sourceforge.streamsupport:streamsupport-atomic:$streamsupport_version"
compile "net.sourceforge.streamsupport:streamsupport-flow:$streamsupport_version"
compile "net.sourceforge.streamsupport:streamsupport-literal:$streamsupport_version"

compile 'com.github.gfx.android.orma:orma:2.6.0'
apt 'com.github.gfx.android.orma:orma-processor:2.6.0'

debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3.1'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1'
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1'
androidTestCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1'

testCompile 'junit:junit:4.12'
testCompile "org.robolectric:robolectric:3.1.2"
testCompile "org.robolectric:shadows-support-v4:3.1.2"
testCompile 'org.mockito:mockito-core:1.10.19'

androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2') {
exclude module: 'support-annotations'
}
androidTestCompile('com.android.support.test.espresso:espresso-intents:2.2.2') {
exclude module: 'support-annotations'
}
androidTestCompile('com.android.support.test:runner:0.5') {
exclude module: 'support-annotations'
}
androidTestCompile('com.android.support.test:rules:0.5') {
exclude module: 'support-annotations'
}
androidTestCompile 'org.mockito:mockito-core:1.10.19'
androidTestCompile 'com.google.dexmaker:dexmaker:1.2'
androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2'
}
17 changes: 17 additions & 0 deletions app/proguard-rules.pro
@@ -0,0 +1,17 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Users/rei_m/android-sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# 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 *;
#}
@@ -0,0 +1,13 @@
package me.rei_m.hyakuninisshu;

import android.app.Application;
import android.test.ApplicationTestCase;

/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
}
21 changes: 21 additions & 0 deletions app/src/main/AndroidManifest.xml
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="me.rei_m.hyakuninisshu">

<application
android:name="me.rei_m.hyakuninisshu.App"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name="me.rei_m.hyakuninisshu.presentation.context.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>
37 changes: 37 additions & 0 deletions app/src/main/java/me/rei_m/hyakuninisshu/App.java
@@ -0,0 +1,37 @@
package me.rei_m.hyakuninisshu;

import android.app.Application;
import android.support.annotation.VisibleForTesting;

import me.rei_m.hyakuninisshu.di.ApplicationComponent;
import me.rei_m.hyakuninisshu.di.ApplicationModule;
import me.rei_m.hyakuninisshu.di.DaggerApplicationComponent;
import me.rei_m.hyakuninisshu.di.DomainModule;
import me.rei_m.hyakuninisshu.di.InfrastructureModule;
import me.rei_m.hyakuninisshu.di.UsecaseModule;

public class App extends Application {

private ApplicationComponent component;

public ApplicationComponent getComponent() {
return component;
}

@VisibleForTesting
protected ApplicationComponent createApplicationComponent() {
return DaggerApplicationComponent.builder()
.applicationModule(new ApplicationModule(this))
.infrastructureModule(new InfrastructureModule())
.domainModule(new DomainModule())
.usecaseModule(new UsecaseModule())
.build();
}

@Override
public void onCreate() {
super.onCreate();
this.component = createApplicationComponent();
this.component.inject(this);
}
}
@@ -0,0 +1,9 @@
package me.rei_m.hyakuninisshu.di;

import dagger.Subcomponent;

@Subcomponent(modules = {PresentationModule.class})
public interface ActivityComponent {

FragmentComponent fragmentComponent();
}
@@ -0,0 +1,15 @@
package me.rei_m.hyakuninisshu.di;

import javax.inject.Singleton;

import dagger.Component;
import me.rei_m.hyakuninisshu.App;

@Singleton
@Component(modules = {ApplicationModule.class, DomainModule.class, UsecaseModule.class, InfrastructureModule.class})
public interface ApplicationComponent {

void inject(App application);

ActivityComponent activityComponent();
}

0 comments on commit 7343ab8

Please sign in to comment.