Skip to content

Commit 10528c4

Browse files
Merge pull request #259 from criticalmaps/release_2.5.0
Release 2.5.0
2 parents 73de10f + 3bc4f53 commit 10528c4

File tree

160 files changed

+3042
-1377
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+3042
-1377
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @criticalmaps/android

.travis.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ android:
1111
- platform-tools
1212

1313
# The BuildTools version used by your project
14-
- build-tools-27.0.3
14+
# - build-tools-28.0.3
1515

1616
# The SDK version used to compile your project
17-
- android-27
17+
- android-28
1818

1919
# Additional components
2020
# - extra-google-google_play_services
@@ -31,10 +31,7 @@ android:
3131

3232
before_install:
3333
# The following line can be removed when https://github.com/travis-ci/travis-ci/issues/8874 is resolved
34-
- yes | sdkmanager "platforms;android-27"
34+
- yes | sdkmanager "build-tools;28.0.3" "platforms;android-28"
3535
- chmod +x gradlew
3636

3737
script: 'travis_retry ./gradlew clean build test'
38-
39-
notifications:
40-
slack: criticalmaps:mCh5Cy9Fl2bVMdnQ9ymeYv3H

app/build.gradle

Lines changed: 33 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,19 @@ android {
2121
}
2222
}
2323

24-
compileSdkVersion 27
25-
buildToolsVersion '27.0.3'
24+
compileSdkVersion 28
25+
buildToolsVersion '28.0.3'
2626

2727
defaultConfig {
2828
applicationId "de.stephanlindauer.criticalmaps"
2929
minSdkVersion 16
30-
targetSdkVersion 25
31-
versionCode 34
32-
versionName "2.4.2"
30+
targetSdkVersion 28
31+
versionCode 35
32+
versionName "2.5.0"
3333
vectorDrawables.useSupportLibrary = true
3434

35+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
36+
3537
javaCompileOptions {
3638
annotationProcessorOptions {
3739
arguments = [
@@ -44,6 +46,7 @@ android {
4446
buildTypes {
4547
debug {
4648
applicationIdSuffix ".debug"
49+
pseudoLocalesEnabled true
4750
}
4851
release {
4952
minifyEnabled false
@@ -55,6 +58,7 @@ android {
5558
lintOptions {
5659
warning 'MissingTranslation'
5760
warning 'StringFormatInvalid'
61+
warning 'NewApi'
5862

5963
// https://github.com/square/okio/issues/58
6064
// http://jakewharton.github.io/butterknife/
@@ -73,29 +77,40 @@ android {
7377

7478
dependencies {
7579
implementation 'com.squareup:otto:1.3.8'
76-
implementation 'org.osmdroid:osmdroid-android:6.0.2-SNAPSHOT'
80+
implementation 'org.osmdroid:osmdroid-android:6.1.0'
7781
implementation 'com.squareup.picasso:picasso:2.5.2'
7882
implementation 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.1.0'
79-
implementation "com.android.support:support-v4:$support_version"
80-
implementation "com.android.support:appcompat-v7:$support_version"
81-
implementation "com.android.support:support-annotations:$support_version"
82-
implementation "com.android.support:design:$support_version"
83-
implementation "com.android.support:exifinterface:$support_version"
84-
implementation 'com.jakewharton.timber:timber:4.7.0'
85-
86-
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
83+
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
84+
implementation 'androidx.appcompat:appcompat:1.0.2'
85+
implementation 'androidx.annotation:annotation:1.0.2'
86+
implementation 'com.google.android.material:material:1.1.0-alpha05'
87+
implementation 'androidx.exifinterface:exifinterface:1.0.0'
88+
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
89+
implementation 'com.jakewharton.timber:timber:4.7.1'
90+
91+
implementation 'com.squareup.okhttp3:okhttp:3.12.2'
8792
implementation "com.jakewharton:butterknife:$butterknife_version"
8893
annotationProcessor "com.jakewharton:butterknife-compiler:$butterknife_version"
8994

9095
implementation 'org.ligi:AXT:0.37'
9196
implementation 'info.metadude.android:typed-preferences:2.1.0'
92-
implementation "com.google.dagger:dagger:$dagger_version"
9397

9498
compileOnly 'javax.annotation:jsr250-api:1.0'
99+
implementation "com.google.dagger:dagger:$dagger_version"
95100
annotationProcessor "com.google.dagger:dagger-compiler:$dagger_version"
96101

102+
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.0-alpha-1'
103+
104+
errorprone("com.google.errorprone:error_prone_core:2.3.3")
105+
errorproneJavac("com.google.errorprone:javac:9+181-r4173-1")
106+
97107
testImplementation 'junit:junit:4.12'
98-
testImplementation 'com.google.truth:truth:0.40'
99-
testImplementation "com.android.support:support-annotations:$support_version"
100-
testImplementation 'org.mockito:mockito-core:2.15.0'
108+
testImplementation 'com.google.truth:truth:0.41'
109+
testImplementation 'org.mockito:mockito-core:2.23.0'
110+
111+
androidTestImplementation 'androidx.test:core:1.1.0'
112+
androidTestImplementation 'androidx.test:runner:1.1.1'
113+
androidTestImplementation 'androidx.test:rules:1.1.1'
114+
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
115+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
101116
}
Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,27 @@
11
package de.stephanlindauer.criticalmaps;
22

3-
import android.app.Application;
4-
import android.test.ApplicationTestCase;
5-
6-
/**
7-
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
8-
*/
9-
public class ApplicationTest extends ApplicationTestCase<Application> {
10-
public ApplicationTest() {
11-
super(Application.class);
3+
import org.junit.Rule;
4+
import org.junit.Test;
5+
import org.junit.runner.RunWith;
6+
7+
import androidx.test.filters.LargeTest;
8+
import androidx.test.rule.ActivityTestRule;
9+
import androidx.test.ext.junit.runners.AndroidJUnit4;
10+
11+
import static androidx.test.espresso.Espresso.onView;
12+
import static androidx.test.espresso.assertion.ViewAssertions.matches;
13+
import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;
14+
import static androidx.test.espresso.matcher.ViewMatchers.withId;
15+
16+
@RunWith(AndroidJUnit4.class)
17+
@LargeTest
18+
public class ApplicationTest {
19+
20+
@Rule
21+
public ActivityTestRule<Main> mActivityRule = new ActivityTestRule<>(Main.class);
22+
23+
@Test
24+
public void verifyAppLaunches() {
25+
onView(withId(R.id.drawer_layout)).check(matches(isDisplayed()));
1226
}
13-
}
27+
}

app/src/main/AndroidManifest.xml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools"
34
package="de.stephanlindauer.criticalmaps">
45

56
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
@@ -9,6 +10,7 @@
910
<uses-permission android:name="android.permission.INTERNET" />
1011
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
1112
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
13+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
1214

1315
<uses-feature android:name="android.hardware.location.network" android:required="false"/>
1416
<uses-feature android:name="android.hardware.location.gps" android:required="false"/>
@@ -18,9 +20,12 @@
1820
<application
1921
android:allowBackup="true"
2022
android:name=".App"
21-
android:icon="@mipmap/ic_launcher_48dp"
23+
android:icon="@mipmap/ic_launcher"
24+
android:roundIcon="@mipmap/ic_launcher"
2225
android:label="@string/app_name"
23-
android:fullBackupContent="@xml/backup_descriptor">
26+
android:fullBackupContent="@xml/backup_descriptor"
27+
android:supportsRtl="true"
28+
tools:ignore="GoogleAppIndexingWarning">
2429

2530
<activity
2631
android:name="de.stephanlindauer.criticalmaps.Main"
@@ -37,7 +42,7 @@
3742
android:name=".service.ServerSyncService"/>
3843

3944
<provider
40-
android:name="android.support.v4.content.FileProvider"
45+
android:name="androidx.core.content.FileProvider"
4146
android:authorities="@string/fileprovider_authority"
4247
android:exported="false"
4348
android:grantUriPermissions="true">

app/src/main/ic_launcher-web.png

56.3 KB
Loading

app/src/main/java/de/stephanlindauer/criticalmaps/App.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
package de.stephanlindauer.criticalmaps;
22

33
import android.app.Application;
4-
import android.support.annotation.NonNull;
4+
5+
import org.jetbrains.annotations.NotNull;
56

67
import timber.log.Timber;
78

@@ -28,7 +29,7 @@ public static AppComponent components() {
2829

2930
private static class NoOpTree extends Timber.Tree {
3031
@Override
31-
protected void log(int priority, String tag, @NonNull String message, Throwable t) {
32+
protected void log(int priority, String tag, @NotNull String message, Throwable t) {
3233
}
3334
}
3435
}

app/src/main/java/de/stephanlindauer/criticalmaps/AppComponent.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
import de.stephanlindauer.criticalmaps.fragments.ChatFragment;
1010
import de.stephanlindauer.criticalmaps.fragments.MapFragment;
1111
import de.stephanlindauer.criticalmaps.handler.PrerequisitesChecker;
12+
import de.stephanlindauer.criticalmaps.fragments.SettingsFragment;
1213
import de.stephanlindauer.criticalmaps.model.OwnLocationModel;
1314
import de.stephanlindauer.criticalmaps.model.TwitterModel;
15+
import de.stephanlindauer.criticalmaps.provider.StorageLocationProvider;
1416
import de.stephanlindauer.criticalmaps.service.ServerSyncService;
1517
import javax.inject.Singleton;
1618
import okhttp3.OkHttpClient;
@@ -22,6 +24,7 @@ public interface AppComponent {
2224
void inject(ServerSyncService serverSyncService);
2325
void inject(MapFragment serverSyncService);
2426
void inject(ChatFragment chatFragment);
27+
void inject(SettingsFragment settingsFragment);
2528
void inject(PrerequisitesChecker prerequisitesChecker);
2629

2730
App app();
@@ -30,6 +33,7 @@ public interface AppComponent {
3033
TwitterModel twitterModel();
3134
OkHttpClient okHttpClient();
3235
SharedPreferences sharedPreferences();
36+
StorageLocationProvider storageProvider();
3337

3438
@Component.Builder
3539
interface Builder {

0 commit comments

Comments
 (0)