mirror of
https://github.com/hanzoai/Detox.git
synced 2026-09-24 16:55:12 +00:00
+3
-2
@@ -1,12 +1,13 @@
|
||||
- label: ":android::react: RN .72 + Android: Demo app"
|
||||
- label: ":android::react: RN .73 + Android: Demo app"
|
||||
command:
|
||||
- "nvm install"
|
||||
- "./scripts/demo-projects.android.sh"
|
||||
env:
|
||||
REACT_NATIVE_VERSION: 0.72.8
|
||||
REACT_NATIVE_VERSION: 0.73.2
|
||||
REACT_NATIVE_COMPAT_TEST: true # Only set 'true' in jobs with the latest supported RN
|
||||
DETOX_DISABLE_POD_INSTALL: true
|
||||
DETOX_DISABLE_POSTINSTALL: true
|
||||
JAVA_HOME: /opt/openjdk/jdk-17.0.9.jdk/Contents/Home/
|
||||
artifact_paths:
|
||||
- "/Users/builder/work/coverage/**/*.lcov"
|
||||
- "/Users/builder/work/artifacts*.tar.gz"
|
||||
+3
-2
@@ -1,11 +1,12 @@
|
||||
- label: ":android::detox: RN .72 + Android: Tests app"
|
||||
- label: ":android::detox: RN .73 + Android: Tests app"
|
||||
command:
|
||||
- "nvm install"
|
||||
- "./scripts/ci.android.sh"
|
||||
env:
|
||||
REACT_NATIVE_VERSION: 0.72.8
|
||||
REACT_NATIVE_VERSION: 0.73.2
|
||||
DETOX_DISABLE_POD_INSTALL: true
|
||||
DETOX_DISABLE_POSTINSTALL: true
|
||||
JAVA_HOME: /opt/openjdk/jdk-17.0.9.jdk/Contents/Home/
|
||||
artifact_paths:
|
||||
- "/Users/builder/work/coverage/**/*.lcov"
|
||||
- "/Users/builder/work/**/allure-report-*.html"
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
- label: ":ios::react: RN .72 + iOS: Demo app"
|
||||
- label: ":ios::react: RN .73 + iOS: Demo app"
|
||||
command:
|
||||
- "nvm install"
|
||||
- "./scripts/demo-projects.ios.sh"
|
||||
env:
|
||||
REACT_NATIVE_VERSION: 0.72.8
|
||||
REACT_NATIVE_VERSION: 0.73.2
|
||||
artifact_paths:
|
||||
- "/Users/builder/work/coverage/**/*.lcov"
|
||||
- "/Users/builder/work/artifacts*.tar.gz"
|
||||
@@ -1,9 +1,9 @@
|
||||
- label: ":ios::detox: RN .72 + iOS: Tests app"
|
||||
- label: ":ios::detox: RN .73 + iOS: Tests app"
|
||||
command:
|
||||
- "nvm install"
|
||||
- "./scripts/ci.ios.sh"
|
||||
env:
|
||||
REACT_NATIVE_VERSION: 0.72.8
|
||||
REACT_NATIVE_VERSION: 0.73.2
|
||||
artifact_paths:
|
||||
- "/Users/builder/work/coverage/**/*.lcov"
|
||||
- "/Users/builder/work/**/allure-report-*.html"
|
||||
@@ -2,11 +2,12 @@
|
||||
|
||||
echo "steps:"
|
||||
|
||||
cat .buildkite/jobs/pipeline.ios_rn_72.yml
|
||||
cat .buildkite/jobs/pipeline.ios_rn_73.yml
|
||||
cat .buildkite/jobs/pipeline.ios_rn_71.yml
|
||||
cat .buildkite/jobs/pipeline.ios_demo_app_rn_72.yml
|
||||
cat .buildkite/jobs/pipeline.ios_demo_app_rn_73.yml
|
||||
cat .buildkite/jobs/pipeline.ios_demo_app_rn_71.yml
|
||||
cat .buildkite/jobs/pipeline.android_rn_72.yml
|
||||
cat .buildkite/jobs/pipeline.android_rn_73.yml
|
||||
cat .buildkite/jobs/pipeline.android_rn_71.yml
|
||||
cat .buildkite/jobs/pipeline.android_demo_app_rn_72.yml
|
||||
cat .buildkite/jobs/pipeline.android_demo_app_rn_73.yml
|
||||
cat .buildkite/jobs/pipeline.android_demo_app_rn_71.yml
|
||||
cat .buildkite/pipeline.post_processing.yml
|
||||
|
||||
@@ -3,11 +3,11 @@ buildscript {
|
||||
|
||||
ext {
|
||||
isOfficialDetoxLib = true
|
||||
kotlinVersion = '1.6.21'
|
||||
kotlinVersion = '1.8.0'
|
||||
dokkaVersion = '1.9.10'
|
||||
buildToolsVersion = '33.0.0'
|
||||
compileSdkVersion = 33
|
||||
targetSdkVersion = 33
|
||||
buildToolsVersion = '34.0.0'
|
||||
compileSdkVersion = 34
|
||||
targetSdkVersion = 34
|
||||
minSdkVersion = 21
|
||||
}
|
||||
ext.detoxKotlinVersion = ext.kotlinVersion
|
||||
|
||||
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
|
||||
apply from: '../rninfo.gradle'
|
||||
|
||||
def _kotlinMinVersion = '1.2.0'
|
||||
def _materialMinVersion = '1.2.1'
|
||||
def _materialMinVersion = '1.11.0'
|
||||
|
||||
def _ext = rootProject.ext
|
||||
def _compileSdkVersion = _ext.has('compileSdkVersion') ? _ext.compileSdkVersion : 31
|
||||
@@ -65,7 +65,7 @@ android {
|
||||
def repeatLength = output.length()
|
||||
println '\n' + ('-' * repeatLength) + '\n' + output + '\n' + ('-' * repeatLength) + '\n'
|
||||
|
||||
println "see report at file://${t.reports.html.destination}/index.html"
|
||||
println "see report at file://${t.reports.html.outputLocation}/index.html"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -82,6 +82,26 @@ android {
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
if (rnInfo.isRN72OrHigher) {
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_17
|
||||
targetCompatibility JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = '17'
|
||||
}
|
||||
} else {
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = '11'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// In a nutshell:
|
||||
@@ -151,7 +171,7 @@ dependencies {
|
||||
testImplementation 'org.assertj:assertj-core:3.16.1'
|
||||
testImplementation "org.jetbrains.kotlin:kotlin-test:$_kotlinVersion"
|
||||
testImplementation 'org.apache.commons:commons-io:1.3.2'
|
||||
testImplementation 'org.mockito.kotlin:mockito-kotlin:4.0.0'
|
||||
testImplementation 'org.mockito.kotlin:mockito-kotlin:5.2.1'
|
||||
testImplementation 'org.robolectric:robolectric:4.11.1'
|
||||
|
||||
testImplementation("com.google.android.material:material:$_materialMinVersion") {
|
||||
|
||||
@@ -21,3 +21,7 @@
|
||||
-keep class okhttp3.** { *; }
|
||||
|
||||
-keep class androidx.concurrent.futures.** { *; }
|
||||
|
||||
-dontwarn androidx.appcompat.**
|
||||
-dontwarn javax.lang.model.element.**
|
||||
|
||||
|
||||
+3
@@ -20,3 +20,6 @@
|
||||
|
||||
-keep class com.wix.detoxprofiler.** { *; }
|
||||
-dontnote com.wix.detox.instruments.reflected.**
|
||||
|
||||
-dontwarn androidx.appcompat.**
|
||||
-dontwarn javax.lang.model.element.**
|
||||
|
||||
@@ -198,11 +198,11 @@ publishing {
|
||||
|
||||
// Register sources, javadoc as published artifacts (via equivalent tasks' output)
|
||||
artifact sourcesJar
|
||||
artifact dokkaDocJar
|
||||
//artifact dokkaDocJar // waiting for dokka to fix https://github.com/Kotlin/dokka/issues/3153
|
||||
|
||||
// Also register source, javadoc as archive-artifacts, for signing
|
||||
declareArchive sourcesJar
|
||||
declareArchive dokkaDocJar
|
||||
//declareArchive dokkaDocJar // waiting for dokka to fix https://github.com/Kotlin/dokka/issues/3153
|
||||
|
||||
// Add detox package metadata to the .pom
|
||||
pom {
|
||||
|
||||
@@ -178,7 +178,7 @@ public class DetoxAction {
|
||||
return PickerActions.setDate(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH) + 1, cal.get(Calendar.DAY_OF_MONTH));
|
||||
}
|
||||
|
||||
public static ViewAction adjustSliderToPosition(final double newPosition) {
|
||||
public static ViewAction adjustSliderToPosition(final Float newPosition) {
|
||||
return new AdjustSliderToPositionAction(newPosition);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ import com.wix.detox.espresso.common.ReactSliderHelper
|
||||
import org.hamcrest.Matcher
|
||||
import org.hamcrest.Matchers
|
||||
|
||||
class AdjustSliderToPositionAction(private val targetPositionPct: Double) : ViewAction {
|
||||
class AdjustSliderToPositionAction(private val targetPositionPct: Float) : ViewAction {
|
||||
override fun getDescription() = "adjustSliderToPosition"
|
||||
override fun getConstraints(): Matcher<View?>? =
|
||||
Matchers.allOf( isDisplayed(), isAssignableFrom(AppCompatSeekBar::class.java) )
|
||||
|
||||
+6
-6
@@ -21,13 +21,13 @@ abstract class ReactSliderHelper(protected val slider: AppCompatSeekBar) {
|
||||
}
|
||||
|
||||
// TODO Make this more testable (e.g. by delegating the set action away)
|
||||
fun setProgressPct(valuePct: Double) {
|
||||
fun setProgressPct(valuePct: Float) {
|
||||
val maxJSProgress = calcMaxJSProgress()
|
||||
val valueJS = valuePct * maxJSProgress
|
||||
setProgressJS(valueJS)
|
||||
setProgressJS(valueJS.toFloat())
|
||||
}
|
||||
|
||||
protected abstract fun setProgressJS(valueJS: Double)
|
||||
protected abstract fun setProgressJS(valueJS: Float)
|
||||
|
||||
private fun calcMaxJSProgress(): Double {
|
||||
val nativeProgress = slider.progress.toDouble()
|
||||
@@ -60,16 +60,16 @@ abstract class ReactSliderHelper(protected val slider: AppCompatSeekBar) {
|
||||
}
|
||||
|
||||
private class LegacySliderHelper(slider: AppCompatSeekBar): ReactSliderHelper(slider) {
|
||||
override fun setProgressJS(valueJS: Double) {
|
||||
override fun setProgressJS(valueJS: Float) {
|
||||
val reactSliderManager = Class.forName(CLASS_REACT_SLIDER_LEGACY_MANAGER).newInstance()
|
||||
Reflect.on(reactSliderManager).call("updateProperties", slider, buildStyles("value", valueJS))
|
||||
Reflect.on(reactSliderManager).call("updateProperties", slider, buildStyles("value", valueJS.toDouble()))
|
||||
}
|
||||
|
||||
private fun buildStyles(vararg keysAndValues: Any) = ReactStylesDiffMap(JavaOnlyMap.of(*keysAndValues))
|
||||
}
|
||||
|
||||
private class CommunitySliderHelper(slider: AppCompatSeekBar): ReactSliderHelper(slider) {
|
||||
override fun setProgressJS(valueJS: Double) {
|
||||
override fun setProgressJS(valueJS: Float) {
|
||||
val reactSliderManager = Class.forName(CLASS_REACT_SLIDER_COMMUNITY_MANAGER).newInstance()
|
||||
Reflect.on(reactSliderManager).call("setValue", slider, valueJS)
|
||||
}
|
||||
|
||||
+12
-10
@@ -3,6 +3,7 @@ package com.wix.detox.adapters.server
|
||||
import com.wix.detox.TestEngineFacade
|
||||
import com.wix.detox.inquiry.DetoxBusyResource
|
||||
import com.wix.detox.inquiry.DetoxBusyResourceDescription
|
||||
import org.mockito.kotlin.doReturn
|
||||
import org.mockito.kotlin.eq
|
||||
import org.mockito.kotlin.mock
|
||||
import org.mockito.kotlin.verify
|
||||
@@ -42,16 +43,17 @@ object QueryStatusActionHandlerSpec : Spek({
|
||||
}
|
||||
|
||||
describe("given a busy app") {
|
||||
fun aBusyResourceDescription(description: Map<String, Any>): DetoxBusyResourceDescription =
|
||||
mock {
|
||||
on { json() }.thenReturn(description)
|
||||
}
|
||||
|
||||
|
||||
fun aBusyResource(identifier: String): DetoxBusyResource {
|
||||
val mockedDescription = aBusyResourceDescription(mapOf("mock" to identifier))
|
||||
return mock {
|
||||
on { getDescription() }.thenReturn(mockedDescription)
|
||||
|
||||
return mock<DetoxBusyResource.BusyIdlingResource> {
|
||||
on { getDescription() } doReturn DetoxBusyResourceDescription.Builder()
|
||||
.name("mock")
|
||||
.addDescription("mock", identifier)
|
||||
.build()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
it("should send a descriptive busy-status indication") {
|
||||
@@ -60,8 +62,8 @@ object QueryStatusActionHandlerSpec : Spek({
|
||||
val expectedData = mapOf<String, Any>("status" to mapOf(
|
||||
"app_status" to "busy",
|
||||
"busy_resources" to listOf(
|
||||
mapOf("mock" to "some-resource"),
|
||||
mapOf("mock" to "yet-another-resource"),
|
||||
mapOf("name" to "mock", "description" to mapOf("mock" to "some-resource")),
|
||||
mapOf("name" to "mock", "description" to mapOf("mock" to "yet-another-resource"))
|
||||
)
|
||||
))
|
||||
whenever(testEngineFacade.getAllBusyResources()).thenReturn(listOf(busyResource, busyResource2))
|
||||
@@ -71,4 +73,4 @@ object QueryStatusActionHandlerSpec : Spek({
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
BIN
Binary file not shown.
+3
-3
@@ -1,7 +1,7 @@
|
||||
#Sun Sep 15 22:36:02 IDT 2019
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip
|
||||
|
||||
|
||||
Vendored
+24
-9
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
@@ -55,7 +55,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
@@ -80,13 +80,11 @@ do
|
||||
esac
|
||||
done
|
||||
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
APP_NAME="Gradle"
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
@@ -133,22 +131,29 @@ location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
if ! command -v java >/dev/null 2>&1
|
||||
then
|
||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
@@ -193,6 +198,10 @@ if "$cygwin" || "$msys" ; then
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
@@ -205,6 +214,12 @@ set -- \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
if ! command -v xargs >/dev/null 2>&1
|
||||
then
|
||||
die "xargs is not available"
|
||||
fi
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
|
||||
Vendored
+92
-90
@@ -1,90 +1,92 @@
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windowz variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
goto execute
|
||||
|
||||
:4NT_args
|
||||
@rem Get arguments from the 4NT Shell from JP Software
|
||||
set CMD_LINE_ARGS=%$
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
|
||||
@@ -33,5 +33,6 @@ if (hasProperty('project')) {
|
||||
isRN70OrHigher: rnMajorVer >= 70,
|
||||
isRN71OrHigher: rnMajorVer >= 71,
|
||||
isRN72OrHigher: rnMajorVer >= 72,
|
||||
isRN73OrHigher: rnMajorVer >= 73,
|
||||
]
|
||||
}
|
||||
|
||||
+3
-3
@@ -59,7 +59,7 @@
|
||||
"jest-allure2-reporter": "^2.0.0-beta.9",
|
||||
"metro-react-native-babel-preset": "0.76.8",
|
||||
"prettier": "^3.1.1",
|
||||
"react-native": "0.72.8",
|
||||
"react-native": "0.73.2",
|
||||
"react-native-codegen": "^0.0.8",
|
||||
"typescript": "^5.3.3",
|
||||
"wtfnode": "^0.9.1"
|
||||
@@ -110,9 +110,9 @@
|
||||
}
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16"
|
||||
"node": ">=18"
|
||||
},
|
||||
"browserslist": [
|
||||
"node 16"
|
||||
"node 18"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
const { setGradleVersionByRNVersion } = require('./updateGradle');
|
||||
if (process.platform === 'darwin' && !process.env.DETOX_DISABLE_POSTINSTALL) {
|
||||
require('child_process').execFileSync(`${__dirname}/build_framework.ios.sh`, {
|
||||
stdio: 'inherit'
|
||||
});
|
||||
|
||||
}
|
||||
setGradleVersionByRNVersion();
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const rnMinor = require('../src/utils/rn-consts/rn-consts').rnVersion.minor;
|
||||
|
||||
function getGradleVersionByRNVersion() {
|
||||
switch (rnMinor) {
|
||||
default:
|
||||
return '8.3';
|
||||
case '72':
|
||||
return '8.0';
|
||||
case '71':
|
||||
return '7.6.1';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the Gradle wrapper to the version that matches the React Native version.
|
||||
*/
|
||||
function setGradleVersionByRNVersion() {
|
||||
const gradleVersion = getGradleVersionByRNVersion();
|
||||
updateGradleWrapperSync(gradleVersion);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the Gradle wrapper to the specified version.
|
||||
*
|
||||
* @param {string} newVersion - the new Gradle wrapper version
|
||||
*/
|
||||
function updateGradleWrapperSync(newVersion) {
|
||||
const gradleWrapperPath = path.join(process.cwd(), 'android', 'gradle', 'wrapper', 'gradle-wrapper.properties');
|
||||
console.log(`Updating Gradle wrapper to version${newVersion}. File: ${gradleWrapperPath}`);
|
||||
|
||||
try {
|
||||
let data = fs.readFileSync(gradleWrapperPath, 'utf8');
|
||||
let updatedData = data.replace(/distributionUrl=.+\n/, `distributionUrl=https\\://services.gradle.org/distributions/gradle-${newVersion}-bin.zip\n`);
|
||||
|
||||
fs.writeFileSync(gradleWrapperPath, updatedData, 'utf8');
|
||||
console.log(`Gradle wrapper updated successfully to version ${newVersion}.`);
|
||||
} catch (err) {
|
||||
console.error('Error:', err);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
setGradleVersionByRNVersion
|
||||
};
|
||||
@@ -216,7 +216,6 @@ class DetoxAction {
|
||||
}
|
||||
|
||||
static adjustSliderToPosition(newPosition) {
|
||||
if (typeof newPosition !== "number") throw new Error("newPosition should be a number, but got " + (newPosition + (" (" + (typeof newPosition + ")"))));
|
||||
return {
|
||||
target: {
|
||||
type: "Class",
|
||||
@@ -224,7 +223,7 @@ class DetoxAction {
|
||||
},
|
||||
method: "adjustSliderToPosition",
|
||||
args: [{
|
||||
type: "Double",
|
||||
type: "Float",
|
||||
value: newPosition
|
||||
}]
|
||||
};
|
||||
|
||||
@@ -1,23 +1,33 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'com.facebook.react'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply from: '../../../android/rninfo.gradle'
|
||||
|
||||
if (rnInfo.isRN71OrHigher) {
|
||||
apply plugin: 'com.facebook.react'
|
||||
} else {
|
||||
project.ext.react = [
|
||||
enableHermes: true
|
||||
]
|
||||
apply from: '../../node_modules/react-native/react.gradle'
|
||||
}
|
||||
|
||||
android {
|
||||
namespace 'com.example'
|
||||
|
||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||
buildToolsVersion = rootProject.ext.buildToolsVersion
|
||||
compileSdk = rootProject.ext.compileSdkVersion
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
if (rnInfo.isRN72OrHigher) {
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_17
|
||||
targetCompatibility JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = '17'
|
||||
}
|
||||
} else {
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = '11'
|
||||
}
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
@@ -61,19 +71,9 @@ android {
|
||||
release {
|
||||
minifyEnabled true
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro', "${project(':detox').projectDir}/proguard-rules-app.pro"
|
||||
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
}
|
||||
productFlavors {
|
||||
flavorDimensions 'reactNativeVersion'
|
||||
rnDefault {
|
||||
dimension 'reactNativeVersion'
|
||||
}
|
||||
rnLegacy { // For RN < 71
|
||||
dimension 'reactNativeVersion'
|
||||
}
|
||||
}
|
||||
packagingOptions {
|
||||
pickFirst '**/libc++_shared.so'
|
||||
|
||||
@@ -83,16 +83,19 @@ android {
|
||||
exclude 'META-INF/LICENSE.txt'
|
||||
exclude 'META-INF/NOTICE.txt'
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
buildConfig = true
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// The version of react-native is set by the React Native Gradle Plugin
|
||||
rnDefaultImplementation('com.facebook.react:react-android')
|
||||
// noinspection GradleDynamicVersion
|
||||
rnLegacyImplementation('com.facebook.react:react-native:+')
|
||||
implementation('com.facebook.react:react-android')
|
||||
|
||||
implementation "androidx.appcompat:appcompat:${rootProject.ext.appCompatVersion}"
|
||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
||||
|
||||
implementation project(path: ':@react-native-community_slider')
|
||||
implementation project(':AsyncStorage')
|
||||
implementation project(':react-native-webview')
|
||||
@@ -108,11 +111,7 @@ dependencies {
|
||||
|
||||
// Apply Hermes as our JS engine
|
||||
dependencies {
|
||||
rnDefaultImplementation('com.facebook.react:hermes-android')
|
||||
// noinspection GradleDynamicVersion
|
||||
rnLegacyImplementation('com.facebook.react:hermes-engine:+') {
|
||||
exclude group: 'com.facebook.fbjni'
|
||||
}
|
||||
implementation('com.facebook.react:hermes-android')
|
||||
}
|
||||
|
||||
// Run this once to be able to run the application with BUCK
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
package com.example;
|
||||
|
||||
import android.app.Application;
|
||||
|
||||
import com.facebook.react.ReactPackage;
|
||||
import com.facebook.react.ReactNativeHost;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
class DetoxRNHost extends ReactNativeHost {
|
||||
protected DetoxRNHost(Application application) {
|
||||
super(application);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getUseDeveloperSupport() {
|
||||
return BuildConfig.DEBUG;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<ReactPackage> getPackages() {
|
||||
// Packages that cannot be autolinked yet can be added manually here, for example:
|
||||
// packages.add(new MyReactNativePackage());
|
||||
// TurboModules must also be loaded here providing a valid TurboReactPackage implementation:
|
||||
// packages.add(new TurboReactPackage() { ... });
|
||||
// If you have custom Fabric Components, their ViewManagers should also be loaded here
|
||||
// inside a ReactPackage.
|
||||
return ReactNativeAdapter.getManualLinkPackages();
|
||||
}
|
||||
}
|
||||
@@ -1,22 +1,14 @@
|
||||
buildscript {
|
||||
apply from: '../../android/rninfo.gradle'
|
||||
|
||||
def androidGradlePluginVersion =
|
||||
rnInfo.isRN71OrHigher ? '7.3.1' :
|
||||
rnInfo.isRN70OrHigher ? '7.2.1' :
|
||||
rnInfo.isRN69OrHigher ? '7.1.1' :
|
||||
'7.0.4'
|
||||
|
||||
println "[$project] Resorted to Android Gradle-plugin version $androidGradlePluginVersion"
|
||||
|
||||
ext {
|
||||
isOfficialDetoxApp = true
|
||||
kotlinVersion = '1.6.21'
|
||||
buildToolsVersion = '33.0.0'
|
||||
compileSdkVersion = 33
|
||||
targetSdkVersion = 33
|
||||
kotlinVersion = '1.8.0'
|
||||
buildToolsVersion = '34.0.0'
|
||||
compileSdkVersion = 34
|
||||
targetSdkVersion = 34
|
||||
minSdkVersion = 21
|
||||
appCompatVersion = '1.4.2'
|
||||
appCompatVersion = '1.6.1'
|
||||
}
|
||||
ext.detoxKotlinVersion = ext.kotlinVersion
|
||||
|
||||
@@ -27,18 +19,8 @@ buildscript {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath "com.android.tools.build:gradle:$androidGradlePluginVersion"
|
||||
|
||||
// In RN .71, they've switched to the gradle plugin they've uploaded to maven-central
|
||||
if (rnInfo.isRN71OrHigher) {
|
||||
classpath 'com.facebook.react:react-native-gradle-plugin'
|
||||
}
|
||||
|
||||
// Gradle task downloader seems to come built-in in newer versions of RN/Gradle
|
||||
if (!rnInfo.isRN71OrHigher) {
|
||||
classpath 'de.undercouch:gradle-download-task:5.0.1'
|
||||
}
|
||||
|
||||
classpath "com.android.tools.build:gradle"
|
||||
classpath 'com.facebook.react:react-native-gradle-plugin'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
|
||||
|
||||
// Needed by Spek (https://spekframework.org/setup-android)
|
||||
@@ -49,23 +31,8 @@ buildscript {
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
// In RN below 71, we want RN and hermes/js-core native code to come from node_modules/ rather
|
||||
// than from maven-central, because there are also older versions over there.
|
||||
if (rnInfo.isRN71OrHigher) {
|
||||
google()
|
||||
mavenCentral()
|
||||
} else {
|
||||
maven {
|
||||
url "$rootDir/../../node_modules/react-native/android"
|
||||
}
|
||||
google()
|
||||
mavenCentral() {
|
||||
content {
|
||||
excludeGroup 'com.facebook.react'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
google()
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
}
|
||||
}
|
||||
@@ -79,3 +46,7 @@ subprojects {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ext.rnInfo.isRN73OrHigher) {
|
||||
apply plugin: "com.facebook.react.rootproject"
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -1,6 +1,7 @@
|
||||
#Thu Feb 09 21:36:01 IST 2023
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
Vendored
+24
-9
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
@@ -55,7 +55,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
@@ -80,13 +80,11 @@ do
|
||||
esac
|
||||
done
|
||||
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
APP_NAME="Gradle"
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
@@ -133,22 +131,29 @@ location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
if ! command -v java >/dev/null 2>&1
|
||||
then
|
||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
@@ -193,6 +198,10 @@ if "$cygwin" || "$msys" ; then
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
@@ -205,6 +214,12 @@ set -- \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
if ! command -v xargs >/dev/null 2>&1
|
||||
then
|
||||
die "xargs is not available"
|
||||
fi
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
|
||||
Vendored
+34
-32
@@ -1,4 +1,20 @@
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@@ -8,20 +24,24 @@
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
@@ -35,7 +55,7 @@ goto fail
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
@@ -45,44 +65,26 @@ echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windowz variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
goto execute
|
||||
|
||||
:4NT_args
|
||||
@rem Get arguments from the 4NT Shell from JP Software
|
||||
set CMD_LINE_ARGS=%$
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
@@ -1,21 +1,12 @@
|
||||
const _ = require('lodash');
|
||||
const { rnVersion } = require('./utils/rn-consts/rn-consts');
|
||||
|
||||
const capitalizeFirstLetter = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
||||
const isRNVersionBellow71 = (rnVersion.minor < 71);
|
||||
const warnOnce = _.once((...args) => console.warn(...args));
|
||||
|
||||
function androidBaseAppConfig(buildType /* 'debug' | 'release' */) {
|
||||
const warnRNLegacy = () => warnOnce(`⚠️ Detected a legacy RN version (v${rnVersion.raw}) - Using legacy build-flavor for Android config! 🤖🛠\n`);
|
||||
|
||||
const appFlavor = (isRNVersionBellow71 ? warnRNLegacy() || 'rnLegacy' : 'rnDefault');
|
||||
const appFlavorUC = capitalizeFirstLetter(appFlavor);
|
||||
const buildTypeUC = capitalizeFirstLetter(buildType);
|
||||
|
||||
return {
|
||||
type: 'android.apk',
|
||||
binaryPath: `android/app/build/outputs/apk/${appFlavor}/${buildType}/app-${appFlavor}-${buildType}.apk`,
|
||||
build: `cd android && ./gradlew assemble${appFlavorUC}${buildTypeUC} assemble${appFlavorUC}${buildTypeUC}AndroidTest -DtestBuildType=${buildType} && cd ..`,
|
||||
binaryPath: `android/app/build/outputs/apk/${buildType}/app-${buildType}.apk`,
|
||||
build: `cd android && ./gradlew assemble${buildTypeUC} assemble${buildTypeUC}AndroidTest -DtestBuildType=${buildType} && cd ..`,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const _ = require('lodash');
|
||||
const rnMinorVer = require('./rn-consts/rn-consts').rnVersion.minor;
|
||||
const rnMinorVer = require('../../../src/utils/rn-consts/rn-consts').rnVersion.minor;
|
||||
|
||||
const _it = {
|
||||
withFailureIf: {
|
||||
|
||||
@@ -16,7 +16,7 @@ else
|
||||
node_require('react-native/scripts/react_native_pods.rb')
|
||||
node_require('react-native-permissions/scripts/setup.rb')
|
||||
end
|
||||
platform :ios, '13.0'
|
||||
platform :ios, min_ios_version_supported
|
||||
|
||||
install! 'cocoapods', :deterministic_uuids => false
|
||||
|
||||
@@ -105,7 +105,6 @@ post_install do |installer|
|
||||
|
||||
config = use_native_modules!
|
||||
|
||||
|
||||
react_native_post_install(
|
||||
installer,
|
||||
config[:reactNativePath],
|
||||
@@ -115,7 +114,7 @@ post_install do |installer|
|
||||
)
|
||||
|
||||
# See https://github.com/wix/Detox/pull/3035#discussion_r774747705
|
||||
if !ENV["REACT_NATIVE_VERSION"] || ENV["REACT_NATIVE_VERSION"].match(/0.(70|72).*/)
|
||||
if ENV["REACT_NATIVE_VERSION"] && ENV["REACT_NATIVE_VERSION"].match(/0.(70|72).*/)
|
||||
__apply_Xcode_12_5_M1_post_install_workaround(installer)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -286,7 +286,6 @@
|
||||
13B07F8E1A680F5B00A75B9A /* Resources */,
|
||||
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
|
||||
CC0F353E1D461097008BB94F /* Embed Frameworks */,
|
||||
82896AA7382A34BEDD897B9A /* [CP] Embed Pods Frameworks */,
|
||||
7E5379D0D68561A29BC0458B /* [CP] Copy Pods Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
@@ -309,7 +308,6 @@
|
||||
399B4DFD1ED587120098D2AC /* Resources */,
|
||||
399B4E001ED587120098D2AC /* Bundle React Native code and images */,
|
||||
399B4E011ED587120098D2AC /* Embed Frameworks */,
|
||||
DED4CB81FBF418B6C7C56B8C /* [CP] Embed Pods Frameworks */,
|
||||
9C024938B44AFDD355A0B654 /* [CP] Copy Pods Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
@@ -493,23 +491,6 @@
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-example/Pods-example-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
82896AA7382A34BEDD897B9A /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-example/Pods-example-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-example/Pods-example-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-example/Pods-example-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
9C024938B44AFDD355A0B654 /* [CP] Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -549,23 +530,6 @@
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
DED4CB81FBF418B6C7C56B8C /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-example_ci/Pods-example_ci-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-example_ci/Pods-example_ci-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-example_ci/Pods-example_ci-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
@@ -803,7 +767,7 @@
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
@@ -832,7 +796,7 @@
|
||||
ENABLE_BITCODE = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
|
||||
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
@@ -840,6 +804,7 @@
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION,
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
@@ -851,8 +816,16 @@
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
OTHER_CFLAGS = "$(inherited)";
|
||||
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
|
||||
OTHER_LDFLAGS = (
|
||||
"$(inherited)",
|
||||
"-Wl",
|
||||
"-ld_classic",
|
||||
);
|
||||
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
|
||||
SDKROOT = iphoneos;
|
||||
USE_HERMES = false;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
@@ -861,7 +834,7 @@
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
@@ -890,9 +863,13 @@
|
||||
ENABLE_BITCODE = NO;
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
|
||||
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"$(inherited)",
|
||||
_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION,
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
@@ -901,8 +878,16 @@
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
OTHER_CFLAGS = "$(inherited)";
|
||||
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
|
||||
OTHER_LDFLAGS = (
|
||||
"$(inherited)",
|
||||
"-Wl",
|
||||
"-ld_classic",
|
||||
);
|
||||
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
|
||||
SDKROOT = iphoneos;
|
||||
USE_HERMES = false;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
|
||||
@@ -2,12 +2,6 @@
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>NSFaceIDUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSPhotoLibraryUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSAppleMusicUsageDescription</key>
|
||||
<string></string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
@@ -44,13 +38,45 @@
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<false/>
|
||||
<key>NSAllowsLocalNetworking</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>NSAppleMusicUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSBluetoothAlwaysUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSBluetoothPeripheralUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSCalendarsUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSContactsUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSFaceIDUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSLocationTemporaryUsageDescriptionDictionary</key>
|
||||
<dict/>
|
||||
<key>NSLocationWhenInUseUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSMicrophoneUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSMotionUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSPhotoLibraryAddUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSLocationWhenInUseUsageDescription</key>
|
||||
<key>NSPhotoLibraryUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSRemindersUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSSiriUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSSpeechRecognitionUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSUserTrackingUsageDescription</key>
|
||||
<string></string>
|
||||
<key>UIBackgroundModes</key>
|
||||
<array>
|
||||
@@ -74,30 +100,6 @@
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<true/>
|
||||
<key>NSContactsUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSBluetoothAlwaysUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSBluetoothPeripheralUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSLocationTemporaryUsageDescriptionDictionary</key>
|
||||
<dict/>
|
||||
<key>NSMicrophoneUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSMotionUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSRemindersUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSSpeechRecognitionUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSSiriUsageDescription</key>
|
||||
<string></string>
|
||||
<key>NSUserTrackingUsageDescription</key>
|
||||
<string></string>
|
||||
<key>WKBackgroundModes</key>
|
||||
<array>
|
||||
<string>remote-notification</string>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"version": "20.18.4",
|
||||
"private": true,
|
||||
"engines": {
|
||||
"node": ">=16"
|
||||
"node": ">=18"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint .",
|
||||
@@ -35,12 +35,12 @@
|
||||
"@react-native-community/checkbox": "0.5.16",
|
||||
"@react-native-community/datetimepicker": "^6.7.1",
|
||||
"@react-native-community/geolocation": "^2.0.2",
|
||||
"@react-native-community/slider": "4.2.4",
|
||||
"@react-native-community/slider": "4.5.0",
|
||||
"@react-native-picker/picker": "^2.1.0",
|
||||
"@react-native-segmented-control/segmented-control": "2.3.0",
|
||||
"moment": "^2.24.0",
|
||||
"react": "18.2.0",
|
||||
"react-native": "0.72.8",
|
||||
"react-native": "0.73.2",
|
||||
"react-native-launch-arguments": "^4.0.0",
|
||||
"react-native-permissions": "^4.0.2",
|
||||
"react-native-webview": "^11.18.1"
|
||||
@@ -49,8 +49,9 @@
|
||||
"@babel/core": "^7.20.0",
|
||||
"@babel/preset-env": "^7.20.0",
|
||||
"@babel/runtime": "^7.20.0",
|
||||
"@react-native/eslint-config": "^0.72.2",
|
||||
"@react-native/metro-config": "^0.72.11",
|
||||
"@react-native/eslint-config": "^0.73.2",
|
||||
"@react-native/metro-config": "^0.73.3",
|
||||
"@react-native/typescript-config": "0.73.1",
|
||||
"@tsconfig/react-native": "^3.0.0",
|
||||
"@types/jest": "^29.5.11",
|
||||
"@types/node": "^16.18.68",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
const fs = require('fs-extra');
|
||||
const cp = require('child_process');
|
||||
const { setGradleVersionByRNVersion } = require('../../scripts/updateGradle');
|
||||
|
||||
const patchBoostPodspec = () => {
|
||||
const log = message => console.log(`[POST-INSTALL] ${message}`);
|
||||
@@ -38,4 +39,5 @@ function podInstallIfRequired() {
|
||||
|
||||
console.log('[POST-INSTALL] Running Detox\'s test-app post-install script...');
|
||||
podInstallIfRequired();
|
||||
setGradleVersionByRNVersion()
|
||||
console.log('[POST-INSTALL] Completed!');
|
||||
|
||||
@@ -14,7 +14,13 @@ import {
|
||||
} from 'react-native';
|
||||
import TextInput from '../Views/TextInput';
|
||||
import Slider from '@react-native-community/slider';
|
||||
const LegacySlider = require('react-native').Slider;
|
||||
|
||||
let LegacySlider;
|
||||
try {
|
||||
LegacySlider = require('react-native').Slider;
|
||||
} catch (e) {
|
||||
// Ignore
|
||||
}
|
||||
|
||||
const DoubleTapsText = requireNativeComponent('DetoxDoubleTapsTextView');
|
||||
const SluggishTapsText = requireNativeComponent('DetoxSluggishTapsTextView');
|
||||
|
||||
@@ -9,7 +9,12 @@ import {
|
||||
import CheckBox from '@react-native-community/checkbox';
|
||||
import Slider from '@react-native-community/slider';
|
||||
import {default as DatePicker} from '@react-native-community/datetimepicker';
|
||||
const LegacySlider = require('react-native').Slider;
|
||||
let LegacySlider;
|
||||
try {
|
||||
LegacySlider = require('react-native').Slider;
|
||||
} catch (e) {
|
||||
// Ignore
|
||||
}
|
||||
|
||||
export default class AttributesScreen extends Component {
|
||||
constructor(props) {
|
||||
|
||||
@@ -10,7 +10,7 @@ Note that running automated UI tests is _not the same_ as developing Android app
|
||||
|
||||
This is the most basic step in the process, as without a proper Java SDK installed, nothing Android-ish works – at least not from command-line, which is mandatory for executing `Detox`.
|
||||
|
||||
_The bottom line is that **Android needs Java installed**. If you want to run with React Native 66 and Android 12 then it needs to be at least Java 11, otherwise you should have Java 8._
|
||||
_The bottom line is that **Android needs Java installed**. If you want to run with React Native 73 and Android 14 then it needs to be at least Java 17, otherwise you should have Java 11._
|
||||
|
||||
To check for your real java-executable’s version, in a command-line console, run:
|
||||
|
||||
@@ -21,19 +21,10 @@ java -version
|
||||
What needs to be verified is that `java` is in-path and that the output contains something like this:
|
||||
|
||||
```bash
|
||||
java version "11.x.x"
|
||||
java version "17.x.x"
|
||||
...
|
||||
```
|
||||
|
||||
or, if you have [openjdk](https://techoral.com/blog/openjdk-developers-guide.html) installed:
|
||||
|
||||
```bash
|
||||
openjdk version "11.0.2" 2019-01-1
|
||||
...
|
||||
```
|
||||
|
||||
**Namely, that the version is `11.x.x`**.
|
||||
|
||||
> Note: Do not be confused by the Java version potentially used by your browsers, etc. For `Detox`, what the command-line sees is what matters.
|
||||
|
||||
---
|
||||
@@ -44,7 +35,7 @@ If otherwise the version is simply wrong, try these course of actions:
|
||||
|
||||
- On MacOS, in particular, Java comes from both the OS _and_ possibly other installers such as `homebrew`. That can really get things tangled up. To mitigate:
|
||||
- Use one of the options suggested in this [Stack Overflow post](https://stackoverflow.com/questions/52524112/how-do-i-install-java-on-mac-osx-allowing-version-switching/52524114#52524114).
|
||||
- Install OpenJDK 11 on top of the existing versions ([how to check?](https://medium.com/notes-for-geeks/java-home-and-java-home-on-macos-f246cab643bd)): <https://techoral.com/blog/java/install-openjdk-11-on-mac.html>. Consider employing the `JAVA_HOME` variable to get things to work right. _Note: This is more suitable if your environment is fairly clean, and does not contain versions from 3rd-party installers (e.g. `homebrew`)._
|
||||
- Install OpenJDK 17 on top of the existing versions ([how to check?](https://medium.com/notes-for-geeks/java-home-and-java-home-on-macos-f246cab643bd)): <https://java.tutorials24x7.com/blog/how-to-install-openjdk-17-on-mac>. Consider employing the `JAVA_HOME` variable to get things to work right. _Note: This is more suitable if your environment is fairly clean, and does not contain versions from 3rd-party installers (e.g. `homebrew`)._
|
||||
- Use these refs, which might be useful:
|
||||
- <https://java.com/en/download/faq/java_mac.xml#version>
|
||||
- <https://www.java.com/en/download/help/version_manual.xml>
|
||||
|
||||
@@ -4,7 +4,9 @@ apply plugin: 'com.facebook.react'
|
||||
android {
|
||||
namespace 'com.example'
|
||||
|
||||
buildToolsVersion rootProject.ext.buildToolsVersion
|
||||
buildToolsVersion = rootProject.ext.buildToolsVersion
|
||||
|
||||
println("[$project] Using buildToolsVersion $buildToolsVersion")
|
||||
|
||||
defaultConfig {
|
||||
applicationId 'com.detox.rn.example'
|
||||
@@ -43,7 +45,6 @@ android {
|
||||
minifyEnabled true
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
proguardFile "${rootProject.projectDir}/../node_modules/detox/android/detox/proguard-rules-app.pro"
|
||||
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
}
|
||||
@@ -55,6 +56,11 @@ android {
|
||||
exclude 'META-INF/LICENSE.txt'
|
||||
exclude 'META-INF/NOTICE.txt'
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
buildscript {
|
||||
def androidGradlePluginVersion = '7.3.1'
|
||||
apply from: '../../../detox/android/rninfo.gradle'
|
||||
|
||||
ext {
|
||||
kotlinVersion = '1.8.22'
|
||||
buildToolsVersion = '33.0.0'
|
||||
compileSdkVersion = 33
|
||||
targetSdkVersion = 33
|
||||
buildToolsVersion = '34.0.0'
|
||||
compileSdkVersion = 34
|
||||
targetSdkVersion = 34
|
||||
minSdkVersion = 21
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ buildscript {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath "com.android.tools.build:gradle:$androidGradlePluginVersion"
|
||||
classpath "com.android.tools.build:gradle"
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
|
||||
classpath "com.facebook.react:react-native-gradle-plugin"
|
||||
}
|
||||
@@ -30,3 +30,19 @@ allprojects {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
subprojects {
|
||||
// Apply common configurations to all sub-projects
|
||||
afterEvaluate { project ->
|
||||
if (project.hasProperty("android")) {
|
||||
project.android {
|
||||
buildToolsVersion = rootProject.ext.buildToolsVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ext.rnInfo.isRN73OrHigher) {
|
||||
apply plugin: "com.facebook.react.rootproject"
|
||||
}
|
||||
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
|
||||
# Specifies the JVM arguments used for the daemon process.
|
||||
# The setting is particularly useful for tweaking memory settings.
|
||||
# Default value: -Xmx10248m -XX:MaxPermSize=256m
|
||||
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
||||
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
||||
|
||||
# When configured, Gradle will run in incubating parallel mode.
|
||||
# This option should only be used with decoupled projects. More details, visit
|
||||
|
||||
Binary file not shown.
+3
-3
@@ -1,7 +1,7 @@
|
||||
#Thu May 27 12:19:41 IDT 2021
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip
|
||||
|
||||
|
||||
+24
-9
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
@@ -55,7 +55,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
@@ -80,13 +80,11 @@ do
|
||||
esac
|
||||
done
|
||||
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
APP_NAME="Gradle"
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
@@ -133,22 +131,29 @@ location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
if ! command -v java >/dev/null 2>&1
|
||||
then
|
||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
@@ -193,6 +198,10 @@ if "$cygwin" || "$msys" ; then
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
@@ -205,6 +214,12 @@ set -- \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
if ! command -v xargs >/dev/null 2>&1
|
||||
then
|
||||
die "xargs is not available"
|
||||
fi
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
|
||||
+92
-90
@@ -1,90 +1,92 @@
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windowz variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
goto execute
|
||||
|
||||
:4NT_args
|
||||
@rem Get arguments from the 4NT Shell from JP Software
|
||||
set CMD_LINE_ARGS=%$
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
if !ENV["REACT_NATIVE_VERSION"] || ENV["REACT_NATIVE_VERSION"].match(/0.(70|71).*/)
|
||||
if ENV["REACT_NATIVE_VERSION"] && ENV["REACT_NATIVE_VERSION"].match(/0.(70|71).*/)
|
||||
require_relative '../node_modules/react-native/scripts/react_native_pods'
|
||||
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
|
||||
else
|
||||
@@ -10,7 +10,7 @@ else
|
||||
)', __dir__]).strip
|
||||
end
|
||||
|
||||
platform :ios, '13.0'
|
||||
platform :ios, min_ios_version_supported
|
||||
|
||||
target 'example' do
|
||||
config = use_native_modules!
|
||||
@@ -35,7 +35,7 @@ target 'example' do
|
||||
)
|
||||
|
||||
# See https://github.com/wix/Detox/pull/3035#discussion_r774747705
|
||||
if !ENV["REACT_NATIVE_VERSION"] || ENV["REACT_NATIVE_VERSION"].match(/0.(70|72).*/)
|
||||
if ENV["REACT_NATIVE_VERSION"] && ENV["REACT_NATIVE_VERSION"].match(/0.(70|72).*/)
|
||||
__apply_Xcode_12_5_M1_post_install_workaround(installer)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -223,11 +223,11 @@
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-example/Pods-example-resources.sh",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
|
||||
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle",
|
||||
);
|
||||
name = "[CP] Copy Pods Resources";
|
||||
outputPaths = (
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle",
|
||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
@@ -330,7 +330,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
@@ -358,6 +358,7 @@
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION,
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
@@ -369,8 +370,16 @@
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
OTHER_CFLAGS = "$(inherited)";
|
||||
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
|
||||
OTHER_LDFLAGS = (
|
||||
"$(inherited)",
|
||||
"-Wl",
|
||||
"-ld_classic",
|
||||
);
|
||||
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
|
||||
SDKROOT = iphoneos;
|
||||
USE_HERMES = false;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
@@ -378,7 +387,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
@@ -401,6 +410,10 @@
|
||||
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"$(inherited)",
|
||||
_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION,
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
@@ -409,8 +422,16 @@
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
OTHER_CFLAGS = "$(inherited)";
|
||||
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
|
||||
OTHER_LDFLAGS = (
|
||||
"$(inherited)",
|
||||
"-Wl",
|
||||
"-ld_classic",
|
||||
);
|
||||
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
|
||||
SDKROOT = iphoneos;
|
||||
USE_HERMES = false;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<false/>
|
||||
<key>NSAllowsLocalNetworking</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>NSLocationWhenInUseUsageDescription</key>
|
||||
|
||||
@@ -5,13 +5,27 @@ try {
|
||||
} catch (ex) {
|
||||
try {
|
||||
createBlacklist = require('metro-config/src/defaults/blacklist');
|
||||
} catch (ex) {
|
||||
} catch (e) {
|
||||
createBlacklist = require('metro-bundler').createBlacklist;
|
||||
}
|
||||
}
|
||||
|
||||
const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
|
||||
|
||||
/**
|
||||
* Metro configuration
|
||||
* https://facebook.github.io/metro/docs/configuration
|
||||
*
|
||||
* @type {import('metro-config').MetroConfig}
|
||||
*/
|
||||
const config = {};
|
||||
const baseConfig = mergeConfig(getDefaultConfig(__dirname), config);
|
||||
|
||||
|
||||
|
||||
module.exports = {
|
||||
...baseConfig,
|
||||
resolver: {
|
||||
blacklistRE: createBlacklist([/test\/.*/, /detox\/node_modules\/.*/]),
|
||||
blacklistRE: createBlacklist([/detox\/node_modules\/react-native\/.*/]),
|
||||
},
|
||||
};
|
||||
|
||||
@@ -22,20 +22,23 @@
|
||||
"clean:android": "pushd android && ./gradlew clean && popd"
|
||||
},
|
||||
"dependencies": {
|
||||
"@react-native-async-storage/async-storage": "^1.17.11",
|
||||
"@react-native-async-storage/async-storage": "^1.21.0",
|
||||
"react": "18.2.0",
|
||||
"react-native": "0.72.8",
|
||||
"react-native": "0.73.2",
|
||||
"tslib": "^2.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/preset-react": "^7.23.3",
|
||||
"@react-native/babel-preset": "0.73.19",
|
||||
"@react-native/metro-config": "^0.73.2",
|
||||
"@tsconfig/react-native": "^2.0.2",
|
||||
"@types/fs-extra": "^9.0.13",
|
||||
"@types/jest": "^29.2.1",
|
||||
"@types/react": "^18.0.24",
|
||||
"detox": "^20.18.4",
|
||||
"fs-extra": "^9.1.0",
|
||||
"jest": "^29.2.1",
|
||||
"jest": "^29.6.3",
|
||||
"ts-jest": "^29.0.3",
|
||||
"typescript": "^4.8.4"
|
||||
"typescript": "^5.0.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
const fs = require('fs-extra');
|
||||
const cp = require('child_process');
|
||||
const { setGradleVersionByRNVersion } = require('detox/scripts/updateGradle');
|
||||
|
||||
const patchBoostPodspec = () => {
|
||||
const log = message => console.log(`[POST-INSTALL] ${message}`);
|
||||
@@ -38,4 +39,5 @@ function podInstallIfRequired() {
|
||||
|
||||
console.log('[POST-INSTALL] Running Detox\'s example-app post-install script...');
|
||||
podInstallIfRequired();
|
||||
setGradleVersionByRNVersion();
|
||||
console.log('[POST-INSTALL] Completed!');
|
||||
|
||||
@@ -67,6 +67,8 @@ module.exports = generator({
|
||||
'boolean',
|
||||
'double',
|
||||
'Double',
|
||||
'float',
|
||||
'Float',
|
||||
'int',
|
||||
'Integer',
|
||||
'Matcher<View>',
|
||||
|
||||
@@ -38,8 +38,3 @@ popd
|
||||
pushd detox
|
||||
run_f "npm run build:android-native"
|
||||
popd
|
||||
|
||||
pushd examples/demo-pure-native-android
|
||||
export ANDROID_SERIAL=`adb devices | grep emulator | head -1 | awk '{print $1}'`
|
||||
run_f "./gradlew connectAndroidTest"
|
||||
popd
|
||||
|
||||
@@ -12,6 +12,8 @@ if [ "$REACT_NATIVE_COMPAT_TEST" != "true" ]; then
|
||||
node scripts/change_react_native_version.js "detox" ${REACT_NATIVE_VERSION} "devDependencies"
|
||||
fi
|
||||
|
||||
# Update the dependencies of the test project because bootstrap will run and fail
|
||||
node scripts/change_react_native_version.js "detox/test" ${REACT_NATIVE_VERSION} "dependencies"
|
||||
# Only update the demo-react-native project; others will use this binary
|
||||
node scripts/change_react_native_version.js "examples/demo-react-native" ${REACT_NATIVE_VERSION} "dependencies"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user