Skip to content

Commit

Permalink
Merge pull request #34 from mazurio/123
Browse files Browse the repository at this point in the history
1.3.0
  • Loading branch information
mazurio authored Sep 10, 2016
2 parents 8cefbc5 + 671fc51 commit 61022f3
Show file tree
Hide file tree
Showing 254 changed files with 7,179 additions and 3,957 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ api.xml
api.properties
fabric.properties
gradle.properties
google-services.json

# Built application files
*.apk
Expand Down
42 changes: 23 additions & 19 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
apply plugin: 'com.android.application'
apply plugin: 'me.tatarka.retrolambda'

apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
Expand All @@ -9,20 +8,21 @@ apply plugin: 'io.fabric'

android {
dexOptions {
incremental true
incremental false
maxProcessCount 4
}

compileSdkVersion 23
buildToolsVersion '23.0.3'
defaultConfig {
applicationId 'com.bodyweight.fitness'
minSdkVersion 14
minSdkVersion 16
targetSdkVersion 23
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_6
targetCompatibility JavaVersion.VERSION_1_6
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
Expand All @@ -40,14 +40,14 @@ android {
productFlavors {
pro {
applicationId 'com.bodyweight.fitness.pro'
versionCode 122
versionName "1.2.2"
versionCode 133
versionName "1.3.0"
}

free {
applicationId 'com.bodyweight.fitness.free'
versionCode 122
versionName "1.2.2"
versionCode 133
versionName "1.3.0"
}
}
buildTypes {
Expand All @@ -64,6 +64,7 @@ android {
sourceSets {
main.java.srcDirs += 'src/main/java'
main.java.srcDirs += 'src/main/kotlin'
androidTest.java.srcDirs += 'src/androidTest/kotlin'
test.java.srcDirs += 'src/test/kotlin'
}
}
Expand All @@ -80,9 +81,13 @@ dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')

testCompile 'org.jetbrains.spek:spek:1.0.9'
// testCompile "com.nhaarman:mockito-kotlin:0.3.0"
testCompile 'org.mockito:mockito-all:2.0.2-beta'

androidTestCompile 'com.android.support:support-annotations:23.3.0'
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support.test:rules:0.5'
androidTestCompile "com.android.support.test.espresso:espresso-core:2.2.2"

compile 'com.android.support:support-v4:23.3.0'
compile 'com.android.support:recyclerview-v7:23.3.0'
compile 'com.android.support:cardview-v7:23.3.0'
Expand All @@ -92,23 +97,22 @@ dependencies {

compile 'commons-io:commons-io:2.4'
compile 'net.danlew:android.joda:2.9.3'
compile 'com.github.bumptech.glide:glide:3.7.0'

compile 'com.jakewharton:butterknife:6.1.0'
kapt 'com.jakewharton:butterknife:6.1.0'

compile 'com.netflix.rxjava:rxjava-core:0.20.7'
compile 'io.reactivex:rxandroid:1.2.0'
compile 'io.reactivex:rxjava:1.1.5'

compile 'com.trello:rxlifecycle:0.5.0'
compile 'com.trello:rxlifecycle-components:0.5.0'
compile 'com.trello:rxlifecycle-kotlin:0.5.0'
compile 'com.trello:rxlifecycle:0.6.1'
compile 'com.trello:rxlifecycle-components:0.6.1'
compile 'com.trello:rxlifecycle-kotlin:0.6.1'

compile 'com.robinhood.spark:spark:1.1.0'

compile 'com.github.johnkil.android-robototextview:robototextview:2.5.0'
compile 'com.gordonwong:material-sheet-fab:1.2.1'
compile 'com.github.bmarrdev:android-DecoView-charting:v1.0.1'
compile 'io.github.kobakei:ratethisapp:1.0.3'
compile 'com.github.paolorotolo:appintro:4.0.0'

compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
transitive = true;
}
Expand All @@ -118,7 +122,7 @@ dependencies {
}

buildscript {
ext.kotlin_version = '1.0.1'
ext.kotlin_version = '1.0.1-2'
repositories {
mavenCentral()
maven {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
package com.bodyweight.fitness

import android.support.test.espresso.Espresso.onView
import android.support.test.espresso.action.ViewActions.click
import android.support.test.espresso.assertion.ViewAssertions.matches
import android.support.test.espresso.matcher.ViewMatchers
import android.support.test.espresso.matcher.ViewMatchers.*
import android.test.ActivityInstrumentationTestCase2

import com.bodyweight.fitness.ui.MainActivity

class MainActivityTest : ActivityInstrumentationTestCase2<MainActivity>(MainActivity::class.java) {
override fun setUp() {
super.setUp()

activity
}

fun testExerciseSetup() {
onView(withId(R.id.toolbar_exercise_title))
.check(matches(withText("Shoulder Rolls")))
onView(withId(R.id.toolbar_section_title))
.check(matches(withText("Dynamic Stretches")))
onView(withId(R.id.toolbar_exercise_description))
.check(matches(withText("1x(5-10)")))

onView(withId(R.id.prev_exercise_button))
.check(matches(withEffectiveVisibility(ViewMatchers.Visibility.INVISIBLE)));
onView(withId(R.id.next_exercise_button))
.check(matches(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)));

onView(withId(R.id.next_exercise_button)).perform(click())

onView(withId(R.id.toolbar_exercise_title))
.check(matches(withText("Scapular Shrugs")))
onView(withId(R.id.toolbar_section_title))
.check(matches(withText("Dynamic Stretches")))
onView(withId(R.id.toolbar_exercise_description))
.check(matches(withText("1x(5-10)")))

onView(withId(R.id.prev_exercise_button))
.check(matches(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)));
onView(withId(R.id.next_exercise_button))
.check(matches(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)));

onView(withId(R.id.next_exercise_button)).perform(click())
onView(withId(R.id.next_exercise_button)).perform(click())
onView(withId(R.id.next_exercise_button)).perform(click())
onView(withId(R.id.next_exercise_button)).perform(click())
onView(withId(R.id.next_exercise_button)).perform(click())

onView(withId(R.id.toolbar_exercise_title))
.check(matches(withText("Front and Side Leg Swings")))
onView(withId(R.id.toolbar_section_title))
.check(matches(withText("Dynamic Stretches")))
onView(withId(R.id.toolbar_exercise_description))
.check(matches(withText("1x(5-10)")))

onView(withId(R.id.prev_exercise_button))
.check(matches(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)));
onView(withId(R.id.next_exercise_button))
.check(matches(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)));
}
}
25 changes: 25 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,21 @@
android:theme="@style/AppTheme"
android:name=".App">

<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="com.bodyweight.fitness.fileprovider"
android:exported="false"
android:grantUriPermissions="true">

<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/filepaths" />
</provider>

<activity
android:name=".ui.IntroductionActivity"
android:theme="@style/FullscreenTheme" />

<activity
android:name=".ui.MainActivity"
android:label="@string/app_name">
Expand Down Expand Up @@ -50,6 +65,16 @@
android:value=".ui.MainActivity" />
</activity>

<activity
android:name=".ui.ProgressExerciseActivity"
android:parentActivityName=".ui.ProgressExerciseActivity"
android:theme="@style/AppTheme.Activity.Progress">

<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".ui.ProgressExerciseActivity" />
</activity>

<activity
android:name=".ui.SettingsActivity"
android:parentActivityName=".ui.MainActivity"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.bodyweight.fitness.model.exception;
package com.bodyweight.fitness.exception;

public class CacheDirectoryCreationException extends Exception {
public CacheDirectoryCreationException(String detailMessage) {
Expand Down
39 changes: 0 additions & 39 deletions app/src/main/java/com/bodyweight/fitness/model/Category.java

This file was deleted.

Loading

0 comments on commit 61022f3

Please sign in to comment.