Skip to content

Commit

Permalink
RN 0.56.0 Android Support (#910)
Browse files Browse the repository at this point in the history
* make android green again

* Upgrade to Espresso 3.0.2
Updated native Android dependencies

* Bump test app to RN56
  • Loading branch information
rotemmiz authored Aug 30, 2018
1 parent bb7249f commit f51cbf2
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 21 deletions.
6 changes: 4 additions & 2 deletions detox/android/detox/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,17 @@ dependencies {
minReactNative46Implementation 'com.squareup.okhttp3:okhttp:3.6.0'
minReactNative46Implementation 'com.squareup.okio:okio:1.13.0'

implementation('com.android.support.test.espresso:espresso-core:3.0.0', {
implementation('com.android.support.test.espresso:espresso-core:3.0.2', {
exclude group: 'com.google.code.findbugs'
})
implementation 'com.android.support.test:runner:1.0.2'
implementation 'com.android.support.test:rules:1.0.2'

implementation 'org.apache.commons:commons-lang3:3.4'
implementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.3'

testImplementation 'org.json:json:20140107'
testImplementation 'junit:junit:4.12'
testImplementation 'org.assertj:assertj-core:3.5.2'
testImplementation 'org.assertj:assertj-core:3.8.0'
testImplementation 'org.apache.commons:commons-io:1.3.2'
}
8 changes: 4 additions & 4 deletions detox/test/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apply from: "../../node_modules/react-native/react.gradle"

android {
compileSdkVersion 27
buildToolsVersion '27.0.2'
buildToolsVersion '27.0.3'

defaultConfig {
applicationId "com.wix.detox.test"
Expand Down Expand Up @@ -60,15 +60,15 @@ android {
}

dependencies {
implementation "com.android.support:appcompat-v7:27.0.2"
implementation "com.android.support:appcompat-v7:27.1.1"

fromSourceImplementation(project(path: ":ReactAndroid"))
fromBinImplementation "com.facebook.react:react-native:+"

androidTestImplementation(project(path: ":detox"))
androidTestImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test:rules:1.0.1'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test:rules:1.0.2'
}

// Run this once to be able to run the application with BUCK
Expand Down
2 changes: 1 addition & 1 deletion detox/test/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'de.undercouch:gradle-download-task:3.1.2'
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-all.zip
6 changes: 3 additions & 3 deletions detox/test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"verify-artifacts:android": "jest ./scripts/verify_artifacts_are_not_missing.android.test.js --testEnvironment node"
},
"dependencies": {
"react": "16.0.0",
"react-native": "0.51.x"
"react": "16.4.1",
"react-native": "0.56.0"
},
"devDependencies": {
"detox": "^8.0.0",
Expand Down Expand Up @@ -74,4 +74,4 @@
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ Array [
"./✓ Async and Callbacks should handle done() callback/afterEach.png",
"./✓ Async and Callbacks should handle done() callback/beforeEach.png",
"./✓ Async and Callbacks should handle done() callback/test.log",
"./✓ Device :android: device back button :android: should show popup back pressed when back button is pressed",
"./✓ Device :android: device back button :android: should show popup back pressed when back button is pressed/afterEach.png",
"./✓ Device :android: device back button :android: should show popup back pressed when back button is pressed/beforeEach.png",
"./✓ Device :android: device back button :android: should show popup back pressed when back button is pressed/test.log",
"./✓ Device Orientation OrientationLandscape",
"./✓ Device Orientation OrientationLandscape/afterEach.png",
"./✓ Device Orientation OrientationLandscape/beforeEach.png",
Expand Down
18 changes: 8 additions & 10 deletions scripts/ci.android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ pushd detox/android
run_f "./gradlew test"
popd

if [ $JENKINS_CI ] ; then
pushd detox/test
# Workaround until react android issue will be fixed - react-native: 0.55
mv node_modules/react-native/ReactAndroid/release.gradle node_modules/react-native/ReactAndroid/release.gradle.bak
cp extras/release.gradle node_modules/react-native/ReactAndroid/
pushd detox/test
# Workaround until react android issue will be fixed - react-native: 0.55
mv node_modules/react-native/ReactAndroid/release.gradle node_modules/react-native/ReactAndroid/release.gradle.bak
cp extras/release.gradle node_modules/react-native/ReactAndroid/

run_f "npm run build:android"
run_f "npm run e2e:android -- --headless --no-color"
run_f "npm run verify-artifacts:android"
popd
fi
run_f "npm run build:android"
run_f "npm run e2e:android -- --headless --no-color"
run_f "npm run verify-artifacts:android"
popd

0 comments on commit f51cbf2

Please # to comment.