diff --git a/.gitignore b/.gitignore index d7f5992..82a7d01 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,5 @@ build/ *.iml app/google-services\.json + +gradle.properties diff --git a/README.md b/README.md index d27a90d..e455904 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # Birthday Reminder 3.0 + Birthday reminder is a simple Material Design Android app which notifies users of upcoming birthdays. Released in 2015, it has had many design and feature update since then, many coming from user requests. Recent additions include Firebase auth and realtime database for data backup. As I built this when I was quite inexperienced, it doesn't follow any of the common Android architecture patterns, so I wouldn't recommend using this structure elsewhere. - + + ![](http://i.imgur.com/zcF2X4Z.png)![](http://i.imgur.com/PaiXGEV.png) ![](http://i.imgur.com/VXJWF8g.png)![](http://i.imgur.com/yC20tDa.png) @@ -35,9 +37,18 @@ Once this is resolved, you should see the following error: ``` File google-services.json is missing. The Google Services Plugin cannot function without it. ``` + This is because the app depends on Firebase for auhentication and data persistance. You will need to set up your own Firebase account and project here: https://firebase.google.com/ Once you have an app environemt set up, you should be prompted to download a google-services.json file (you can also find it later on the project settings page). Drop this file under the 'app' module and you should now be able to build the app to a device. -One futher note, you may need to enable Google auth on the firebase console. +You will also need to enable Google auth on the firebase console, and setup a google sign in key: https://developers.google.com/identity/sign-in/android/. Add the key to the project level gradle.properties file like so: +``` groovy +... + + +GOOGLE_SIGN_IN_KEY = "3716492804734-3v8qb0386kmfsas4eu44amna8a3b8c13.apps.googleusercontent.com"; +``` + +Now you should be able to build the project locally, sign in with google and save data to Firebase. \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index a4f6eb3..62b9d1a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -3,13 +3,12 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' android { - compileSdkVersion 23 - buildToolsVersion '26.0.2' + compileSdkVersion 27 defaultConfig { applicationId "website.julianrosser.birthdays" - minSdkVersion 11 - targetSdkVersion 23 + minSdkVersion 14 + targetSdkVersion 27 versionCode 301 versionName "3.0.1" } @@ -33,23 +32,23 @@ android { } } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.google.android.gms:play-services-auth:10.0.1' - compile 'org.greenrobot:eventbus:3.0.0' - compile 'com.android.support:appcompat-v7:23.4.0' - compile 'com.android.support:recyclerview-v7:23.4.0' - compile 'com.android.support:support-v4:23.4.0' - compile 'org.apache.commons:commons-lang3:3.3.2' - compile 'com.android.support:design:23.4.0' - compile 'com.google.firebase:firebase-appindexing:10.0.1' - compile 'com.google.android.gms:play-services-analytics:10.0.1' - compile 'org.greenrobot:eventbus:3.0.0' - compile 'com.google.firebase:firebase-core:10.0.1' - compile 'com.google.firebase:firebase-crash:10.0.1' - compile 'com.google.firebase:firebase-auth:10.0.1' - compile 'com.google.firebase:firebase-database:10.0.1' - compile 'com.google.android.gms:play-services-auth:10.0.1' - compile 'com.squareup.picasso:picasso:2.5.2' - compile "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation "com.google.android.gms:play-services-auth:$googleServicesVersion" + implementation 'org.greenrobot:eventbus:3.0.0' + implementation 'com.android.support:appcompat-v7:27.1.1' + implementation 'com.android.support:recyclerview-v7:27.1.1' + implementation 'com.android.support:support-v4:27.1.1' + implementation 'org.apache.commons:commons-lang3:3.3.2' + implementation 'com.android.support:design:27.1.1' + implementation "com.google.android.gms:play-services-analytics:$firebaseVersion" + implementation 'org.greenrobot:eventbus:3.0.0' + implementation "com.google.firebase:firebase-appindexing:$firebaseVersion" + implementation "com.google.firebase:firebase-core:$firebaseVersion" + implementation "com.google.firebase:firebase-crash:$firebaseVersion" + implementation "com.google.firebase:firebase-auth:$firebaseVersion" + implementation "com.google.firebase:firebase-database:$firebaseVersion" + implementation "com.google.android.gms:play-services-auth:$googleServicesVersion" + implementation 'com.squareup.picasso:picasso:2.5.2' + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" } apply plugin: 'com.google.gms.google-services' \ No newline at end of file diff --git a/build.gradle b/build.gradle index 20ee844..6400938 100644 --- a/build.gradle +++ b/build.gradle @@ -1,13 +1,19 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.2.21' + ext { + kotlin_version = '1.2.30' + firebaseVersion = '15.0.0' + googleServicesVersion = '15.0.0' + } + repositories { jcenter() + google() } dependencies { - classpath 'com.android.tools.build:gradle:3.0.1' - classpath 'com.google.gms:google-services:3.0.0' + classpath 'com.android.tools.build:gradle:3.1.1' + classpath 'com.google.gms:google-services:3.1.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -17,5 +23,6 @@ allprojects { repositories { jcenter() mavenCentral() + google() } } diff --git a/gradle.properties b/gradle.properties deleted file mode 100644 index 3ff7b78..0000000 --- a/gradle.properties +++ /dev/null @@ -1,20 +0,0 @@ -# Project-wide Gradle settings. - -# IDE (e.g. Android Studio) users: -# Gradle settings configured through the IDE *will override* -# any settings specified in this file. - -# For more details on how to configure your build environment visit -# http://www.gradle.org/docs/current/userguide/build_environment.html - -# Specifies the JVM arguments used for the daemon process. -# The setting is particularly useful for tweaking memory settings. -# Default value: -Xmx10248m -XX:MaxPermSize=256m -# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 - -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true - -GOOGLE_SIGN_IN_KEY = "1072707269724-3v8qbbu86kmfs252eu44amna8cpqqj9c.apps.googleusercontent.com"; \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 5dcc71b..ba0bc97 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Jan 29 19:02:31 GMT 2018 +#Sun Apr 15 14:21:29 BST 2018 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip