diff --git a/.travis.yml b/.travis.yml index 14ae5e691..e82b41b71 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,10 +24,10 @@ android: - tools # The BuildTools version used by your project - - build-tools-24.0.2 + - build-tools-24.0.3 # The SDK version used to compile your project - - android-24 + - android-25 # Additional components - extra-google-google_play_services @@ -38,6 +38,10 @@ android: # if you need to run emulator(s) during your tests #- sys-img-armeabi-v7a-android-19 #- sys-img-x86-android-17 + licenses: + - 'android-sdk-preview-license-52d11cd2' + - 'android-sdk-license-.+' + - 'google-gdk-license-.+' script: - cp habitica.properties.travis habitica.properties - cp habitica.resources.example habitica.resources diff --git a/Habitica/AndroidManifest.xml b/Habitica/AndroidManifest.xml index 68e82b5d1..e1da14bb0 100644 --- a/Habitica/AndroidManifest.xml +++ b/Habitica/AndroidManifest.xml @@ -2,8 +2,8 @@ @@ -24,7 +24,8 @@ android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" - android:theme="@style/AppTheme"> + android:theme="@style/AppTheme" + tools:replace="android:name"> - @@ -129,7 +129,6 @@ android:configChanges= "keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:screenOrientation="portrait" - android:theme="@android:style/Theme.Translucent.NoTitleBar" android:label="@string/app_name" /> - @@ -204,7 +202,15 @@ + android:resource="@xml/task_list_widget_info" /> + + + + + + @@ -218,6 +224,9 @@ + diff --git a/Habitica/build.gradle b/Habitica/build.gradle index 09897ad72..41f37d0db 100644 --- a/Habitica/build.gradle +++ b/Habitica/build.gradle @@ -11,76 +11,62 @@ buildscript { } dependencies { classpath 'io.fabric.tools:gradle:1.21.5' - classpath 'me.tatarka:gradle-retrolambda:3.2.5' + classpath 'me.tatarka:gradle-retrolambda:3.3.1' classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.6.1' classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' - classpath 'com.jakewharton.hugo:hugo-plugin:1.2.1' } } repositories { mavenLocal() mavenCentral() - maven { - url "https://oss.sonatype.org/content/repositories/snapshots" - } + maven { url "https://oss.sonatype.org/content/repositories/snapshots" } maven { url 'https://maven.fabric.io/public' } // Material View Pager - maven { - url "http://dl.bintray.com/florent37/maven" - } + maven { url "http://dl.bintray.com/florent37/maven" } // Markdown - maven { - url "https://s3.amazonaws.com/repo.commonsware.com" - } + maven { url "https://s3.amazonaws.com/repo.commonsware.com" } - maven { - url "https://jitpack.io" - } + maven { url "https://jitpack.io" } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) //Networking - compile 'com.squareup.okhttp3:okhttp-urlconnection:3.4.1' compile 'com.squareup.okhttp3:okhttp:3.4.1' compile 'com.squareup.okhttp3:logging-interceptor:3.4.1' //REST API handling - compile ('com.squareup.retrofit2:retrofit:2.1.0') { + compile('com.squareup.retrofit2:retrofit:2.1.0') { exclude module: 'okhttp' } compile 'com.squareup.retrofit2:converter-gson:2.1.0' compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0' //Crash Logging - compile('com.crashlytics.sdk.android:crashlytics:2.6.0@aar') { + releaseCompile('com.crashlytics.sdk.android:crashlytics:2.6.0@aar') { transitive = true; } // View Elements Binding :) - compile 'com.jakewharton:butterknife:8.2.1' - apt 'com.jakewharton:butterknife-compiler:8.2.1' + compile 'com.jakewharton:butterknife:8.4.0' + apt 'com.jakewharton:butterknife-compiler:8.4.0' //Dependency Injection - compile 'com.google.dagger:dagger:2.5' - apt 'com.google.dagger:dagger-compiler:2.5' + compile 'com.google.dagger:dagger:2.7' + apt 'com.google.dagger:dagger-compiler:2.7' provided 'org.glassfish:javax.annotation:10.0-b28' //App Compatibility and Material Design compile('com.mikepenz:materialdrawer:5.3.6@aar') { transitive = true } - compile 'com.android.support:appcompat-v7:24.2.1' - compile 'com.android.support:design:24.2.1' - compile 'com.android.support:gridlayout-v7:24.2.1' - compile 'com.android.support:recyclerview-v7:24.2.1' - compile 'com.android.support:preference-v14:24.2.1' + compile 'com.android.support:appcompat-v7:25.0.1' + compile 'com.android.support:design:25.0.1' + compile 'com.android.support:recyclerview-v7:25.0.1' + compile 'com.android.support:preference-v14:25.0.1' compile 'com.android.support:multidex:1.0.1' - // Image Loading/Caching - compile 'com.squareup.picasso:picasso:2.5.2' - //QR Code compile 'com.github.kenglxn.QRGen:android:2.2.0' @@ -110,10 +96,12 @@ dependencies { compile 'org.solovyev.android:checkout:0.7.5@aar' //Facebook - compile('com.facebook.android:facebook-android-sdk:4.11.0') { + compile('com.facebook.android:facebook-android-sdk:4.17.0') { transitive = true } - compile 'fr.avianey.com.viewpagerindicator:library:2.4.1.1@aar' + + compile 'fr.avianey.com.viewpagerindicator:library:2.4.1@aar' + //RxJava compile 'io.reactivex:rxandroid:1.2.1' compile 'io.reactivex:rxjava:1.2.0' @@ -122,35 +110,40 @@ dependencies { compile 'com.amplitude:android-sdk:2.9.2' // Fresco Image Management Library - compile('com.facebook.fresco:fresco:0.11.0') { + compile('com.facebook.fresco:fresco:0.14.0') { exclude module: 'bolts-android' } - compile('com.facebook.fresco:animated-gif:0.11.0') { + compile('com.facebook.fresco:animated-gif:0.14.0') { exclude module: 'bolts-android' } //Tests testCompile "junit:junit:4.10" testCompile "org.assertj:assertj-core:1.7.0" - testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1' + testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5' testCompile "org.robolectric:robolectric:3.1" testCompile 'org.robolectric:shadows-multidex:3.1' testCompile "org.robolectric:shadows-support-v4:3.1" testCompile "org.mockito:mockito-core:1.10.19" //Leak Detection - debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3.1' - releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1' + debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5' + releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5' //Push Notifications compile 'com.google.firebase:firebase-core:9.4.0' compile 'com.google.firebase:firebase-messaging:9.4.0' compile 'com.google.android.gms:play-services-auth:9.4.0' + + compile(project(':seeds-sdk')) { + exclude group: 'com.google.android.gms' + exclude group: 'com.android.support', module: 'multidex' + } } android { - compileSdkVersion 24 - buildToolsVersion "24.0.2" + compileSdkVersion 25 + buildToolsVersion "24.0.3" defaultConfig { applicationId "com.habitrpg.android.habitica" @@ -170,6 +163,7 @@ android { multiDexEnabled true minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + // Disable fabric build ID generation for debug builds ext.enableCrashlytics = false resValue "string", "content_provider", "com.habitrpg.android.habitica.debug.fileprovider" resValue "string", "app_name", "Habitica Debug" @@ -200,8 +194,8 @@ android { java.srcDir file('src/test/java/') res.srcDirs = ['res'] } - release.setRoot('build-types/release') instrumentTest.setRoot('tests') + release { java.srcDirs = ['src/release/java'] } } compileOptions { @@ -287,5 +281,4 @@ tasks.whenTaskAdded { task -> apply plugin: 'com.getkeepsafe.dexcount' apply plugin: 'com.android.application' //or apply plugin: 'java' apply plugin: 'me.tatarka.retrolambda' -apply plugin: 'com.jakewharton.hugo' apply plugin: 'com.google.gms.google-services' diff --git a/Habitica/google-services.json.example b/Habitica/google-services.json.example index a7499e800..a75180c30 100644 --- a/Habitica/google-services.json.example +++ b/Habitica/google-services.json.example @@ -41,7 +41,7 @@ "client_info": { "mobilesdk_app_id": "app-id", "android_client_info": { - "package_name": "com.habitrpg.android.habitica.debug" + "package_name": "com.habitrpg.android.habitica" } }, "oauth_client": [ diff --git a/Habitica/res/drawable/seeds_badge_store.png b/Habitica/res/drawable/seeds_badge_store.png new file mode 100644 index 000000000..d29f00e6b Binary files /dev/null and b/Habitica/res/drawable/seeds_badge_store.png differ diff --git a/Habitica/res/layout/activity_full_profile.xml b/Habitica/res/layout/activity_full_profile.xml index 3ffe67ccd..210812e4d 100644 --- a/Habitica/res/layout/activity_full_profile.xml +++ b/Habitica/res/layout/activity_full_profile.xml @@ -293,7 +293,7 @@ android:text="@string/attributes" android:textStyle="bold" /> - - - - - - - + fab:fab_label="@string/new_habit" /> + fab:fab_label="@string/new_daily" /> + fab:fab_label="@string/new_todo" /> + fab:fab_label="@string/new_reward" /> diff --git a/Habitica/res/layout/fragment_gem_purchase.xml b/Habitica/res/layout/fragment_gem_purchase.xml index a88e89edb..9e9cb0c8f 100644 --- a/Habitica/res/layout/fragment_gem_purchase.xml +++ b/Habitica/res/layout/fragment_gem_purchase.xml @@ -73,7 +73,8 @@ android:layout_height="wrap_content" android:layout_weight="1" app:gemAmount="84" - app:gemDrawable="@drawable/gems_84" /> + app:gemDrawable="@drawable/gems_84" + app:showSeedsPromo="true" /> - - - - - - - - diff --git a/Habitica/res/layout/purchase_gem_view.xml b/Habitica/res/layout/purchase_gem_view.xml index e42fd0493..8b03bc4a6 100644 --- a/Habitica/res/layout/purchase_gem_view.xml +++ b/Habitica/res/layout/purchase_gem_view.xml @@ -4,7 +4,8 @@ android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/gem_view_background" - android:gravity="center"> + android:gravity="center" + android:padding="14dp"> + android:gravity="center" + android:layout_marginBottom="14dp" />