Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
esoxjem committed Dec 4, 2019
1 parent e7f6327 commit 25976ce
Show file tree
Hide file tree
Showing 21 changed files with 111 additions and 109 deletions.
62 changes: 31 additions & 31 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,27 @@ def getProperty(String filename, String propName) {
if (props[propName] != null) {
return props[propName]
} else {
print("No such property " + propName + " in file " + filename);
print("No such property " + propName + " in file " + filename)
}
} else {
print(filename + " does not exist!")
}
}

android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
compileSdkVersion 29
buildToolsVersion '28.0.3'

defaultConfig {
applicationId "com.esoxjem.movieguide"
minSdkVersion 16
targetSdkVersion 26
minSdkVersion 21
targetSdkVersion 29
versionCode 1
versionName "1.0"

buildConfigField "String", "TMDB_API_KEY", "\"${getProperty("local.properties", "tmdb_api_key")}\""
buildConfigField "String", "TMDB_BASE_URL", "\"http://api.themoviedb.org/\""
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
buildConfigField "String", "TMDB_BASE_URL", "\"https://api.themoviedb.org/\""
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
Expand All @@ -54,29 +54,29 @@ android {
}

ext {
supportLibVersion = '26.1.0'
okhttpVersion = '3.9.0'
supportLibVersion = '28.0.0'
okhttpVersion = '4.2.2'
daggerVersion = '2.5'
espressoVersion = '3.0.1'
espressoVersion = '3.0.2'
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

//Support
implementation "com.android.support:design:${supportLibVersion}"
implementation "com.android.support:support-v4:${supportLibVersion}"
implementation "com.android.support:support-annotations:${supportLibVersion}"
implementation "com.android.support:palette-v7:${supportLibVersion}"
implementation "com.android.support:recyclerview-v7:${supportLibVersion}"
implementation "com.android.support.test.espresso:espresso-idling-resource:${espressoVersion}"
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.annotation:annotation:1.1.0'
implementation 'androidx.palette:palette:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.test.espresso:espresso-idling-resource:3.2.0'

// Rx
implementation 'io.reactivex.rxjava2:rxjava:2.1.2'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation 'io.reactivex.rxjava2:rxjava:2.2.14'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'

//RX View Binding
implementation 'com.jakewharton.rxbinding2:rxbinding-appcompat-v7:2.1.1'
implementation 'com.jakewharton.rxbinding2:rxbinding-appcompat-v7:2.2.0'

// Network
implementation "com.squareup.okhttp3:okhttp:${okhttpVersion}"
Expand All @@ -86,32 +86,32 @@ dependencies {
// Other
implementation 'net.jcip:jcip-annotations:1.0'
implementation 'com.google.guava:guava:18.0'
implementation 'com.squareup.moshi:moshi:1.1.0'
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation 'com.squareup.moshi:moshi:1.9.2'
implementation 'com.jakewharton:butterknife:10.2.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.0'

// Dependency Injection
annotationProcessor "com.google.dagger:dagger-compiler:${daggerVersion}"
implementation "com.google.dagger:dagger:${daggerVersion}"
compileOnly 'javax.annotation:jsr250-api:1.0'

// Retrofit 2
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
implementation 'com.squareup.retrofit2:converter-moshi:2.3.0'
implementation 'com.squareup.retrofit2:retrofit:2.6.2'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.6.2'
implementation 'com.squareup.retrofit2:converter-moshi:2.6.2'

// Tests
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:2.9.0'
androidTestCompile("com.android.support.test.espresso:espresso-core:${espressoVersion}", {
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:3.1.0'
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
androidTestCompile("com.android.support.test.espresso:espresso-contrib:${espressoVersion}") {
androidTestImplementation('androidx.test.espresso:espresso-contrib:3.1.0') {
exclude group: 'com.android.support', module: 'support-annotations'
exclude group: 'com.android.support', module: 'appcompat'
exclude group: 'com.android.support', module: 'support-v4'
exclude module: 'recyclerview-v7'
}
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test:rules:1.0.1'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test:rules:1.2.0'
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.esoxjem.movieguide.listing;

import android.support.test.espresso.Espresso;
import android.support.test.espresso.IdlingResource;
import android.support.test.espresso.contrib.RecyclerViewActions;
import android.support.test.filters.LargeTest;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;
import androidx.test.espresso.Espresso;
import androidx.test.espresso.IdlingResource;
import androidx.test.espresso.contrib.RecyclerViewActions;
import androidx.test.filters.LargeTest;
import androidx.test.rule.ActivityTestRule;
import androidx.test.ext.junit.runners.AndroidJUnit4;

import com.esoxjem.movieguide.R;

Expand All @@ -15,12 +15,12 @@
import org.junit.Test;
import org.junit.runner.RunWith;

import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.action.ViewActions.click;
import static androidx.test.espresso.assertion.ViewAssertions.matches;
import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static androidx.test.espresso.matcher.ViewMatchers.withText;

/**
* @author arunsasidharan
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/java/com/esoxjem/movieguide/Api.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* @author arun
*/
public class Api {
public static final String BASE_POSTER_PATH = "http://image.tmdb.org/t/p/w342";
public static final String BASR_BACKDROP_PATH = "http://image.tmdb.org/t/p/w780";
static final String YOUTUBE_VIDEO_URL = "http://www.youtube.com/watch?v=%1$s";
static final String YOUTUBE_THUMBNAIL_URL = "http://img.youtube.com/vi/%1$s/0.jpg";
private static final String BASE_POSTER_PATH = "https://image.tmdb.org/t/p/w342";
private static final String BASR_BACKDROP_PATH = "https://image.tmdb.org/t/p/w780";
static final String YOUTUBE_VIDEO_URL = "https://www.youtube.com/watch?v=%1$s";
static final String YOUTUBE_THUMBNAIL_URL = "https://img.youtube.com/vi/%1$s/0.jpg";

private Api() {
// hide implicit public constructor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.esoxjem.movieguide.details;

import android.os.Bundle;
import android.support.v4.app.NavUtils;
import android.support.v7.app.AppCompatActivity;
import androidx.core.app.NavUtils;
import androidx.appcompat.app.AppCompatActivity;
import android.view.MenuItem;

import com.esoxjem.movieguide.R;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.design.widget.CollapsingToolbarLayout;
import android.support.design.widget.FloatingActionButton;
import android.support.v4.app.Fragment;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.google.android.material.appbar.CollapsingToolbarLayout;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import androidx.fragment.app.Fragment;
import androidx.core.content.ContextCompat;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand Down Expand Up @@ -184,11 +184,11 @@ public void showTrailers(List<Video> trailers)
for (Video trailer : trailers)
{
View thumbContainer = inflater.inflate(R.layout.video, this.trailers, false);
ImageView thumbView = ButterKnife.findById(thumbContainer, R.id.video_thumb);
ImageView thumbView = thumbContainer.findViewById( R.id.video_thumb);
thumbView.setTag(R.id.glide_tag, Video.getUrl(trailer));
thumbView.requestLayout();
thumbView.setOnClickListener(this);
Glide.with(getContext())
Glide.with(requireContext())
.load(Video.getThumbnailUrl(trailer))
.apply(options)
.into(thumbView);
Expand All @@ -214,8 +214,8 @@ public void showReviews(List<Review> reviews)
for (Review review : reviews)
{
ViewGroup reviewContainer = (ViewGroup) inflater.inflate(R.layout.review, reviewsContainer, false);
TextView reviewAuthor = ButterKnife.findById(reviewContainer, R.id.review_author);
TextView reviewContent = ButterKnife.findById(reviewContainer, R.id.review_content);
TextView reviewAuthor = reviewContainer.findViewById(R.id.review_author);
TextView reviewContent = reviewContainer.findViewById(R.id.review_content);
reviewAuthor.setText(review.getAuthor());
reviewContent.setText(review.getContent());
reviewContent.setOnClickListener(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.VisibleForTesting;
import android.support.test.espresso.IdlingResource;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.SearchView;
import android.support.v7.widget.Toolbar;
import androidx.annotation.NonNull;
import androidx.annotation.VisibleForTesting;
import androidx.test.espresso.IdlingResource;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.SearchView;
import androidx.appcompat.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import android.content.Context;
import android.graphics.Bitmap;
import android.support.annotation.Nullable;
import android.support.v7.graphics.Palette;
import android.support.v7.widget.RecyclerView;
import androidx.annotation.Nullable;
import androidx.palette.graphics.Palette;
import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
import android.content.res.Configuration;
import android.os.Bundle;
import android.os.Parcelable;
import android.support.design.widget.Snackbar;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.Fragment;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import com.google.android.material.snackbar.Snackbar;
import androidx.fragment.app.DialogFragment;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.esoxjem.movieguide.listing;

import android.support.annotation.NonNull;
import androidx.annotation.NonNull;
import com.esoxjem.movieguide.Movie;
import com.esoxjem.movieguide.MoviesWraper;
import com.esoxjem.movieguide.favorites.FavoritesInteractor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.esoxjem.movieguide.listing;

import android.support.annotation.NonNull;
import androidx.annotation.NonNull;

import com.esoxjem.movieguide.Movie;
import com.esoxjem.movieguide.util.EspressoIdlingResource;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.DialogFragment;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.DialogFragment;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.RadioButton;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package com.esoxjem.movieguide.util;

import android.support.test.espresso.IdlingResource;
import androidx.test.espresso.IdlingResource;

/**
* Contains a static reference to {@link IdlingResource}, only available in the 'mock' build type.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package com.esoxjem.movieguide.util;

import android.support.test.espresso.IdlingResource;
import androidx.test.espresso.IdlingResource;

import java.util.concurrent.atomic.AtomicInteger;

Expand Down
18 changes: 9 additions & 9 deletions app/src/main/res/layout-sw600dp-land/fragment_movie_details.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<android.support.design.widget.CoordinatorLayout
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/main_content"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
Expand All @@ -7,13 +7,13 @@
android:layout_height="match_parent"
android:layout_alignParentTop="true">

<android.support.design.widget.AppBarLayout
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="280dp"
android:elevation="4dp">

<android.support.design.widget.CollapsingToolbarLayout
<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand All @@ -26,11 +26,11 @@
android:fitsSystemWindows="true"
android:scaleType="centerCrop"/>

</android.support.design.widget.CollapsingToolbarLayout>
</com.google.android.material.appbar.CollapsingToolbarLayout>

</android.support.design.widget.AppBarLayout>
</com.google.android.material.appbar.AppBarLayout>

<android.support.v4.widget.NestedScrollView
<androidx.core.widget.NestedScrollView
android:id="@+id/scrolling_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down Expand Up @@ -101,9 +101,9 @@
</LinearLayout>


</android.support.v4.widget.NestedScrollView>
</androidx.core.widget.NestedScrollView>

<android.support.design.widget.FloatingActionButton
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/favorite"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand All @@ -116,4 +116,4 @@
app:pressedTranslationZ="12dp"
app:rippleColor="@android:color/white"/>

</android.support.design.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
Loading

0 comments on commit 25976ce

Please sign in to comment.