Skip to content

Commit

Permalink
Merge branch 'release/2.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitletondor committed May 13, 2020
2 parents 3972ca3 + 6bd1953 commit 3f423f6
Show file tree
Hide file tree
Showing 46 changed files with 356 additions and 380 deletions.
3 changes: 2 additions & 1 deletion Android/EasyBudget/.idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Android/EasyBudget/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Android/EasyBudget/EasyBudget.iml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="EasyBudget" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<module external.linked.project.id="EasyBudget" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="java-gradle" name="Java-Gradle">
<configuration>
Expand Down
163 changes: 82 additions & 81 deletions Android/EasyBudget/app/app.iml

Large diffs are not rendered by default.

62 changes: 26 additions & 36 deletions Android/EasyBudget/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}

dependencies {
classpath 'io.fabric.tools:gradle:1.31.2'
}
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'io.fabric'
apply plugin: 'com.google.firebase.crashlytics'

apply from: 'batch.gradle'
apply from: 'iap.gradle'

repositories {
google()
maven { url 'https://maven.fabric.io/public' }
maven { url "http://maven.batch.com/release" }
mavenCentral()
}
Expand All @@ -47,8 +35,8 @@ android {
applicationId "com.benoitletondor.easybudgetapp"
minSdkVersion 21
targetSdkVersion 29
versionCode 70
versionName "2.1.3"
versionCode 72
versionName "2.2.0"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
Expand All @@ -59,6 +47,9 @@ android {
buildConfigField "boolean", "ANALYTICS_ACTIVATED", "false"
buildConfigField "boolean", "DEV_PREFERENCES", "true"
buildConfigField "String", "LICENCE_KEY", licence_key
firebaseCrashlytics {
mappingFileUploadEnabled false
}
}
release {
buildConfigField "boolean", "DEBUG_LOG", "false"
Expand Down Expand Up @@ -87,42 +78,41 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.1.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.core:core-ktx:1.2.0'
implementation 'com.google.android.material:material:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.preference:preference-ktx:1.1.0'
implementation 'androidx.preference:preference-ktx:1.1.1'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'
implementation 'androidx.work:work-runtime-ktx:2.3.0'
implementation 'androidx.work:work-gcm:2.3.0'
implementation 'androidx.work:work-runtime-ktx:2.3.4'
implementation 'androidx.work:work-gcm:2.3.4'

implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.3'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.3'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.6'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.6'

implementation 'com.google.firebase:firebase-core:17.2.2'
implementation 'com.google.firebase:firebase-messaging:20.1.0'
implementation 'com.google.firebase:firebase-storage:19.1.0'
implementation 'com.google.firebase:firebase-core:17.4.1'
implementation 'com.google.firebase:firebase-messaging:20.1.7'
implementation 'com.google.firebase:firebase-storage:19.1.1'
implementation 'com.google.firebase:firebase-crashlytics:17.0.0'
implementation 'com.firebaseui:firebase-ui-auth:6.2.0'

implementation 'com.android.billingclient:billing:2.1.0'
implementation 'com.android.billingclient:billing:2.2.0'

implementation project(':caldroid')
implementation 'com.getbase:floatingactionbutton:1.10.1'
implementation 'me.relex:circleindicator:2.1.4@aar'
implementation('com.crashlytics.sdk.android:crashlytics:2.10.1@aar') { transitive = true }
implementation 'com.batch.android:batch-sdk:1.14.4'
implementation 'com.batch.android:batch-sdk:1.15.1'

implementation 'org.koin:koin-core:2.0.1'
implementation 'org.koin:koin-android:2.0.1'
implementation 'org.koin:koin-android-viewmodel:2.0.1'
implementation 'org.koin:koin-java:2.0.1'
implementation 'org.koin:koin-core:2.1.5'
implementation 'org.koin:koin-android:2.1.5'
implementation 'org.koin:koin-android-viewmodel:2.1.5'

kapt "androidx.room:room-compiler:2.2.3"
implementation "androidx.room:room-runtime:2.2.3"
implementation "androidx.room:room-ktx:2.2.3"
kapt "androidx.room:room-compiler:2.2.5"
implementation "androidx.room:room-runtime:2.2.5"
implementation "androidx.room:room-ktx:2.2.5"

implementation 'net.lingala.zip4j:zip4j:2.2.8'
implementation 'net.lingala.zip4j:zip4j:2.5.2'
}

apply plugin: 'com.google.gms.google-services'
14 changes: 1 addition & 13 deletions Android/EasyBudget/app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,4 @@
# public *;
#}

# Batch specific
-keep class com.batch.** {
*;
}

-keep class com.google.android.gms.** {
*;
}

-dontwarn com.batch.android.mediation.**
-dontwarn com.batch.android.BatchPushService

-keep class com.android.vending.billing.**
-keep class * extends androidx.fragment.app.Fragment {}
11 changes: 2 additions & 9 deletions Android/EasyBudget/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="com.android.vending.BILLING" /> <!-- Push -->
<uses-permission android:name="com.android.vending.BILLING" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />

Expand All @@ -29,9 +29,6 @@
<meta-data
android:name="google_analytics_ssaid_collection_enabled"
android:value="false" /> <!-- Fabric.io -->
<meta-data
android:name="io.fabric.ApiKey"
android:value="4f073b46e47c18a4636da5e93128e7c7d9f1600c" />

<activity
android:name=".view.main.MainActivity"
Expand Down Expand Up @@ -68,7 +65,7 @@
android:label="@string/title_activity_add_expense"
android:screenOrientation="portrait" />
<activity
android:name=".view.recurringexpenseadd.RecurringExpenseAddActivity"
android:name=".view.recurringexpenseadd.RecurringExpenseEditActivity"
android:configChanges="locale|keyboardHidden|orientation|screenSize"
android:label="@string/title_activity_recurring_expense_add"
android:screenOrientation="portrait" />
Expand All @@ -91,10 +88,6 @@
android:name=".view.settings.backup.BackupSettingsActivity"
android:label="@string/backup_settings_activity_title" />

<service
android:name=".notif.BackupNotif"
android:exported="false" />

<!-- Push -->
<service
android:name=".push.PushService"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ import com.batch.android.BatchActivityLifecycleHelper
import com.batch.android.BatchNotificationChannelsManager.DEFAULT_CHANNEL_ID
import com.batch.android.Config
import com.batch.android.PushNotificationType
import com.benoitletondor.easybudgetapp.BuildVersion.VERSION_2_1_0
import com.benoitletondor.easybudgetapp.BuildVersion.VERSION_2_1_3
import com.benoitletondor.easybudgetapp.db.DB
import com.benoitletondor.easybudgetapp.helper.*
import com.benoitletondor.easybudgetapp.iab.Iab
Expand All @@ -44,8 +42,7 @@ import com.benoitletondor.easybudgetapp.view.main.MainActivity
import com.benoitletondor.easybudgetapp.view.RatingPopup
import com.benoitletondor.easybudgetapp.view.settings.SettingsActivity
import com.benoitletondor.easybudgetapp.view.getRatingPopupUserStep
import com.crashlytics.android.Crashlytics
import io.fabric.sdk.android.Fabric
import com.google.firebase.crashlytics.FirebaseCrashlytics
import kotlinx.coroutines.runBlocking
import org.koin.android.ext.android.inject
import org.koin.android.ext.koin.androidContext
Expand Down Expand Up @@ -79,9 +76,13 @@ class EasyBudget : Application() {

// Crashlytics
if ( BuildConfig.CRASHLYTICS_ACTIVATED ) {
Fabric.with(this, Crashlytics())
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(true)

Crashlytics.setUserIdentifier(parameters.getLocalId())
parameters.getLocalId()?.let {
FirebaseCrashlytics.getInstance().setUserId(it)
}
} else {
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(false)
}

// Check if an update occurred and perform action if needed
Expand Down Expand Up @@ -365,10 +366,6 @@ class EasyBudget : Application() {
*/
private fun onUpdate(previousVersion: Int, @Suppress("SameParameterValue") newVersion: Int) {
Logger.debug("Update detected, from $previousVersion to $newVersion")

if( previousVersion < VERSION_2_1_0 && newVersion == VERSION_2_1_3 && iab.isUserPremium() && !parameters.isBackupEnabled() ) {
BackupNotif.showBackupNotif(this)
}
}

// -------------------------------------->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ private fun Expense.toExpenseEntity() = ExpenseEntity(
private fun RecurringExpense.toRecurringExpenseEntity() = RecurringExpenseEntity (
id,
title,
originalAmount.getDBValue(),
amount.getDBValue(),
recurringDate,
modified,
type.name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class RecurringExpenseEntity(@PrimaryKey
@ColumnInfo(name = "recurringDate")
val recurringDate: Date,
@ColumnInfo(name = "modified")
val modified: Boolean, // Not implemented yet
val modified: Boolean,
@ColumnInfo(name = "type")
val type: String) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import android.util.Log;

import com.benoitletondor.easybudgetapp.BuildConfig;
import com.crashlytics.android.Crashlytics;
import com.google.firebase.crashlytics.FirebaseCrashlytics;

/**
* Helper to easily log into the application.
Expand Down Expand Up @@ -68,9 +68,9 @@ public static void error(String tag, boolean debug, String msg, Throwable t)
if( BuildConfig.CRASHLYTICS_ACTIVATED )
{
if( t != null ) {
Crashlytics.logException(new Throwable(msg, t));
FirebaseCrashlytics.getInstance().recordException(new Throwable(msg, t));
} else {
Crashlytics.log(Log.ERROR, tag, msg);
FirebaseCrashlytics.getInstance().log("E/"+tag+": "+msg);
}
}
}
Expand Down Expand Up @@ -162,9 +162,9 @@ public static void warning(String tag, boolean debug, String msg, Throwable t)
if( BuildConfig.CRASHLYTICS_ACTIVATED )
{
if( t != null ) {
Crashlytics.logException(new Throwable(msg, t));
FirebaseCrashlytics.getInstance().recordException(new Throwable(msg, t));
} else {
Crashlytics.log(Log.WARN, tag, msg);
FirebaseCrashlytics.getInstance().log("W/"+tag+": "+msg);
}
}
}
Expand Down Expand Up @@ -256,9 +256,9 @@ public static void debug(String tag, boolean debug, String msg, Throwable t)
if( BuildConfig.CRASHLYTICS_ACTIVATED )
{
if( t != null ) {
Crashlytics.logException(new Throwable(msg, t));
FirebaseCrashlytics.getInstance().recordException(new Throwable(msg, t));
} else {
Crashlytics.log(Log.DEBUG, tag, msg);
FirebaseCrashlytics.getInstance().log("D/"+tag+": "+msg);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package com.benoitletondor.easybudgetapp.injection
import com.benoitletondor.easybudgetapp.view.expenseedit.ExpenseEditViewModel
import com.benoitletondor.easybudgetapp.view.main.MainViewModel
import com.benoitletondor.easybudgetapp.view.premium.PremiumViewModel
import com.benoitletondor.easybudgetapp.view.recurringexpenseadd.RecurringExpenseAddViewModel
import com.benoitletondor.easybudgetapp.view.recurringexpenseadd.RecurringExpenseEditViewModel
import com.benoitletondor.easybudgetapp.view.report.MonthlyReportViewModel
import com.benoitletondor.easybudgetapp.view.report.base.MonthlyReportBaseViewModel
import com.benoitletondor.easybudgetapp.view.selectcurrency.SelectCurrencyViewModel
Expand All @@ -33,7 +33,7 @@ val viewModelModule = module {
viewModel { MonthlyReportViewModel(get()) }
viewModel { MonthlyReportBaseViewModel(get()) }
viewModel { ExpenseEditViewModel(get(), get()) }
viewModel { RecurringExpenseAddViewModel(get(), get()) }
viewModel { RecurringExpenseEditViewModel(get(), get()) }
viewModel { PremiumViewModel(get()) }
viewModel { BackupSettingsViewModel(get(), get(), get()) }
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import java.util.*

data class RecurringExpense(val id: Long?,
val title: String,
val originalAmount: Double,
val amount: Double,
val recurringDate: Date,
val modified: Boolean, // Not implemented yet
val modified: Boolean,
val type: RecurringExpenseType) : Parcelable {

private constructor(parcel: Parcel) : this(
Expand All @@ -44,7 +44,7 @@ data class RecurringExpense(val id: Long?,
override fun writeToParcel(parcel: Parcel, flags: Int) {
parcel.writeValue(id)
parcel.writeString(title)
parcel.writeDouble(originalAmount)
parcel.writeDouble(amount)
parcel.writeLong(recurringDate.time)
parcel.writeByte(if (modified) 1 else 0)
parcel.writeInt(type.ordinal)
Expand Down
Loading

0 comments on commit 3f423f6

Please sign in to comment.