Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .idea/__vcs.xml

This file was deleted.

53 changes: 53 additions & 0 deletions .idea/codeStyles/Project.xml

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

454 changes: 454 additions & 0 deletions .idea/dbnavigator.xml

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions .idea/misc.xml

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

2 changes: 1 addition & 1 deletion .idea/modules.xml

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

47 changes: 24 additions & 23 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
project.ext {
appcompat = "25.3.1"
arch = "1.0.0-alpha1"
retrofit = "2.0.2"
constraintLayout = "1.0.2"
support = "27.1.1"
arch = "1.1.1"
retrofit = "2.4.0"
constraintLayout = "1.1.0"
dagger_version = "2.11"
}

apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "com.example.test.mvvm_sample_app"
minSdkVersion 19
targetSdkVersion 25
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand All @@ -36,29 +36,30 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})

compile "com.android.support:appcompat-v7:$project.appcompat"
compile "com.android.support:cardview-v7:$project.appcompat"
compile "com.android.support:recyclerview-v7:$project.appcompat"
compile "android.arch.lifecycle:runtime:$project.arch"
compile "android.arch.lifecycle:extensions:$project.arch"
compile "com.squareup.retrofit2:retrofit:$project.retrofit"
compile "com.squareup.retrofit2:converter-gson:$project.retrofit"
implementation "com.android.support:appcompat-v7:$project.support"
implementation "com.android.support:design:$project.support"
implementation "com.android.support:cardview-v7:$project.support"
implementation "com.android.support:recyclerview-v7:$project.support"
implementation "com.android.support:support-v4:$project.support"
implementation "com.android.support.constraint:constraint-layout:$project.constraintLayout"

implementation "android.arch.lifecycle:runtime:$project.arch"
implementation "android.arch.lifecycle:extensions:$project.arch"
implementation "com.squareup.retrofit2:retrofit:$project.retrofit"
implementation "com.squareup.retrofit2:converter-gson:$project.retrofit"
annotationProcessor "android.arch.lifecycle:compiler:$project.arch"
compile "com.android.support.constraint:constraint-layout:$project.constraintLayout"
compile "com.android.support:support-v4:$project.appcompat"

compile "com.google.dagger:dagger:$project.dagger_version"
compile "com.google.dagger:dagger-android:$project.dagger_version"
compile "com.google.dagger:dagger-android-support:$project.dagger_version"
implementation "com.google.dagger:dagger:$project.dagger_version"
implementation "com.google.dagger:dagger-android:$project.dagger_version"
implementation "com.google.dagger:dagger-android-support:$project.dagger_version"

annotationProcessor "com.google.dagger:dagger-android-processor:$dagger_version"
annotationProcessor "com.google.dagger:dagger-compiler:$dagger_version"

testCompile 'junit:junit:4.12'
compile 'com.android.support:design:25.3.1'
testImplementation 'junit:junit:4.12'
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ public interface GitHubService {
@GET("users/{user}/repos")
Call<List<Project>> getProjectList(@Path("user") String user);

@GET("/repos/{user}/{reponame}")
@GET("repos/{user}/{reponame}")
Call<Project> getProjectDetails(@Path("user") String user, @Path("reponame") String projectName);
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.example.test.mvvmsampleapp.view.ui;

import android.arch.lifecycle.LifecycleActivity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.app.AppCompatActivity;

import com.example.test.mvvmsampleapp.R;
import com.example.test.mvvmsampleapp.service.model.Project;
Expand All @@ -13,7 +13,7 @@
import dagger.android.DispatchingAndroidInjector;
import dagger.android.support.HasSupportFragmentInjector;

public class MainActivity extends LifecycleActivity implements HasSupportFragmentInjector {
public class MainActivity extends AppCompatActivity implements HasSupportFragmentInjector {

@Inject
DispatchingAndroidInjector<Fragment> dispatchingAndroidInjector;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.example.test.mvvmsampleapp.view.ui;

import android.arch.lifecycle.LifecycleFragment;
import android.arch.lifecycle.Observer;
import android.arch.lifecycle.ViewModelProvider;
import android.arch.lifecycle.ViewModelProviders;
import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand All @@ -19,7 +19,7 @@

import javax.inject.Inject;

public class ProjectFragment extends LifecycleFragment implements Injectable {
public class ProjectFragment extends Fragment implements Injectable {
private static final String KEY_PROJECT_ID = "project_id";
private FragmentProjectDetailsBinding binding;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.example.test.mvvmsampleapp.view.ui;

import android.arch.lifecycle.Lifecycle;
import android.arch.lifecycle.LifecycleFragment;
import android.arch.lifecycle.Observer;
import android.arch.lifecycle.ViewModelProvider;
import android.arch.lifecycle.ViewModelProviders;
import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand All @@ -24,7 +24,7 @@

import javax.inject.Inject;

public class ProjectListFragment extends LifecycleFragment implements Injectable {
public class ProjectListFragment extends Fragment implements Injectable {
public static final String TAG = "ProjectListFragment";
private ProjectAdapter projectAdapter;
private FragmentProjectListBinding binding;
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha5'
classpath 'com.android.tools.build:gradle:3.1.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon May 29 15:39:33 EDT 2017
#Thu May 24 12:54:18 CEST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-milestone-1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip