Skip to content

Commit 72051b3

Browse files
committed
remove preoreo target
1 parent e301dbc commit 72051b3

File tree

7 files changed

+18
-43
lines changed

7 files changed

+18
-43
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ reference:
1414
working_directory: ~/mauron85_bgloc/android
1515
docker:
1616
# specify the version you desire here
17-
- image: circleci/android:api-27-alpha
17+
- image: circleci/android:api-28-alpha
1818
# Specify service dependencies here if necessary
1919
# CircleCI maintains a library of pre-built images
2020
# documented at https://circleci.com/docs/2.0/circleci-images/

android/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ buildscript {
88
jcenter()
99
}
1010
dependencies {
11-
classpath 'com.android.tools.build:gradle:2.2.3'
11+
classpath 'com.android.tools.build:gradle:3.4.1'
1212
}
1313
}
1414

android/common

Submodule common updated 25 files
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Thu Sep 01 09:25:02 CEST 2016
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip

android/lib/build.gradle

+12-36
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
// buildToolsVersion = "26.0.2"
1919
// supportLibVersion = "26.1.0"
2020
// googlePlayServicesVersion = "11.8.0"
21-
// oreoEXPERIMENTAL = "hellyes"
2221
// }
2322
//
2423
//
@@ -28,20 +27,14 @@
2827
apply plugin: 'com.android.library'
2928

3029
apply from: '../common/VERSIONS.gradle'
31-
def playServicesVersion = getPlayServicesVersion()
32-
def supportLibVersion = getSupportLibVersion()
33-
def hasGradle3Support = getGradle3Support()
3430
def hasApp = findProject(':app') != null
3531

36-
def projectFlavor = "preoreo"
37-
if (rootProject.hasProperty('oreoEXPERIMENTAL')) {
38-
projectFlavor = "oreo"
39-
}
40-
4132
// https://hackernoon.com/android-how-to-add-gradle-dependencies-using-foreach-c4cbcc070458
42-
def oreoDependencies = [
33+
def projDependencies = [
4334
[configuration: "implementation", dependency: libs.slf4j],
4435
[configuration: "implementation", dependency: libs.reactNative],
36+
[configuration: "testImplementation", dependency: testLibs.testRunner],
37+
[configuration: "testImplementation", dependency: testLibs.testRules],
4538
[configuration: "testImplementation", dependency: testLibs.junit],
4639
[configuration: "testImplementation", dependency: testLibs.powermockMockito],
4740
[configuration: "testImplementation", dependency: testLibs.powermockjUnit],
@@ -53,20 +46,6 @@ def oreoDependencies = [
5346
[configuration: "androidTestImplementation", dependency: testLibs.testRules],
5447
]
5548

56-
def preoreoDependencies = [
57-
[configuration: "compile", dependency: libs.slf4j],
58-
[configuration: "compile", dependency: libs.reactNative],
59-
[configuration: "testCompile", dependency: testLibs.junit],
60-
[configuration: "testCompile", dependency: testLibs.powermockMockito],
61-
[configuration: "testCompile", dependency: testLibs.powermockjUnit],
62-
[configuration: "testCompile", dependency: testLibs.powermockClassloading],
63-
[configuration: "testCompile", dependency: testLibs.mockitoCore],
64-
[configuration: "testCompile", dependency: testLibs.festAssertCore],
65-
[configuration: "testCompile", dependency: testLibs.robolectric],
66-
[configuration: "androidTestCompile", dependency: testLibs.testRunner],
67-
[configuration: "androidTestCompile", dependency: testLibs.testRules],
68-
]
69-
7049
repositories {
7150
// Google dependencies are now hosted at Maven
7251
// unfortunately this is ignored when installing as react-native plugin
@@ -83,6 +62,12 @@ android {
8362
evaluationDependsOn(':app')
8463
}
8564

65+
// Tip: https://stackoverflow.com/questions/39987669/renamingdelegatingcontext-is-deprecated-how-do-we-test-sqlite-db-now/52170737#52170737
66+
// Gradle automatically adds 'android.test.runner' as a dependency.
67+
useLibrary 'android.test.runner'
68+
useLibrary 'android.test.base'
69+
useLibrary 'android.test.mock'
70+
8671
defaultConfig {
8772
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
8873
minSdkVersion project.ext.getMinSdkVersion()
@@ -97,18 +82,9 @@ android {
9782
}
9883

9984
dependencies {
100-
if (hasGradle3Support) {
101-
implementation project(path: ':@mauron85_react-native-background-geolocation-common')
102-
103-
oreoDependencies.each {
104-
add(it.configuration, it.dependency)
105-
}
106-
} else {
107-
releaseCompile project(path: ':@mauron85_react-native-background-geolocation-common', configuration: "${projectFlavor}Release")
108-
debugCompile project(path: ':@mauron85_react-native-background-geolocation-common', configuration: "${projectFlavor}Debug")
85+
implementation project(path: ':@mauron85_react-native-background-geolocation-common')
10986

110-
preoreoDependencies.each {
111-
add(it.configuration, it.dependency)
112-
}
87+
projDependencies.each {
88+
add(it.configuration, it.dependency)
11389
}
11490
}

android/lib/src/androidTest/java/com/marianhello/bgloc/react/ConfigMapperTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import android.content.Context;
44
import android.support.test.InstrumentationRegistry;
55
import android.support.test.runner.AndroidJUnit4;
6-
import android.test.suitebuilder.annotation.SmallTest;
6+
import android.support.test.filters.SmallTest;
77

88
import com.facebook.react.bridge.Arguments;
99
import com.facebook.react.bridge.ReadableMap;

scripts/google_cloud.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ gcloud config set project ${GCLOUD_PROJECT}
4949
gcloud firebase test android run \
5050
--type instrumentation \
5151
--app ${project_dir}/res/dummy.apk \
52-
--test $(ls -dt ${project_dir}/android/lib/build/outputs/apk/*.apk | head -1) \
52+
--test $(ls -dt ${project_dir}/android/lib/build/outputs/apk/androidTest/debug/*.apk | head -1) \
5353
--device model=Nexus6,version=25,locale=en,orientation=portrait \
5454
--timeout 90s

0 commit comments

Comments
 (0)