Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/workspace.xml | ||
/.idea/libraries | ||
.DS_Store | ||
/build | ||
/captures |
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.
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,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' | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 *; | ||
#} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package me.rei_m.hyakuninisshu.di; | ||
|
||
import dagger.Subcomponent; | ||
|
||
@Subcomponent(modules = {PresentationModule.class}) | ||
public interface ActivityComponent { | ||
|
||
FragmentComponent fragmentComponent(); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); | ||
} |