Skip to content

Commit

Permalink
Update project and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tananaev committed Jun 11, 2020
1 parent 330dc27 commit a3d4329
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 11 deletions.
11 changes: 6 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
buildConfigField 'boolean', 'HIDDEN_APP', 'false'
minSdkVersion 16
targetSdkVersion 29
versionCode 63
versionName '6.2'
versionCode 64
versionName '6.3'
}

lintOptions {
Expand All @@ -36,18 +36,19 @@ android {
}

dependencies {
implementation 'com.google.android.material:material:1.2.0-alpha06'
implementation 'com.google.android.material:material:1.3.0-alpha01'
implementation 'androidx.preference:preference:1.1.1'
testImplementation 'junit:junit:4.13'
testImplementation 'org.robolectric:robolectric:4.1'
googleImplementation 'com.google.firebase:firebase-core:17.3.0'
googleImplementation 'com.google.firebase:firebase-core:17.4.3'
googleImplementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
googleImplementation 'com.google.firebase:firebase-analytics:17.4.3'
googleImplementation 'com.google.android.gms:play-services-location:17.0.0'
}

if (getGradle().getStartParameter().getTaskRequests().toString().contains('Google')) {
apply plugin: 'com.google.gms.google-services'
apply plugin: 'io.fabric'
apply plugin: 'com.google.firebase.crashlytics'

task copyJson(type: Copy) {
from '../../traccar-shared/google-services'
Expand Down
2 changes: 2 additions & 0 deletions app/src/test/java/org/traccar/client/DatabaseHelperTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
package org.traccar.client;

import android.location.Location;
import android.os.Build;

import org.junit.Test;
import org.junit.runner.RunWith;
Expand All @@ -14,6 +15,7 @@
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;

@Config(sdk = Build.VERSION_CODES.P)
@RunWith(RobolectricTestRunner.class)
public class DatabaseHelperTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
package org.traccar.client;

import android.location.Location;
import android.os.Build;

import org.junit.Test;
import org.junit.runner.RunWith;
Expand All @@ -12,6 +13,7 @@

import static org.junit.Assert.assertEquals;

@Config(sdk = Build.VERSION_CODES.P)
@RunWith(RobolectricTestRunner.class)
public class ProtocolFormatterTest {

Expand Down
5 changes: 4 additions & 1 deletion app/src/test/java/org/traccar/client/RequestManagerTest.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

package org.traccar.client;

import android.os.Build;

import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand All @@ -9,10 +11,11 @@

import static org.junit.Assert.assertTrue;

@Config(sdk = Build.VERSION_CODES.P)
@RunWith(RobolectricTestRunner.class)
public class RequestManagerTest {

@Ignore
@Ignore("Not a real unit test")
@Test
public void testSendRequest() throws Exception {

Expand Down
5 changes: 2 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ buildscript {
repositories {
google()
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.3'
classpath 'com.android.tools.build:gradle:4.0.0'
classpath 'com.google.gms:google-services:4.3.3'
classpath 'io.fabric.tools:gradle:1.28.0'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.1.1'
}
}

Expand Down
1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
android.enableJetifier=true
android.useAndroidX=true
android.enableUnitTestBinaryResources=true
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip

0 comments on commit a3d4329

Please sign in to comment.