[android] - update codebase for Roboelectric v4.x
This commit is contained in:
@@ -22,6 +22,10 @@ dependencies {
|
||||
android {
|
||||
compileSdkVersion androidVersions.compileSdkVersion
|
||||
|
||||
// Roboelectric 4.0 required config
|
||||
// http://robolectric.org/migrating/#migrating-to-40
|
||||
testOptions.unitTests.includeAndroidResources = true
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion androidVersions.minSdkVersion
|
||||
targetSdkVersion androidVersions.targetSdkVersion
|
||||
|
||||
@@ -18,3 +18,7 @@ POM_PACKAGING=aar
|
||||
# Only build native dependencies for the current ABI
|
||||
# See https://code.google.com/p/android/issues/detail?id=221098#c20
|
||||
android.buildOnlyTargetAbi=true
|
||||
|
||||
# Roboelectric 4.0 required config for < Android Studio v3.3.0
|
||||
# http://robolectric.org/migrating/#migrating-to-40
|
||||
android.enableUnitTestBinaryResources=true
|
||||
@@ -1,18 +1,15 @@
|
||||
package com.mapbox.mapboxsdk.attribution;
|
||||
|
||||
import com.mapbox.mapboxsdk.BuildConfig;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.robolectric.RobolectricTestRunner;
|
||||
import org.robolectric.RuntimeEnvironment;
|
||||
import org.robolectric.annotation.Config;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import static junit.framework.Assert.assertEquals;
|
||||
|
||||
@RunWith(RobolectricTestRunner.class)
|
||||
@Config(constants = BuildConfig.class)
|
||||
public class AttributionParseTest {
|
||||
|
||||
private static final String STREETS_ATTRIBUTION = "<a href=\"https://www.mapbox.com/about/maps/\" target=\"_blank\">© Mapbox</a> <a href=\"http://www.openstreetmap.org/about/\" target=\"_blank\">© OpenStreetMap</a> <a class=\"mapbox-improve-map\" href=\"https://apps.mapbox.com/feedback/\" target=\"_blank\">Improve this map</a>\n";
|
||||
|
||||
@@ -18,7 +18,7 @@ ext {
|
||||
junit : '4.12',
|
||||
mockito : '2.23.4',
|
||||
mockk : '1.9',
|
||||
robolectric : '4.0.2',
|
||||
robolectric : '4.1',
|
||||
timber : '4.7.1',
|
||||
okhttp : '3.12.0',
|
||||
kotlin : '1.3.11',
|
||||
|
||||
Reference in New Issue
Block a user