Skip to content

Commit

Permalink
Merge pull request #48 from bookdash/develop
Browse files Browse the repository at this point in the history
Develop -> Master
  • Loading branch information
riggaroo authored Jan 15, 2020
2 parents 5274329 + c2239ba commit 82e1764
Show file tree
Hide file tree
Showing 97 changed files with 2,582 additions and 827 deletions.
112 changes: 42 additions & 70 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
}

dependencies {
classpath 'io.fabric.tools:gradle:1.25.1'
classpath 'io.fabric.tools:gradle:1.31.2'
}
}
apply plugin: 'com.android.application'
Expand All @@ -23,17 +23,17 @@ repositories {

android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion '27.0.3'

defaultConfig {
applicationId "org.bookdash.android"
minSdkVersion 16
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.compileSdkVersion
versionCode rootProject.ext.versionCode
versionName "$rootProject.ext.versionName"
testInstrumentationRunner "org.bookdash.android.presentation.CustomTestRunner"
resConfigs "en"
vectorDrawables.useSupportLibrary = true
multiDexEnabled true

}
dataBinding {
Expand Down Expand Up @@ -126,91 +126,63 @@ dependencies {
testImplementation("org.powermock:powermock-module-junit4:$rootProject.ext.powerMockito")
testImplementation("org.powermock:powermock-api-mockito:$rootProject.ext.powerMockito")

// Android Testing Support Library's runner and rules
androidTestImplementation('com.android.support.test.espresso:espresso-web:2.2.1') {
exclude module: 'support-annotations'
exclude module: 'support-v4'
}
androidTestImplementation("com.android.support.test:runner:$rootProject.ext.runnerVersion") {
exclude module: 'support-annotations'
exclude module: 'support-v4'
}
androidTestImplementation("com.android.support.test:rules:$rootProject.ext.runnerVersion") {
exclude module: 'support-annotations'
exclude module: 'support-v4'
}
// Android Testing Library's runner and rules
androidTestImplementation 'androidx.test.espresso:espresso-web:3.2.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test:rules:1.2.0'

// Espresso UI Testing
androidTestImplementation("com.android.support.test.espresso:espresso-core:$rootProject.ext.espressoVersion") {
exclude module: 'recyclerview-v7'
exclude module: 'support-annotations'
exclude module: 'support-v4'
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0') {
exclude group: "javax.inject"

}
androidTestImplementation("com.android.support.test.espresso:espresso-contrib:$rootProject.ext.espressoVersion") {
exclude 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.espresso:espresso-intents:$rootProject.ext.espressoVersion") {
exclude module: 'recyclerview-v7'
exclude module: 'support-annotations'
exclude module: 'support-v4'
}
androidTestImplementation "com.android.support:appcompat-v7:$rootProject.ext.supportLibraryVersion"
androidTestImplementation "com.android.support:design:$rootProject.ext.supportLibraryVersion"
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.2.0'
androidTestImplementation 'androidx.appcompat:appcompat:1.1.0'
androidTestImplementation "com.google.android.material:material:$rootProject.ext.materialVersion"

implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':fabbutton')

implementation "com.android.support:appcompat-v7:$rootProject.ext.supportLibraryVersion"
implementation "com.android.support:cardview-v7:$rootProject.ext.supportLibraryVersion"
implementation "com.android.support:palette-v7:$rootProject.ext.supportLibraryVersion"
implementation "com.android.support:design:$rootProject.ext.supportLibraryVersion"
implementation "com.android.support:recyclerview-v7:$rootProject.ext.supportLibraryVersion"
implementation "com.android.support:percent:$rootProject.ext.supportLibraryVersion"
implementation "com.android.support:preference-v7:$rootProject.ext.supportLibraryVersion"
implementation "com.android.support:preference-v14:$rootProject.ext.supportLibraryVersion"
implementation 'com.github.bumptech.glide:glide:3.8.0'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.palette:palette:1.0.0'
implementation "com.google.android.material:material:$rootProject.ext.materialVersion"
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.percentlayout:percentlayout:1.0.0'
implementation 'androidx.preference:preference:1.1.0'
implementation 'androidx.legacy:legacy-preference-v14:1.0.0'
implementation "com.github.bumptech.glide:glide:$rootProject.ext.glideVersion"
kapt "com.github.bumptech.glide:compiler:$rootProject.ext.glideVersion"
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.github.castorflex.smoothprogressbar:library-circular:1.2.0'

implementation('com.crashlytics.sdk.android:crashlytics:2.5.3@aar') {
implementation('com.crashlytics.sdk.android:crashlytics:2.10.1@aar') {
transitive = true
}
implementation('za.co.riggaroo:materialhelptutorial:1.6.0') {
exclude module: 'support-v4'
}

implementation("com.google.firebase:firebase-invites:${rootProject.ext.googlePlayServicesVersion}") {
exclude module: 'support-v4'
}
implementation("com.google.firebase:firebase-core:${rootProject.ext.googlePlayServicesVersion}") {
exclude module: 'support-v4'
}
implementation "com.google.firebase:firebase-database:${rootProject.ext.googlePlayServicesVersion}"
implementation "com.google.firebase:firebase-messaging:${rootProject.ext.googlePlayServicesVersion}"
implementation("com.google.firebase:firebase-config:${rootProject.ext.googlePlayServicesVersion}") {
exclude module: 'support-v4'
}
implementation("com.google.firebase:firebase-storage:${rootProject.ext.googlePlayServicesVersion}") {
exclude module: 'support-v4'
}
implementation('com.firebaseui:firebase-ui-storage:0.6.1') {
exclude module: 'support-v4'
}
implementation "com.google.firebase:firebase-perf:${rootProject.ext.googlePlayServicesVersion}"
implementation 'com.google.firebase:firebase-analytics:17.2.1'
implementation 'com.google.firebase:firebase-auth:19.2.0'
implementation 'com.google.firebase:firebase-database:19.2.0'
implementation 'com.google.firebase:firebase-messaging:20.0.1'
implementation 'com.google.firebase:firebase-config:19.0.3'
implementation 'com.google.firebase:firebase-storage:19.1.0'
implementation 'com.firebaseui:firebase-ui-storage:6.1.0'
implementation 'com.google.firebase:firebase-perf:19.0.2'

implementation 'io.reactivex:rxandroid:1.2.1'
implementation 'io.reactivex:rxjava:1.2.5'
implementation 'com.jakewharton.threetenabp:threetenabp:1.0.5'
implementation 'com.jakewharton.timber:timber:4.6.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0-beta5'
implementation "android.arch.lifecycle:extensions:1.1.0"
implementation 'com.jakewharton.timber:timber:4.7.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.multidex:multidex:2.0.1'

implementation project(path: ':materialhelptutorial')
implementation project(':fabbutton')
}




apply plugin: 'kotlin-kapt'
apply plugin: 'com.google.gms.google-services'
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
import android.os.Bundle;
import android.os.IBinder;
import android.os.PowerManager;
import android.support.test.runner.AndroidJUnitRunner;
import android.util.Log;

import androidx.test.runner.AndroidJUnitRunner;

import java.lang.reflect.Method;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

import android.content.Intent;
import android.net.Uri;
import android.support.test.InstrumentationRegistry;
import android.support.test.espresso.intent.Intents;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
import android.text.Html;

import androidx.test.espresso.intent.Intents;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.SmallTest;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.rule.ActivityTestRule;

import junit.framework.Assert;

import org.bookdash.android.R;
Expand All @@ -20,15 +21,15 @@
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.action.ViewActions.scrollTo;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.intent.Intents.intended;
import static android.support.test.espresso.intent.matcher.IntentMatchers.hasAction;
import static android.support.test.espresso.intent.matcher.IntentMatchers.hasData;
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
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.action.ViewActions.scrollTo;
import static androidx.test.espresso.assertion.ViewAssertions.matches;
import static androidx.test.espresso.intent.Intents.intended;
import static androidx.test.espresso.intent.matcher.IntentMatchers.hasAction;
import static androidx.test.espresso.intent.matcher.IntentMatchers.hasData;
import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;
import static androidx.test.espresso.matcher.ViewMatchers.withText;
import static org.hamcrest.Matchers.allOf;

/**
Expand All @@ -55,8 +56,8 @@ public void tearDown() {

@Test
public void loadAboutBookDash_SeeInformation() throws Throwable {
CharSequence about = Html.fromHtml(InstrumentationRegistry.getTargetContext().getString(R.string.why_bookdash));
String headingAbout = InstrumentationRegistry.getTargetContext().getString(R.string.heading_about);
CharSequence about = Html.fromHtml(InstrumentationRegistry.getInstrumentation().getTargetContext().getString(R.string.why_bookdash));
String headingAbout = InstrumentationRegistry.getInstrumentation().getTargetContext().getString(R.string.heading_about);

onView(withText(headingAbout)).check(matches(isDisplayed()));

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.bookdash.android.presentation.listbooks;

import android.support.test.espresso.intent.Intents;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.LargeTest;
import androidx.test.espresso.intent.Intents;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.LargeTest;
import androidx.test.rule.ActivityTestRule;

import org.bookdash.android.R;
import org.bookdash.android.presentation.main.MainActivity;
Expand All @@ -14,13 +14,13 @@
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.RootMatchers.isDialog;
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.RootMatchers.isDialog;
import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static androidx.test.espresso.matcher.ViewMatchers.withText;


@RunWith(AndroidJUnit4.class)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package org.bookdash.android.presentation.utils;

import android.app.Activity;
import android.support.design.widget.NavigationView;
import com.google.android.material.navigation.NavigationView;

import org.bookdash.android.R;

import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.matcher.ViewMatchers.isClickable;
import static android.support.test.espresso.matcher.ViewMatchers.withContentDescription;
import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.action.ViewActions.click;
import static androidx.test.espresso.matcher.ViewMatchers.isClickable;
import static androidx.test.espresso.matcher.ViewMatchers.withContentDescription;
import static org.hamcrest.Matchers.allOf;
import static org.hamcrest.Matchers.containsString;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
package org.bookdash.android.presentation.bookinfo;

import android.content.Intent;
import android.support.test.espresso.intent.Intents;
import android.support.test.espresso.matcher.ViewMatchers;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.LargeTest;

import androidx.test.espresso.intent.Intents;
import androidx.test.espresso.matcher.ViewMatchers;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.rule.ActivityTestRule;

import org.bookdash.android.domain.model.firebase.FireBookDetails;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;

import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.matcher.ViewMatchers.withEffectiveVisibility;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.assertion.ViewAssertions.matches;
import static androidx.test.espresso.matcher.ViewMatchers.withEffectiveVisibility;
import static androidx.test.espresso.matcher.ViewMatchers.withText;

/**
* @author rebeccafranks
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package org.bookdash.android.presentation.listbooks;

import android.support.test.InstrumentationRegistry;
import android.support.test.espresso.ViewInteraction;
import android.support.test.espresso.intent.Intents;
import android.support.test.espresso.matcher.BoundedMatcher;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;
import android.support.v7.widget.Toolbar;
import androidx.appcompat.widget.Toolbar;
import androidx.test.espresso.ViewInteraction;
import androidx.test.espresso.intent.Intents;
import androidx.test.espresso.matcher.BoundedMatcher;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.rule.ActivityTestRule;

import junit.framework.Assert;

Expand All @@ -24,16 +24,16 @@
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.doesNotExist;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.intent.Intents.intended;
import static android.support.test.espresso.intent.matcher.IntentMatchers.hasComponent;
import static android.support.test.espresso.matcher.ViewMatchers.isAssignableFrom;
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.doesNotExist;
import static androidx.test.espresso.assertion.ViewAssertions.matches;
import static androidx.test.espresso.intent.Intents.intended;
import static androidx.test.espresso.intent.matcher.IntentMatchers.hasComponent;
import static androidx.test.espresso.matcher.ViewMatchers.isAssignableFrom;
import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static androidx.test.espresso.matcher.ViewMatchers.withText;
import static org.hamcrest.Matchers.is;

/**
Expand Down
Loading

0 comments on commit 82e1764

Please sign in to comment.