Skip to content

Commit

Permalink
Closes #48:
Browse files Browse the repository at this point in the history
- Dependencies updated
- Migrated to AndroidX
- Switched to Java 8
- Latest Material DateTime Picker library supported
  • Loading branch information
Alkisum committed Feb 12, 2019
1 parent 00b7166 commit a69fc06
Show file tree
Hide file tree
Showing 34 changed files with 123 additions and 109 deletions.
28 changes: 16 additions & 12 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

greendao {
Expand All @@ -30,22 +34,22 @@ greendao {

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v13:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.android.gms:play-services-basement:16.1.0'
implementation 'androidx.appcompat:appcompat:1.1.0-alpha02'
implementation 'androidx.legacy:legacy-support-v13:1.0.0'
implementation 'com.google.android.material:material:1.1.0-alpha03'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
implementation 'com.google.android.gms:play-services-basement:16.2.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'org.greenrobot:eventbus:3.1.1'
implementation 'org.greenrobot:greendao:3.2.2'
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.6.2'
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.2'
testImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.2'
implementation 'com.jakewharton:butterknife:10.0.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'
debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.6.3'
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.3'
testImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.3'
implementation 'org.osmdroid:osmdroid-android:6.0.3'
implementation 'com.wdullaer:materialdatetimepicker:3.6.4'
implementation 'com.wdullaer:materialdatetimepicker:4.1.2'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.github.nextcloud:android-library:1.2.1'
implementation 'com.github.nextcloud:android-library:1.3.2'
implementation project(path: ':cloudlib')
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
import android.os.Bundle;
import android.preference.Preference;
import android.preference.PreferenceFragment;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;

import com.alkisum.android.cloudrun.BuildConfig;
import com.alkisum.android.cloudrun.R;
Expand All @@ -15,6 +13,9 @@

import java.util.Date;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;

/**
* Activity listing information about the application.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package com.alkisum.android.cloudrun.activities;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
Expand All @@ -11,10 +9,10 @@
import android.widget.ListView;

import com.alkisum.android.cloudrun.R;
import com.alkisum.android.cloudrun.adapters.AddSessionListAdapter;
import com.alkisum.android.cloudrun.database.Db;
import com.alkisum.android.cloudrun.dialogs.DistanceDialog;
import com.alkisum.android.cloudrun.dialogs.DurationDialog;
import com.alkisum.android.cloudrun.adapters.AddSessionListAdapter;
import com.alkisum.android.cloudrun.model.Session;
import com.alkisum.android.cloudrun.model.SessionDao;
import com.alkisum.android.cloudrun.utils.Format;
Expand All @@ -23,6 +21,8 @@

import java.util.Calendar;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import butterknife.BindView;
import butterknife.ButterKnife;

Expand Down Expand Up @@ -159,7 +159,7 @@ private void showDatePickerDialog() {
dateCalendar.get(Calendar.DAY_OF_MONTH)
);
dpd.setThemeDark(true);
dpd.show(getFragmentManager(), TAG_DATE_PICKER_DIALOG);
dpd.show(getSupportFragmentManager(), TAG_DATE_PICKER_DIALOG);
}

/**
Expand All @@ -175,7 +175,7 @@ private void showTimePickerDialog() {
true
);
tpd.setThemeDark(true);
tpd.show(getFragmentManager(), TAG_TIME_PICKER_DIALOG);
tpd.show(getSupportFragmentManager(), TAG_TIME_PICKER_DIALOG);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
Expand Down Expand Up @@ -38,6 +33,8 @@
import com.alkisum.android.cloudrun.tasks.Restorer;
import com.alkisum.android.cloudrun.utils.Deletables;
import com.alkisum.android.cloudrun.utils.Sessions;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.snackbar.Snackbar;
import com.google.gson.Gson;

import org.greenrobot.eventbus.EventBus;
Expand All @@ -47,6 +44,9 @@

import java.util.List;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,22 @@
import android.annotation.SuppressLint;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;

import com.alkisum.android.cloudrun.BuildConfig;
import com.alkisum.android.cloudrun.R;
import com.alkisum.android.cloudrun.utils.Markers;
import com.alkisum.android.cloudrun.utils.Sessions;
import com.alkisum.android.cloudrun.events.CoordinateEvent;
import com.alkisum.android.cloudrun.events.GpsStatusEvent;
import com.alkisum.android.cloudrun.location.Coordinate;
import com.alkisum.android.cloudrun.model.DataPoint;
import com.alkisum.android.cloudrun.model.Marker;
import com.alkisum.android.cloudrun.model.Session;
import com.alkisum.android.cloudrun.ui.GpsStatus;
import com.alkisum.android.cloudrun.utils.Markers;
import com.alkisum.android.cloudrun.utils.Sessions;

import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
Expand All @@ -38,6 +35,9 @@
import java.util.ArrayList;
import java.util.List;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.core.content.ContextCompat;
import butterknife.BindView;
import butterknife.ButterKnife;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,6 @@
import android.os.Bundle;
import android.os.Handler;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.design.widget.NavigationView;
import android.support.design.widget.Snackbar;
import android.support.v4.content.ContextCompat;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
Expand All @@ -26,7 +17,6 @@
import android.widget.TextView;

import com.alkisum.android.cloudrun.R;
import com.alkisum.android.cloudrun.tasks.SessionRecorder;
import com.alkisum.android.cloudrun.dialogs.ActivateRoutesDialog;
import com.alkisum.android.cloudrun.dialogs.ErrorDialog;
import com.alkisum.android.cloudrun.events.CoordinateEvent;
Expand All @@ -38,17 +28,27 @@
import com.alkisum.android.cloudrun.location.Coordinate;
import com.alkisum.android.cloudrun.location.LocationHelper;
import com.alkisum.android.cloudrun.location.LocationUtils;
import com.alkisum.android.cloudrun.tasks.SessionRecorder;
import com.alkisum.android.cloudrun.ui.GpsStatus;
import com.alkisum.android.cloudrun.ui.Tile;
import com.alkisum.android.cloudrun.utils.Format;
import com.alkisum.android.cloudrun.utils.Pref;
import com.google.android.material.navigation.NavigationView;
import com.google.android.material.snackbar.Snackbar;

import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;

import java.util.ArrayList;
import java.util.List;

import androidx.annotation.NonNull;
import androidx.appcompat.app.ActionBarDrawerToggle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.core.content.ContextCompat;
import androidx.core.view.GravityCompat;
import androidx.drawerlayout.widget.DrawerLayout;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@
import android.graphics.drawable.Drawable;
import android.location.Location;
import android.os.Bundle;
import android.support.design.widget.Snackbar;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
Expand Down Expand Up @@ -46,6 +41,7 @@
import com.google.android.gms.location.FusedLocationProviderClient;
import com.google.android.gms.location.LocationServices;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.android.material.snackbar.Snackbar;
import com.google.gson.Gson;

import org.greenrobot.eventbus.EventBus;
Expand All @@ -67,6 +63,10 @@
import java.util.ArrayList;
import java.util.List;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import butterknife.BindView;
import butterknife.ButterKnife;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
Expand Down Expand Up @@ -40,6 +35,8 @@
import com.alkisum.android.cloudrun.tasks.Restorer;
import com.alkisum.android.cloudrun.utils.Deletables;
import com.alkisum.android.cloudrun.utils.Routes;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.snackbar.Snackbar;
import com.google.gson.Gson;

import org.greenrobot.eventbus.EventBus;
Expand All @@ -49,6 +46,9 @@

import java.util.List;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.Snackbar;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
Expand All @@ -31,6 +27,7 @@
import com.alkisum.android.cloudrun.tasks.Deleter;
import com.alkisum.android.cloudrun.utils.Format;
import com.alkisum.android.cloudrun.utils.Sessions;
import com.google.android.material.snackbar.Snackbar;
import com.google.gson.ExclusionStrategy;
import com.google.gson.FieldAttributes;
import com.google.gson.Gson;
Expand All @@ -52,6 +49,9 @@
import java.util.ArrayList;
import java.util.List;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.core.content.ContextCompat;
import butterknife.BindView;
import butterknife.ButterKnife;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@
import android.preference.EditTextPreference;
import android.preference.Preference;
import android.preference.PreferenceFragment;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;

import com.alkisum.android.cloudlib.utils.CloudPref;
import com.alkisum.android.cloudrun.R;
import com.alkisum.android.cloudrun.utils.Markers;
import com.alkisum.android.cloudrun.location.LocationHelper;
import com.alkisum.android.cloudrun.ui.NumberPickerPreference;
import com.alkisum.android.cloudrun.utils.Markers;
import com.alkisum.android.cloudrun.utils.Pref;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;

/**
* Activity showing the application settings.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

import android.content.Context;
import android.content.res.ColorStateList;
import android.support.v4.content.ContextCompat;
import android.support.v4.widget.CompoundButtonCompat;
import android.support.v7.widget.AppCompatCheckBox;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand All @@ -19,6 +16,9 @@
import java.util.Date;
import java.util.List;

import androidx.appcompat.widget.AppCompatCheckBox;
import androidx.core.content.ContextCompat;
import androidx.core.widget.CompoundButtonCompat;
import butterknife.BindView;
import butterknife.ButterKnife;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.alkisum.android.cloudrun.adapters;

import android.content.Context;
import android.support.v7.widget.AppCompatCheckBox;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand All @@ -13,6 +12,7 @@

import java.util.List;

import androidx.appcompat.widget.AppCompatCheckBox;
import butterknife.BindView;
import butterknife.ButterKnife;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import android.content.Context;
import android.content.DialogInterface;
import android.support.v7.app.AlertDialog;
import android.view.View;
import android.widget.EditText;

Expand All @@ -12,6 +11,8 @@

import org.greenrobot.eventbus.EventBus;

import androidx.appcompat.app.AlertDialog;

/**
* Dialog to add a new marker.
*
Expand Down
Loading

0 comments on commit a69fc06

Please # to comment.