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

fix(detox): change detox to compiling dependency to fix android with react native 0.68 #10701

Merged
merged 1 commit into from
Jun 13, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ android {
<% if (e2eTestRunner === 'detox') { %>
testBuildType System.getProperty('testBuildType', 'debug') // This will later be used to control the test apk build type
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
missingDimensionStrategy 'detox', 'full'
<% } %>

if (isNewArchitectureEnabled()) {
Expand Down Expand Up @@ -302,7 +303,7 @@ dependencies {
}

<% if (e2eTestRunner === 'detox') { %>
androidTestImplementation('com.wix:detox:+')
androidTestImplementation(project(path: ":detox"))
<% } %>
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ buildscript {
minSdkVersion = 21
compileSdkVersion = 31
targetSdkVersion = 31
<% if (e2eTestRunner === 'detox') { %>
kotlinVersion = '1.6.21'
<% } %>

if (System.properties['os.arch'] == "aarch64") {
// For M1 Users we need to use the NDK 24 which added support for aarch64
Expand All @@ -25,6 +28,9 @@ buildscript {
classpath("com.android.tools.build:gradle:7.0.4")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("de.undercouch:gradle-download-task:4.1.2")
<% if (e2eTestRunner === 'detox') { %>
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
<% } %>
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand All @@ -49,12 +55,5 @@ allprojects {
}
google()
maven { url 'https://www.jitpack.io' }

<% if (e2eTestRunner === 'detox') { %>
maven {
// All of Detox' artifacts are provided via the npm module
url "$rootDir/../node_modules/detox/Detox-android"
}
<% } %>
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ rootProject.name = '<%= className %>'
include ':react-native-config'
project(':react-native-config').projectDir = new File(rootProject.projectDir, '../../../node_modules/react-native-config/android')

<% if (e2eTestRunner === 'detox') { %>
include ':detox'
project(':detox').projectDir = new File(rootProject.projectDir, '../node_modules/detox/android/detox')
<% } %>

apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle");
applyNativeModulesSettingsGradle(settings)

Expand Down