This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Top-level build file where you can add configuration options common to all sub-projects/modules. | |
buildscript { | |
repositories { | |
jcenter() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:2.2.2' | |
/*...*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'com.android.application' | |
/*...*/ | |
android { | |
compileSdkVersion rootProject.ext.compileSdkVersion | |
buildToolsVersion rootProject.ext.buildToolsVersion | |
/*...*/ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'java' | |
/*...*/ | |
dependencies { | |
compile fileTree(dir: 'libs', include: ['*.jar']) | |
compile rootProject.ext.libraries.rxjava | |
testCompile rootProject.ext.testLibraries.junit | |
testCompile rootProject.ext.testLibraries.mockito |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mirhoseini.marvel.character.cache; | |
import dagger.Module; | |
import dagger.Provides; | |
@Module | |
class CacheModule { | |
private CacheView view; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mirhoseini.marvel; | |
import android.app.Application; | |
public abstract class MarvelApplication extends Application { | |
private static ApplicationComponent component; | |
public static ApplicationComponent getComponent() { | |
return component; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mirhoseini.marvel; | |
import timber.log.Timber; | |
public class MarvelApplicationImpl extends MarvelApplication { | |
@Override | |
public void initApplication() { | |
// initialize Timber in debug version to log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mirhoseini.marvel; | |
/*...*/ | |
@Singleton | |
@Component(modules = { | |
AndroidModule.class, | |
ApplicationModule.class, | |
ApiModule.class, | |
DatabaseModule.class, | |
ClientModule.class |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mirhoseini.marvel.character.search; | |
import dagger.Subcomponent; | |
@Search | |
@Subcomponent(modules = { | |
AppSearchModule.class | |
}) | |
public interface SearchSubComponent { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
package="com.mirhoseini.marvel"> | |
<!-- *** --> | |
<application | |
android:name=".MarvelApplicationImpl" | |
android:allowBackup="true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mirhoseini.marvel.domain.client; | |
import com.mirhoseini.marvel.domain.model.CharactersResponse; | |
import retrofit2.http.GET; | |
import retrofit2.http.Query; | |
import rx.Observable; | |
public interface MarvelApi { |