Skip to content

Commit

Permalink
Merge pull request #364 from enviroCar/upgrade/rxjava
Browse files Browse the repository at this point in the history
Upgrade/rxjava
  • Loading branch information
dewall authored Nov 18, 2019
2 parents 1a7210d + 9f08620 commit 1b59162
Show file tree
Hide file tree
Showing 353 changed files with 13,110 additions and 13,566 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ build/
**/*.iml
*.iml
local.properties

*/release/
40 changes: 26 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.android.tools.build:gradle:3.5.0'
classpath "gradle.plugin.nl.javadude.gradle.plugins:license-gradle-plugin:0.12.1"
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
}
Expand Down Expand Up @@ -50,24 +50,31 @@ ext {
compileSdkVersion = 28
targetSdkVersion = 28
buildToolsVersion = '28.0.3'
versionCode = 34
versionName = "0.22.5"
versionCode = 35
versionName = "1.0.0"

javaCompileVersion = JavaVersion.VERSION_1_8

// Android dependencies.
supportV4 = 'androidx.legacy:legacy-support-v4:1.0.0'
supportV7 = 'androidx.appcompat:appcompat:1.0.0'
supportV7 = 'androidx.appcompat:appcompat:1.1.0'
supportDesign = 'com.google.android.material:material:1.0.0'
supportCardview = 'androidx.cardview:cardview:1.0.0'
supportRecyclerview = 'androidx.recyclerview:recyclerview:1.0.0'
supportConstraintLayout = 'androidx.constraintlayout:constraintlayout:1.1.3'
androidxPreference = 'androidx.preference:preference:1.1.0'

def lifecycle_version = "2.0.0"
supportLifecycleExtension = "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
supportLifecycleRuntime = "androidx.lifecycle:lifecycle-runtime:$lifecycle_version"
supportLifecycleCompiler = "androidx.lifecycle:lifecycle-compiler:$lifecycle_version"

// database dependencies
def sqlite_version = "2.0.1"
supportSqlite = "androidx.sqlite:sqlite:$sqlite_version"
supportSqliteFramework = "androidx.sqlite:sqlite-framework:$sqlite_version"
sqlBrite = 'com.squareup.sqlbrite3:sqlbrite:3.2.0'

// Dependency injection, view injection, event bus...
dagger = 'com.google.dagger:dagger:2.22.1'
daggerCompiler = 'com.google.dagger:dagger-compiler:2.22.1'
Expand All @@ -76,23 +83,28 @@ ext {
otto = 'com.squareup:otto:1.3.8'

// Retrofit2 dependencies.
retrofit2 = 'com.squareup.retrofit2:retrofit:2.5.0'
retrofitGson2 = 'com.squareup.retrofit2:converter-gson:2.5.0'
retrofitAdapters2 = 'com.squareup.retrofit2:retrofit-adapters:2.5.0'
retrofitRxJava2 = 'com.squareup.retrofit2:adapter-rxjava:2.5.0'
def retrofit_version = "2.6.1"
retrofit2 = "com.squareup.retrofit2:retrofit:$retrofit_version"
retrofitGson2 = "com.squareup.retrofit2:converter-gson:$retrofit_version"
retrofitAdapters2 = "com.squareup.retrofit2:retrofit-adapters:$retrofit_version"
retrofitRxJava2 = "com.squareup.retrofit2:adapter-rxjava2:$retrofit_version"

// RxJava dependencies.
rxJava = 'io.reactivex:rxjava:1.0.16'
rxAndroid = 'io.reactivex:rxandroid:1.0.1'
rxPreferences = 'com.f2prateek.rx.preferences:rx-preferences:1.0.1'
rxBinding = 'com.jakewharton.rxbinding:rxbinding-appcompat-v7:0.4.0'
sqlBrite = 'com.squareup.sqlbrite:sqlbrite:1.1.2'
rxJava = 'io.reactivex.rxjava2:rxjava:2.2.0'
rxAndroid = 'io.reactivex.rxjava2:rxandroid:2.1.1'
rxPreferences = 'com.f2prateek.rx.preferences2:rx-preferences:2.0.0'

// RxBindings
def rxbinding_version = "3.0.0"
rxBindingCore = "com.jakewharton.rxbinding3:rxbinding-core:$rxbinding_version"
rxBindingAppCompat = "com.jakewharton.rxbinding3:rxbinding-appcompat:$rxbinding_version"


// Google dependencies
gson = 'com.google.code.gson:gson:2.8.5'
//guava = 'com.google.guava:guava:18.0'
findBugs = 'com.google.code.findbugs:jsr305:3.0.2'
playServicesLocation = 'com.google.android.gms:play-services-location:16.0.0'
playServicesLocation = 'com.google.android.gms:play-services-location:17.0.0'

//acra
acra = 'ch.acra:acra-core:5.1.3'
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu May 23 14:27:06 CEST 2019
#Sat Nov 16 10:19:11 CET 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import org.envirocar.obd.events.PropertyKeyEvent;
import org.envirocar.obd.events.Timestamped;

import rx.Observable;
import io.reactivex.Observable;

/**
* TODO JavaDoc
Expand Down
90 changes: 43 additions & 47 deletions org.envirocar.app/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="org.envirocar.app"
android:installLocation="internalOnly"
android:versionCode="34"
android:versionName="0.22.5">

<uses-feature
android:name="android.hardware.bluetooth"
android:required="true" />
<uses-feature
android:name="android.hardware.location"
android:required="true" />
<uses-feature
android:name="android.hardware.location.gps"
android:required="true" />
android:versionCode="36"
android:versionName="1.0.0">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
Expand All @@ -22,23 +13,31 @@
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" />
<uses-permission android:name="android.permission.WAKE_LOCK" tools:node="replace"/>

<uses-feature
android:name="android.hardware.bluetooth"
android:required="true" />
<uses-feature
android:name="android.hardware.location"
android:required="true" />
<uses-feature
android:name="android.hardware.location.gps"
android:required="true" />


<application
android:name=".main.BaseApplication"
android:name=".BaseApplication"
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:icon="@mipmap/ic_launcher_round"
android:label="@string/app_name"
android:theme="@style/Theme.Cario">

Expand All @@ -65,38 +64,30 @@
android:name=".views.login.SignupActivity"
android:screenOrientation="portrait" />
<activity
android:name=".views.settings.SettingsActivity"
android:name=".views.others.SendLogFileActivity"
android:screenOrientation="portrait" />
<activity
android:name=".views.SendLogFileActivity"
android:name=".views.logbook.LogbookActivity"
android:screenOrientation="portrait" />
<activity
android:name=".views.logbook.LogbookActivity"
android:name=".views.others.HelpActivity"
android:screenOrientation="portrait" />
<activity
android:name=".views.HelpActivity"
android:name=".views.BaseMainActivity"
android:screenOrientation="portrait" />
<activity
android:name=".views.settings.SettingsActivity"
android:screenOrientation="portrait" />

<!-- Services -->
<service android:name=".recording.RecordingService"
android:enabled="true"/>
<service
android:name=".services.AutomaticTrackRecordingService"
android:name=".services.autoconnect.AutoRecordingService"
android:enabled="true" />
<!--<service-->
<!--android:name=".services.OBDConnectionService"-->
<!--android:enabled="true" />-->
<service
android:name=".services.TrackUploadService"
android:enabled="true" />
<!--<service-->
<!--android:name=".services.GPSOnlyConnectionService"-->
<!--android:enabled="true" />-->

<service
android:name=".services.recording.OBDRecordingService"
android:enabled="true" />
<service
android:name=".services.recording.GPSOnlyRecordingService"
android:enabled="true" />
<service
android:name=".aidl.EnviroCarDataService"
android:enabled="true"
Expand All @@ -112,15 +103,16 @@
<action android:name="android.bluetooth.adapter.action.STATE_CHANGED" />
</intent-filter>
</receiver>
<receiver android:name=".services.WlanConnectionReceiver">
<intent-filter>
<action android:name="android.net.wifi.STATE_CHANGE" />
<action android:name="android.net.wifi.supplicant.CONNECTION_CHANG" />
<receiver android:name="org.envirocar.app.services.WlanConnectionReceiver">
<intent-filter android:priority="100">
<!-- <action android:name="android.net.wifi.STATE_CHANGE" />-->
<action android:name="android.net.wifi.supplicant.CONNECTION_CHANGE" />
<!-- <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />-->
</intent-filter>
</receiver>

<activity
android:name=".main.BaseMainActivityBottomBar"
android:name=".views.SplashScreenActivity"
android:label="@string/app_name"
android:launchMode="singleTop"
android:screenOrientation="portrait"
Expand All @@ -131,12 +123,16 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- <activity-->
<!-- android:name=".views.recordingscreen.OBDPlusGPSTrackRecordingScreen"-->
<!-- android:launchMode="singleTop"-->
<!-- android:screenOrientation="portrait" />-->
<!-- <activity-->
<!-- android:name=".views.recordingscreen.GPSOnlyTrackRecordingScreen"-->
<!-- android:launchMode="singleTop"-->
<!-- android:screenOrientation="portrait" />-->
<activity
android:name=".views.recordingscreen.OBDPlusGPSTrackRecordingScreen"
android:launchMode="singleTop"
android:screenOrientation="portrait" />
<activity
android:name=".views.recordingscreen.GPSOnlyTrackRecordingScreen"
android:name=".views.recordingscreen.RecordingScreenActivity"
android:launchMode="singleTop"
android:screenOrientation="portrait" />

Expand Down
19 changes: 18 additions & 1 deletion org.envirocar.app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dependencies {
implementation rootProject.ext.supportLifecycleExtension
implementation rootProject.ext.supportLifecycleRuntime
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation rootProject.ext.androidxPreference
annotationProcessor rootProject.ext.supportLifecycleCompiler

// Dependency injection, view injection, event bus ...
Expand All @@ -32,7 +33,7 @@ dependencies {
implementation rootProject.ext.rxAndroid
implementation rootProject.ext.rxJava
implementation rootProject.ext.rxPreferences
implementation rootProject.ext.rxBinding
// implementation rootProject.ext.rxBinding

// other third party libraries
implementation rootProject.ext.acra
Expand All @@ -41,6 +42,11 @@ dependencies {
implementation rootProject.ext.segmentedUIController
implementation rootProject.ext.materialDialogs
implementation "com.andkulikov:transitionseverywhere:2.0.0"
implementation 'de.hdodenhof:circleimageview:3.0.1'

// RxBindings
implementation rootProject.ext.rxBindingCore
implementation rootProject.ext.rxBindingAppCompat

//implementation rootProject.ext.guava
// implementation(materialDialogs) {
Expand Down Expand Up @@ -85,6 +91,17 @@ dependencies {
}


configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == "androidx") {
if (!requested.name.startsWith("multidex")) {
details.useVersion "${targetSdk}.+"
}
}
}
}

android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
Expand Down
Binary file added org.envirocar.app/ic_launcher-web.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions org.envirocar.app/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, getUserStatistic.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

# Project target.
target=android-19
android.library.reference.1=../actionbarsherlock
20 changes: 20 additions & 0 deletions org.envirocar.app/res/color/dashboard_button_selector.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2013 - 2019 the enviroCar community
This file is part of the enviroCar app.
The enviroCar app is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
The enviroCar app is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License along
with the enviroCar app. If not, see http://www.gnu.org/licenses/.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@android:color/darker_gray" android:state_enabled="false" />
<item android:color="@color/cario_color_primary_dark" android:state_enabled="true" />
Expand Down
20 changes: 20 additions & 0 deletions org.envirocar.app/res/color/dashboard_indicator_selector.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2013 - 2019 the enviroCar community
This file is part of the enviroCar app.
The enviroCar app is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
The enviroCar app is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License along
with the enviroCar app. If not, see http://www.gnu.org/licenses/.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/cario_color_primary_dark" android:state_enabled="false" />
<item android:color="@color/cario_warning_red" android:state_enabled="true" />
Expand Down
20 changes: 20 additions & 0 deletions org.envirocar.app/res/drawable-anydpi/ic_action_arrow_foward.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
<!--
Copyright (C) 2013 - 2019 the enviroCar community
This file is part of the enviroCar app.
The enviroCar app is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
The enviroCar app is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License along
with the enviroCar app. If not, see http://www.gnu.org/licenses/.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
Expand Down
Loading

0 comments on commit 1b59162

Please sign in to comment.