Skip to content

Commit 458e017

Browse files
authored
Setup a script for Android demo projects in CI (wix#914)
* Setup a script for Android demo projects in CI + bumped native dependencies
1 parent f51cbf2 commit 458e017

File tree

9 files changed

+36
-19
lines changed

9 files changed

+36
-19
lines changed

examples/demo-react-native-jest/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
google()
77
}
88
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.0.1'
9+
classpath 'com.android.tools.build:gradle:3.1.4'
1010
}
1111
}
1212

examples/demo-react-native-jest/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-all.zip

examples/demo-react-native/android/app/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ apply from: "../../node_modules/react-native/react.gradle"
66

77
android {
88
compileSdkVersion 27
9-
buildToolsVersion '27.0.2'
9+
buildToolsVersion '27.0.3'
1010

1111
defaultConfig {
1212
applicationId "com.detox.rn.example"
@@ -69,13 +69,13 @@ android {
6969
}
7070

7171
dependencies {
72-
implementation "com.android.support:appcompat-v7:27.0.2"
72+
implementation "com.android.support:appcompat-v7:27.1.1"
7373
implementation "com.facebook.react:react-native:+" // From node_modules
7474

7575
androidTestImplementation(project(path: ":detox"))
7676
androidTestImplementation 'junit:junit:4.12'
77-
androidTestImplementation 'com.android.support.test:runner:1.0.1'
78-
androidTestImplementation 'com.android.support.test:rules:1.0.1'
77+
androidTestImplementation 'com.android.support.test:runner:1.0.2'
78+
androidTestImplementation 'com.android.support.test:rules:1.0.2'
7979
}
8080

8181
// Run this once to be able to run the application with BUCK

examples/demo-react-native/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ buildscript {
44
google()
55
}
66
dependencies {
7-
classpath 'com.android.tools.build:gradle:3.0.1'
7+
classpath 'com.android.tools.build:gradle:3.1.4'
88
}
99
}
1010

examples/demo-react-native/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-all.zip

examples/demo-react-native/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@
3434
"binaryPath": "android/app/build/outputs/apk/debug/app-debug.apk",
3535
"build": "pushd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && popd",
3636
"type": "android.emulator",
37-
"name": "Nexus_5X_API_24_-_GPlay"
37+
"name": "Nexus_5X_API_26"
3838
},
3939
"android.emu.release": {
4040
"binaryPath": "android/app/build/outputs/apk/release/app-release.apk",
4141
"build": "pushd android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release && popd",
4242
"type": "android.emulator",
43-
"name": "Nexus_5X_API_24_-_GPlay"
43+
"name": "Nexus_5X_API_26"
4444
}
4545
}
4646
}

scripts/demo-projects.android.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash -e
2+
3+
source $(dirname "$0")/demo-projects.sh
4+
5+
pushd examples/demo-react-native
6+
run_f "detox build -c android.emu.release"
7+
run_f "detox test -c android.emu.release"
8+
run_f "detox test -c android.emu.release --specs e2eExplicitRequire --runner-config e2eExplicitRequire/mocha.opts"
9+
popd
10+
11+
pushd examples/demo-react-native-jest
12+
run_f "detox build -c android.emu.release"
13+
run_f "detox test -c android.emu.release"
14+
popd

scripts/demo-projects.ios.sh

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
#!/bin/bash -e
22

3-
source $(dirname "$0")/logger.sh
4-
5-
if [ ! -z ${REACT_NATIVE_VERSION} ]; then
6-
for proj in demo-react-native demo-react-native-jest; do
7-
node scripts/change_react_native_version.js "examples/${proj}" ${REACT_NATIVE_VERSION}
8-
done
9-
fi
10-
11-
run_f "lerna bootstrap"
3+
source $(dirname "$0")/demo-projects.sh
124

135
pushd examples/demo-react-native
146
run_f "detox build -c ios.sim.release"

scripts/demo-projects.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
3+
source $(dirname "$0")/logger.sh
4+
5+
if [ ! -z ${REACT_NATIVE_VERSION} ]; then
6+
for proj in demo-react-native demo-react-native-jest; do
7+
node scripts/change_react_native_version.js "examples/${proj}" ${REACT_NATIVE_VERSION}
8+
done
9+
fi
10+
11+
run_f "lerna bootstrap"

0 commit comments

Comments
 (0)