fix(detox): change detox to compiling dependency to fix android with react native 0.68 (#10701)
This commit is contained in:
parent
cce43db1f9
commit
e00dc75e94
@ -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()) {
|
||||
@ -302,7 +303,7 @@ dependencies {
|
||||
}
|
||||
|
||||
<% if (e2eTestRunner === 'detox') { %>
|
||||
androidTestImplementation('com.wix:detox:+')
|
||||
androidTestImplementation(project(path: ":detox"))
|
||||
<% } %>
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
@ -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
|
||||
}
|
||||
@ -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"
|
||||
}
|
||||
<% } %>
|
||||
}
|
||||
}
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user