Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup a script for Android demo projects in CI #914

Merged
merged 2 commits into from
Aug 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/demo-react-native-jest/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.android.tools.build:gradle:3.1.4'
}
}

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
8 changes: 4 additions & 4 deletions examples/demo-react-native/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ apply from: "../../node_modules/react-native/react.gradle"

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

defaultConfig {
applicationId "com.detox.rn.example"
Expand Down Expand Up @@ -69,13 +69,13 @@ android {
}

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

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 examples/demo-react-native/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'
}
}

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
4 changes: 2 additions & 2 deletions examples/demo-react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
"binaryPath": "android/app/build/outputs/apk/debug/app-debug.apk",
"build": "pushd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && popd",
"type": "android.emulator",
"name": "Nexus_5X_API_24_-_GPlay"
"name": "Nexus_5X_API_26"
},
"android.emu.release": {
"binaryPath": "android/app/build/outputs/apk/release/app-release.apk",
"build": "pushd android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release && popd",
"type": "android.emulator",
"name": "Nexus_5X_API_24_-_GPlay"
"name": "Nexus_5X_API_26"
}
}
}
Expand Down
14 changes: 14 additions & 0 deletions scripts/demo-projects.android.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash -e

source $(dirname "$0")/demo-projects.sh

pushd examples/demo-react-native
run_f "detox build -c android.emu.release"
run_f "detox test -c android.emu.release"
run_f "detox test -c android.emu.release --specs e2eExplicitRequire --runner-config e2eExplicitRequire/mocha.opts"
popd

pushd examples/demo-react-native-jest
run_f "detox build -c android.emu.release"
run_f "detox test -c android.emu.release"
popd
10 changes: 1 addition & 9 deletions scripts/demo-projects.ios.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
#!/bin/bash -e

source $(dirname "$0")/logger.sh

if [ ! -z ${REACT_NATIVE_VERSION} ]; then
for proj in demo-react-native demo-react-native-jest; do
node scripts/change_react_native_version.js "examples/${proj}" ${REACT_NATIVE_VERSION}
done
fi

run_f "lerna bootstrap"
source $(dirname "$0")/demo-projects.sh

pushd examples/demo-react-native
run_f "detox build -c ios.sim.release"
Expand Down
11 changes: 11 additions & 0 deletions scripts/demo-projects.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

source $(dirname "$0")/logger.sh

if [ ! -z ${REACT_NATIVE_VERSION} ]; then
for proj in demo-react-native demo-react-native-jest; do
node scripts/change_react_native_version.js "examples/${proj}" ${REACT_NATIVE_VERSION}
done
fi

run_f "lerna bootstrap"