diff --git a/.github/renovate.json b/.github/renovate.json
index bca7623d4..c73b2352c 100644
--- a/.github/renovate.json
+++ b/.github/renovate.json
@@ -22,10 +22,6 @@
"matchDatasources": ["maven"],
"matchPackagePrefixes": ["com.squareup.moshi:"]
},
- {
- "matchPackageNames": ["org.jetbrains.intellij.deps:trove4j"],
- "enabled": false
- },
{
"matchPackageNames": ["react"],
"enabled": false
diff --git a/ReactTestApp-DevSupport.podspec b/ReactTestApp-DevSupport.podspec
index d900f488f..2da514c50 100644
--- a/ReactTestApp-DevSupport.podspec
+++ b/ReactTestApp-DevSupport.podspec
@@ -33,7 +33,10 @@ Pod::Spec.new do |s|
s.dependency 'React-Core'
s.dependency 'React-jsi'
- s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
+ s.pod_target_xcconfig = {
+ 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17',
+ 'DEFINES_MODULE' => 'YES',
+ }
s.source_files = 'common/AppRegistry.{cpp,h}',
'ios/ReactTestApp/AppRegistryModule.{h,mm}',
diff --git a/android/app/build.gradle b/android/app/build.gradle
index 3ab84b435..ccd43acbd 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -83,7 +83,6 @@ android {
}
compileSdkVersion project.ext.compileSdkVersion
- buildToolsVersion project.ext.buildToolsVersion
// We need only set `ndkVersion` when building react-native from source.
if (hasProperty("ANDROID_NDK_VERSION")) {
@@ -119,6 +118,10 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
+ lintOptions {
+ lintConfig file("lint.xml")
+ }
+
packagingOptions {
pickFirst "lib/armeabi-v7a/libc++_shared.so"
pickFirst "lib/arm64-v8a/libc++_shared.so"
diff --git a/android/app/lint.xml b/android/app/lint.xml
new file mode 100644
index 000000000..009a79c14
--- /dev/null
+++ b/android/app/lint.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index c867ec01a..4fb80ab75 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -19,7 +19,9 @@
-
+
diff --git a/android/app/src/main/java/com/microsoft/reacttestapp/react/ReadableMapExt.kt b/android/app/src/main/java/com/microsoft/reacttestapp/react/ReadableMapExt.kt
index d2e74bae1..baefebd6a 100644
--- a/android/app/src/main/java/com/microsoft/reacttestapp/react/ReadableMapExt.kt
+++ b/android/app/src/main/java/com/microsoft/reacttestapp/react/ReadableMapExt.kt
@@ -1,11 +1,12 @@
package com.microsoft.reacttestapp.react
import com.facebook.react.bridge.Arguments
+import com.facebook.react.bridge.ReadableArray
+import com.facebook.react.bridge.ReadableMap
import com.facebook.react.bridge.WritableArray
import com.facebook.react.bridge.WritableMap
-// TODO: Change the return type to `ReadableMap` when RN 0.60 is deprecated
-fun Map<*, *>.toReadableMap(): WritableMap {
+fun Map<*, *>.toReadableMap(): ReadableMap {
return Arguments.createMap().also { map ->
for ((k, v) in this) {
map.putValue(k as String, v)
@@ -39,15 +40,13 @@ private fun WritableMap.putValue(key: String, value: Any?) {
}
}
-// TODO: Change the return type to `ReadableArray` when RN 0.60 is deprecated
-private fun toReadableArray(list: ArrayList<*>): WritableArray {
+private fun toReadableArray(list: ArrayList<*>): ReadableArray {
return Arguments.createArray().also { array ->
list.forEach { array.pushValue(it) }
}
}
-// TODO: Change the return type to `ReadableMap` when RN 0.60 is deprecated
-private fun toReadableMap(obj: Any): WritableMap {
+private fun toReadableMap(obj: Any): ReadableMap {
val map = obj as? Map<*, *> ?: throw NotImplementedError(
"Encountered unknown type while parsing manifest: ${obj::class.qualifiedName}"
)
diff --git a/android/dependencies.gradle b/android/dependencies.gradle
index b230beac9..fb5ca27b2 100644
--- a/android/dependencies.gradle
+++ b/android/dependencies.gradle
@@ -9,8 +9,7 @@ ext {
]
compileSdkVersion = 31
- buildToolsVersion = "30.0.3"
- minSdkVersion = 21
+ minSdkVersion = 23
targetSdkVersion = 29
/**
@@ -42,6 +41,6 @@ ext {
moshiKotlinCodegen : "com.squareup.moshi:moshi-kotlin-codegen:1.12.0",
]
- androidPluginVersion = "4.2.2"
+ androidPluginVersion = "7.0.4"
kotlinVersion = versionOf(libraries.kotlinStdlibJdk7)
}
diff --git a/android/force-resolve-trove4j.gradle b/android/force-resolve-trove4j.gradle
deleted file mode 100644
index b7b38f12a..000000000
--- a/android/force-resolve-trove4j.gradle
+++ /dev/null
@@ -1,13 +0,0 @@
-configurations.all {
- resolutionStrategy {
- eachDependency {
- // https://issuetracker.google.com/issues/109894262#comment9
- if (requested.group == "org.jetbrains.trove4j" &&
- requested.name == "trove4j" &&
- requested.version == "20160824")
- {
- useTarget("org.jetbrains.intellij.deps:trove4j:1.0.20181211")
- }
- }
- }
-}
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
index ec991f9aa..2e6e5897b 100644
--- a/android/gradle/wrapper/gradle-wrapper.properties
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.2-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/android/gradlew b/android/gradlew
index 4f906e0c8..1b6c78733 100755
--- a/android/gradlew
+++ b/android/gradlew
@@ -1,7 +1,7 @@
-#!/usr/bin/env sh
+#!/bin/sh
#
-# Copyright 2015 the original author or authors.
+# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -17,67 +17,101 @@
#
##############################################################################
-##
-## Gradle start up script for UN*X
-##
+#
+# Gradle start up script for POSIX generated by Gradle.
+#
+# Important for running:
+#
+# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
+# noncompliant, but you have some other compliant shell such as ksh or
+# bash, then to run this script, type that shell name before the whole
+# command line, like:
+#
+# ksh Gradle
+#
+# Busybox and similar reduced shells will NOT work, because this script
+# requires all of these POSIX shell features:
+# * functions;
+# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
+# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
+# * compound commands having a testable exit status, especially «case»;
+# * various built-in commands including «command», «set», and «ulimit».
+#
+# Important for patching:
+#
+# (2) This script targets any POSIX shell, so it avoids extensions provided
+# by Bash, Ksh, etc; in particular arrays are avoided.
+#
+# The "traditional" practice of packing multiple parameters into a
+# space-separated string is a well documented source of bugs and security
+# problems, so this is (mostly) avoided, by progressively accumulating
+# options in "$@", and eventually passing that to Java.
+#
+# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
+# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
+# see the in-line comments for details.
+#
+# There are tweaks for specific operating systems such as AIX, CygWin,
+# 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
+# within the Gradle project.
+#
+# You can find Gradle at https://github.com/gradle/gradle/.
+#
##############################################################################
# Attempt to set APP_HOME
+
# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
+app_path=$0
+
+# Need this for daisy-chained symlinks.
+while
+ APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
+ [ -h "$app_path" ]
+do
+ ls=$( ls -ld "$app_path" )
+ link=${ls#*' -> '}
+ case $link in #(
+ /*) app_path=$link ;; #(
+ *) app_path=$APP_HOME$link ;;
+ esac
done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
+
+APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
+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"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
+MAX_FD=maximum
warn () {
echo "$*"
-}
+} >&2
die () {
echo
echo "$*"
echo
exit 1
-}
+} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
+case "$( uname )" in #(
+ CYGWIN* ) cygwin=true ;; #(
+ Darwin* ) darwin=true ;; #(
+ MSYS* | MINGW* ) msys=true ;; #(
+ NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
@@ -87,9 +121,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
+ JAVACMD=$JAVA_HOME/jre/sh/java
else
- JAVACMD="$JAVA_HOME/bin/java"
+ JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
@@ -98,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
- JAVACMD="java"
+ 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.
Please set the JAVA_HOME variable in your environment to match the
@@ -106,80 +140,95 @@ location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
+if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
+ case $MAX_FD in #(
+ max*)
+ MAX_FD=$( ulimit -H -n ) ||
+ warn "Could not query maximum file descriptor limit"
+ esac
+ case $MAX_FD in #(
+ '' | soft) :;; #(
+ *)
+ ulimit -n "$MAX_FD" ||
+ warn "Could not set maximum file descriptor limit to $MAX_FD"
+ esac
fi
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
+# Collect all arguments for the java command, stacking in reverse order:
+# * args from the command line
+# * the main class name
+# * -classpath
+# * -D...appname settings
+# * --module-path (only if needed)
+# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# For Cygwin or MSYS, switch paths to Windows format before running java
-if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
+if "$cygwin" || "$msys" ; then
+ APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
+ CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
+
+ JAVACMD=$( cygpath --unix "$JAVACMD" )
+
# Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
+ for arg do
+ if
+ case $arg in #(
+ -*) false ;; # don't mess with options #(
+ /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
+ [ -e "$t" ] ;; #(
+ *) false ;;
+ esac
+ then
+ arg=$( cygpath --path --ignore --mixed "$arg" )
fi
- i=`expr $i + 1`
+ # Roll the args list around exactly as many times as the number of
+ # args, so each arg winds up back in the position where it started, but
+ # possibly modified.
+ #
+ # NB: a `for` loop captures its iteration list before it begins, so
+ # changing the positional parameters here affects neither the number of
+ # iterations, nor the values presented in `arg`.
+ shift # remove old arg
+ set -- "$@" "$arg" # push replacement arg
done
- case $i in
- 0) set -- ;;
- 1) set -- "$args0" ;;
- 2) set -- "$args0" "$args1" ;;
- 3) set -- "$args0" "$args1" "$args2" ;;
- 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
fi
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=`save "$@"`
+# 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
+# double quotes to make sure that they get re-expanded; and
+# * put everything else in single quotes, so that it's not re-expanded.
+
+set -- \
+ "-Dorg.gradle.appname=$APP_BASE_NAME" \
+ -classpath "$CLASSPATH" \
+ org.gradle.wrapper.GradleWrapperMain \
+ "$@"
+
+# Use "xargs" to parse quoted args.
+#
+# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
+#
+# In Bash we could simply go:
+#
+# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
+# set -- "${ARGS[@]}" "$@"
+#
+# but POSIX shell has neither arrays nor command substitution, so instead we
+# post-process each arg (as a line of input to sed) to backslash-escape any
+# character that might be a shell metacharacter, then use eval to reverse
+# that process (while maintaining the separation between arguments), and wrap
+# the whole thing up as a single "set" statement.
+#
+# This will of course break if any of these variables contains a newline or
+# an unmatched quote.
+#
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+eval "set -- $(
+ printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
+ xargs -n1 |
+ sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
+ tr '\n' ' '
+ )" '"$@"'
exec "$JAVACMD" "$@"
diff --git a/android/support/build.gradle b/android/support/build.gradle
index 98a378348..dee3ba4e8 100644
--- a/android/support/build.gradle
+++ b/android/support/build.gradle
@@ -12,7 +12,6 @@ android {
apply(from: "$androidDir/dependencies.gradle")
compileSdkVersion project.ext.compileSdkVersion
- buildToolsVersion project.ext.buildToolsVersion
defaultConfig {
minSdkVersion project.ext.minSdkVersion
diff --git a/android/test-app-util.gradle b/android/test-app-util.gradle
index 307d6a251..c4050fa4a 100644
--- a/android/test-app-util.gradle
+++ b/android/test-app-util.gradle
@@ -91,23 +91,6 @@ ext.getApplicationId = { baseDir ->
}
}
- if (project.hasProperty('TEST_APP_IDENTIFIER')) {
- def applicationId = project.getProperty('TEST_APP_IDENTIFIER')
- logger.warn('WARNING: Setting TEST_APP_IDENTIFIER in `gradle.properties` is deprecated')
- logger.warn('WARNING: Please set the application identifier in `app.json`, e.g.')
- logger.warn('WARNING:')
- logger.warn('WARNING: {')
- logger.warn('WARNING: "name": "Example",')
- logger.warn('WARNING: "displayName": "Example",')
- logger.warn('WARNING: "components": [],')
- logger.warn('WARNING: "resources": {},')
- logger.warn('WARNING: "android": {')
- logger.warn("WARNING: \"package\": \"${applicationId}\"")
- logger.warn('WARNING: }')
- logger.warn('WARNING: }')
- return applicationId
- }
-
return 'com.microsoft.reacttestapp'
}
diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties
index ec991f9aa..2e6e5897b 100644
--- a/example/android/gradle/wrapper/gradle-wrapper.properties
+++ b/example/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.2-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/example/android/gradlew b/example/android/gradlew
index 4f906e0c8..1b6c78733 100755
--- a/example/android/gradlew
+++ b/example/android/gradlew
@@ -1,7 +1,7 @@
-#!/usr/bin/env sh
+#!/bin/sh
#
-# Copyright 2015 the original author or authors.
+# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -17,67 +17,101 @@
#
##############################################################################
-##
-## Gradle start up script for UN*X
-##
+#
+# Gradle start up script for POSIX generated by Gradle.
+#
+# Important for running:
+#
+# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
+# noncompliant, but you have some other compliant shell such as ksh or
+# bash, then to run this script, type that shell name before the whole
+# command line, like:
+#
+# ksh Gradle
+#
+# Busybox and similar reduced shells will NOT work, because this script
+# requires all of these POSIX shell features:
+# * functions;
+# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
+# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
+# * compound commands having a testable exit status, especially «case»;
+# * various built-in commands including «command», «set», and «ulimit».
+#
+# Important for patching:
+#
+# (2) This script targets any POSIX shell, so it avoids extensions provided
+# by Bash, Ksh, etc; in particular arrays are avoided.
+#
+# The "traditional" practice of packing multiple parameters into a
+# space-separated string is a well documented source of bugs and security
+# problems, so this is (mostly) avoided, by progressively accumulating
+# options in "$@", and eventually passing that to Java.
+#
+# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
+# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
+# see the in-line comments for details.
+#
+# There are tweaks for specific operating systems such as AIX, CygWin,
+# 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
+# within the Gradle project.
+#
+# You can find Gradle at https://github.com/gradle/gradle/.
+#
##############################################################################
# Attempt to set APP_HOME
+
# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
+app_path=$0
+
+# Need this for daisy-chained symlinks.
+while
+ APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
+ [ -h "$app_path" ]
+do
+ ls=$( ls -ld "$app_path" )
+ link=${ls#*' -> '}
+ case $link in #(
+ /*) app_path=$link ;; #(
+ *) app_path=$APP_HOME$link ;;
+ esac
done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
+
+APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
+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"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
+MAX_FD=maximum
warn () {
echo "$*"
-}
+} >&2
die () {
echo
echo "$*"
echo
exit 1
-}
+} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
+case "$( uname )" in #(
+ CYGWIN* ) cygwin=true ;; #(
+ Darwin* ) darwin=true ;; #(
+ MSYS* | MINGW* ) msys=true ;; #(
+ NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
@@ -87,9 +121,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
+ JAVACMD=$JAVA_HOME/jre/sh/java
else
- JAVACMD="$JAVA_HOME/bin/java"
+ JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
@@ -98,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
- JAVACMD="java"
+ 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.
Please set the JAVA_HOME variable in your environment to match the
@@ -106,80 +140,95 @@ location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
+if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
+ case $MAX_FD in #(
+ max*)
+ MAX_FD=$( ulimit -H -n ) ||
+ warn "Could not query maximum file descriptor limit"
+ esac
+ case $MAX_FD in #(
+ '' | soft) :;; #(
+ *)
+ ulimit -n "$MAX_FD" ||
+ warn "Could not set maximum file descriptor limit to $MAX_FD"
+ esac
fi
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
+# Collect all arguments for the java command, stacking in reverse order:
+# * args from the command line
+# * the main class name
+# * -classpath
+# * -D...appname settings
+# * --module-path (only if needed)
+# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# For Cygwin or MSYS, switch paths to Windows format before running java
-if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
+if "$cygwin" || "$msys" ; then
+ APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
+ CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
+
+ JAVACMD=$( cygpath --unix "$JAVACMD" )
+
# Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
+ for arg do
+ if
+ case $arg in #(
+ -*) false ;; # don't mess with options #(
+ /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
+ [ -e "$t" ] ;; #(
+ *) false ;;
+ esac
+ then
+ arg=$( cygpath --path --ignore --mixed "$arg" )
fi
- i=`expr $i + 1`
+ # Roll the args list around exactly as many times as the number of
+ # args, so each arg winds up back in the position where it started, but
+ # possibly modified.
+ #
+ # NB: a `for` loop captures its iteration list before it begins, so
+ # changing the positional parameters here affects neither the number of
+ # iterations, nor the values presented in `arg`.
+ shift # remove old arg
+ set -- "$@" "$arg" # push replacement arg
done
- case $i in
- 0) set -- ;;
- 1) set -- "$args0" ;;
- 2) set -- "$args0" "$args1" ;;
- 3) set -- "$args0" "$args1" "$args2" ;;
- 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
fi
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=`save "$@"`
+# 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
+# double quotes to make sure that they get re-expanded; and
+# * put everything else in single quotes, so that it's not re-expanded.
+
+set -- \
+ "-Dorg.gradle.appname=$APP_BASE_NAME" \
+ -classpath "$CLASSPATH" \
+ org.gradle.wrapper.GradleWrapperMain \
+ "$@"
+
+# Use "xargs" to parse quoted args.
+#
+# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
+#
+# In Bash we could simply go:
+#
+# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
+# set -- "${ARGS[@]}" "$@"
+#
+# but POSIX shell has neither arrays nor command substitution, so instead we
+# post-process each arg (as a line of input to sed) to backslash-escape any
+# character that might be a shell metacharacter, then use eval to reverse
+# that process (while maintaining the separation between arguments), and wrap
+# the whole thing up as a single "set" statement.
+#
+# This will of course break if any of these variables contains a newline or
+# an unmatched quote.
+#
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+eval "set -- $(
+ printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
+ xargs -n1 |
+ sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
+ tr '\n' ' '
+ )" '"$@"'
exec "$JAVACMD" "$@"
diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock
index 41664845a..a4686891c 100644
--- a/example/ios/Podfile.lock
+++ b/example/ios/Podfile.lock
@@ -323,7 +323,7 @@ PODS:
- React-Core
- React-jsi
- ReactTestApp-Resources (1.0.0-dev)
- - SwiftLint (0.45.1)
+ - SwiftLint (0.46.1)
- Yoga (1.14.0)
- YogaKit (1.18.1):
- Yoga (~> 1.14)
@@ -503,9 +503,9 @@ SPEC CHECKSUMS:
React-RCTVibration: c7f845861e79eae13dc1e8217a3cf47a3945b504
React-runtimeexecutor: 493d9abb8b23c3f84e19ae221eeba92cadcb70dc
ReactCommon: 8fea6422328e2fc093e25c9fac67adbcf0f04fb4
- ReactTestApp-DevSupport: 84b7cc35cf707c9ceb3aae756f098354f5641cd8
+ ReactTestApp-DevSupport: 19f2e33511690a213253175a9ca541d10456cb95
ReactTestApp-Resources: 74a1cf509f4e7962b16361ea4e73cba3648fff5d
- SwiftLint: 06ac37e4d38c7068e0935bb30cda95f093bec761
+ SwiftLint: aaa29a9f649316095a9079595cb60906bd899353
Yoga: e6ecf3fa25af9d4c87e94ad7d5d292eedef49749
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
diff --git a/example/macos/Podfile.lock b/example/macos/Podfile.lock
index 2f5be5de3..323ff1fcd 100644
--- a/example/macos/Podfile.lock
+++ b/example/macos/Podfile.lock
@@ -274,7 +274,7 @@ PODS:
- React-Core
- React-jsi
- ReactTestApp-Resources (1.0.0-dev)
- - SwiftLint (0.45.1)
+ - SwiftLint (0.46.1)
- Yoga (1.14.0)
DEPENDENCIES:
@@ -414,9 +414,9 @@ SPEC CHECKSUMS:
React-RCTVibration: 76c394da8cd4bd86cd6cffdfdfc047752fdd6906
React-runtimeexecutor: 0917ad3b47bc9561749f18ca866a6c4b55f63f31
ReactCommon: c710dabcfbc8f09c20e98aa03e8a98965b88f6dd
- ReactTestApp-DevSupport: 84b7cc35cf707c9ceb3aae756f098354f5641cd8
+ ReactTestApp-DevSupport: 19f2e33511690a213253175a9ca541d10456cb95
ReactTestApp-Resources: bb546b3a5dca4b7931bee423d4ef28cd94b346cf
- SwiftLint: 06ac37e4d38c7068e0935bb30cda95f093bec761
+ SwiftLint: aaa29a9f649316095a9079595cb60906bd899353
Yoga: 3b0ecc1a0ddf03b4363ea73cc42e10d76b052007
PODFILE CHECKSUM: 39314e677d5ddf7e1e4c81e5e81f66cddabd661a
diff --git a/ios/ReactTestApp/ReactTestApp.common.xcconfig b/ios/ReactTestApp/ReactTestApp.common.xcconfig
index 89a5e7620..3bca3930f 100644
--- a/ios/ReactTestApp/ReactTestApp.common.xcconfig
+++ b/ios/ReactTestApp/ReactTestApp.common.xcconfig
@@ -1,7 +1,7 @@
ALWAYS_SEARCH_USER_PATHS = NO
CLANG_ANALYZER_NONNULL = YES
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE
-CLANG_CXX_LANGUAGE_STANDARD = gnu++14
+CLANG_CXX_LANGUAGE_STANDARD = c++17
CLANG_CXX_LIBRARY = libc++
CLANG_ENABLE_MODULES = YES
CLANG_ENABLE_OBJC_ARC = YES
diff --git a/ios/test_app.rb b/ios/test_app.rb
index 8905f0d96..8b99172e7 100644
--- a/ios/test_app.rb
+++ b/ios/test_app.rb
@@ -30,10 +30,6 @@ def autolink_script_path
File.join(package_path, 'native_modules')
end
-def autolink_script_version
- package_version(resolve_module('@react-native-community/cli-platform-ios'))
-end
-
def platform_config(key, project_root, target_platform)
manifest = app_manifest(project_root)
return if manifest.nil?
@@ -42,15 +38,8 @@ def platform_config(key, project_root, target_platform)
return config[key] if !config.nil? && !config.empty?
end
-def bundle_identifier(project_root, target_platform)
- bundle_identifier = platform_config('bundleIdentifier', project_root, target_platform)
- return bundle_identifier if bundle_identifier.is_a? String
-
- @test_app_bundle_identifier
-end
-
-def flipper_enabled?(react_native_version)
- react_native_version >= 6200 && @flipper_versions != false
+def flipper_enabled?
+ @flipper_versions != false
end
def flipper_versions
@@ -93,10 +82,6 @@ def react_native_pods(version)
'use_react_native-0.63'
elsif v >= Gem::Version.new('0.62')
'use_react_native-0.62'
- elsif v >= Gem::Version.new('0.61')
- 'use_react_native-0.61'
- elsif v >= Gem::Version.new('0.60')
- 'use_react_native-0.60'
else
raise "Unsupported React Native version: #{version}"
end
@@ -150,27 +135,6 @@ def resources_pod(project_root, target_platform, platforms)
Pathname.new(app_dir).relative_path_from(project_root).to_s
end
-def test_app_bundle_identifier(identifier)
- warn <<~HEREDOC
- Warning: test_app_bundle_identifier() is deprecated
- Please set the bundle identifier in `app.json`, e.g.
-
- {
- "name": "Example",
- "displayName": "Example",
- "components": [],
- "resources": {},
- "ios": {
- "bundleIdentifier": "#{identifier}"
- },
- "macos": {
- "bundleIdentifier": "#{identifier}"
- }
- }
- HEREDOC
- @test_app_bundle_identifier = identifier
-end
-
def use_flipper!(versions = {})
@flipper_versions = versions
end
@@ -235,7 +199,7 @@ def make_project!(xcodeproj, project_root, target_platform)
development_team = platform_config('developmentTeam', project_root, target_platform)
build_settings['DEVELOPMENT_TEAM'] = development_team if development_team.is_a? String
- product_bundle_identifier = bundle_identifier(project_root, target_platform)
+ product_bundle_identifier = platform_config('bundleIdentifier', project_root, target_platform)
if product_bundle_identifier.is_a? String
build_settings['PRODUCT_BUNDLE_IDENTIFIER'] = product_bundle_identifier
end
@@ -247,7 +211,7 @@ def make_project!(xcodeproj, project_root, target_platform)
target.name
end
- supports_flipper = target_platform == :ios && flipper_enabled?(version)
+ supports_flipper = target_platform == :ios && flipper_enabled?
app_project = Xcodeproj::Project.open(dst_xcodeproj)
app_project.native_targets.each do |target|
@@ -321,11 +285,7 @@ def use_test_app_internal!(target_platform, options)
yield ReactTestAppTargets.new(self) if block_given?
- if autolink_script_version < Gem::Version.new('3.0')
- use_native_modules! '.'
- else
- use_native_modules!
- end
+ use_native_modules!
end
post_install do |installer|
diff --git a/ios/use_react_native-0.60.rb b/ios/use_react_native-0.60.rb
deleted file mode 100644
index 83bbd6e98..000000000
--- a/ios/use_react_native-0.60.rb
+++ /dev/null
@@ -1,43 +0,0 @@
-# rubocop:disable Layout/LineLength
-
-require_relative('pod_helpers')
-
-def include_react_native!(options)
- react_native, project_root = options.values_at(:path, :rta_project_root)
-
- pod 'React', :path => react_native
- pod 'React-Core', :path => "#{react_native}/React", :inhibit_warnings => true
- pod 'React-DevSupport', :path => "#{react_native}/React"
-
- # fishhook was removed in 0.60.5
- fishhook = "#{react_native}/Libraries/fishhook"
- pod 'React-fishhook', :path => fishhook if File.exist?(File.join(project_root, fishhook))
-
- pod 'React-RCTActionSheet', :path => "#{react_native}/Libraries/ActionSheetIOS"
- pod 'React-RCTAnimation', :path => "#{react_native}/Libraries/NativeAnimation"
- pod 'React-RCTBlob', :path => "#{react_native}/Libraries/Blob"
- pod 'React-RCTImage', :path => "#{react_native}/Libraries/Image"
- pod 'React-RCTLinking', :path => "#{react_native}/Libraries/LinkingIOS"
- pod 'React-RCTNetwork', :path => "#{react_native}/Libraries/Network"
- pod 'React-RCTSettings', :path => "#{react_native}/Libraries/Settings"
- pod 'React-RCTText', :path => "#{react_native}/Libraries/Text", :inhibit_warnings => true
- pod 'React-RCTVibration', :path => "#{react_native}/Libraries/Vibration"
- pod 'React-RCTWebSocket', :path => "#{react_native}/Libraries/WebSocket"
-
- pod 'React-cxxreact', :path => "#{react_native}/ReactCommon/cxxreact", :inhibit_warnings => true
- pod 'React-jsi', :path => "#{react_native}/ReactCommon/jsi"
- pod 'React-jsiexecutor', :path => "#{react_native}/ReactCommon/jsiexecutor"
- pod 'React-jsinspector', :path => "#{react_native}/ReactCommon/jsinspector"
- pod 'yoga', :path => "#{react_native}/ReactCommon/yoga"
-
- pod 'DoubleConversion', :podspec => "#{react_native}/third-party-podspecs/DoubleConversion.podspec"
- pod 'glog', :podspec => "#{react_native}/third-party-podspecs/glog.podspec"
- pod 'Folly', :podspec => "#{react_native}/third-party-podspecs/Folly.podspec"
-
- # Required by `react-native-macos`; otherwise it will find Boost elsewhere
- try_pod('boost-for-react-native',
- "#{react_native}/third-party-podspecs/boost-for-react-native.podspec",
- project_root)
-end
-
-# rubocop:enable Layout/LineLength
diff --git a/ios/use_react_native-0.61.rb b/ios/use_react_native-0.61.rb
deleted file mode 100644
index cf688d91f..000000000
--- a/ios/use_react_native-0.61.rb
+++ /dev/null
@@ -1,42 +0,0 @@
-# rubocop:disable Layout/LineLength
-
-def include_react_native!(options)
- react_native, project_root = options.values_at(:path, :rta_project_root)
-
- pod 'FBLazyVector', :path => "#{react_native}/Libraries/FBLazyVector"
- pod 'FBReactNativeSpec', :path => "#{react_native}/Libraries/FBReactNativeSpec"
- pod 'RCTRequired', :path => "#{react_native}/Libraries/RCTRequired"
- pod 'RCTTypeSafety', :path => "#{react_native}/Libraries/TypeSafety"
- pod 'React', :path => "#{react_native}/"
- pod 'React-Core', :path => "#{react_native}/", :inhibit_warnings => true
- pod 'React-CoreModules', :path => "#{react_native}/React/CoreModules"
- pod 'React-Core/DevSupport', :path => "#{react_native}/"
- pod 'React-RCTActionSheet', :path => "#{react_native}/Libraries/ActionSheetIOS"
- pod 'React-RCTAnimation', :path => "#{react_native}/Libraries/NativeAnimation"
- pod 'React-RCTBlob', :path => "#{react_native}/Libraries/Blob"
- pod 'React-RCTImage', :path => "#{react_native}/Libraries/Image"
- pod 'React-RCTLinking', :path => "#{react_native}/Libraries/LinkingIOS"
- pod 'React-RCTNetwork', :path => "#{react_native}/Libraries/Network"
- pod 'React-RCTSettings', :path => "#{react_native}/Libraries/Settings"
- pod 'React-RCTText', :path => "#{react_native}/Libraries/Text", :inhibit_warnings => true
- pod 'React-RCTVibration', :path => "#{react_native}/Libraries/Vibration"
- pod 'React-Core/RCTWebSocket', :path => "#{react_native}/"
-
- pod 'React-cxxreact', :path => "#{react_native}/ReactCommon/cxxreact", :inhibit_warnings => true
- pod 'React-jsi', :path => "#{react_native}/ReactCommon/jsi"
- pod 'React-jsiexecutor', :path => "#{react_native}/ReactCommon/jsiexecutor"
- pod 'React-jsinspector', :path => "#{react_native}/ReactCommon/jsinspector"
- pod 'ReactCommon/jscallinvoker', :path => "#{react_native}/ReactCommon"
- pod 'ReactCommon/turbomodule/core', :path => "#{react_native}/ReactCommon"
- pod 'Yoga', :path => "#{react_native}/ReactCommon/yoga"
-
- pod 'DoubleConversion', :podspec => "#{react_native}/third-party-podspecs/DoubleConversion.podspec"
- pod 'glog', :podspec => "#{react_native}/third-party-podspecs/glog.podspec"
- pod 'Folly', :podspec => "#{react_native}/third-party-podspecs/Folly.podspec"
-
- # Required by `react-native-macos` otherwise it will find Boost elsewhere
- boost = "#{react_native}/third-party-podspecs/boost-for-react-native.podspec"
- pod 'boost-for-react-native', :podspec => boost if File.exist?(File.join(project_root, boost))
-end
-
-# rubocop:enable Layout/LineLength
diff --git a/macos/ReactTestApp/ReactTestApp.common.xcconfig b/macos/ReactTestApp/ReactTestApp.common.xcconfig
index ec27abc95..24f90bd52 100644
--- a/macos/ReactTestApp/ReactTestApp.common.xcconfig
+++ b/macos/ReactTestApp/ReactTestApp.common.xcconfig
@@ -1,7 +1,7 @@
ALWAYS_SEARCH_USER_PATHS = NO
CLANG_ANALYZER_NONNULL = YES
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE
-CLANG_CXX_LANGUAGE_STANDARD = gnu++14
+CLANG_CXX_LANGUAGE_STANDARD = c++17
CLANG_CXX_LIBRARY = libc++
CLANG_ENABLE_MODULES = YES
CLANG_ENABLE_OBJC_ARC = YES
diff --git a/package.json b/package.json
index 88bee585d..1c51c41de 100644
--- a/package.json
+++ b/package.json
@@ -76,9 +76,9 @@
"@react-native-community/cli-platform-android": ">=4.10.0",
"@react-native-community/cli-platform-ios": ">=4.10.0",
"mustache": "^4.0.0",
- "react": "~16.8.6 || ~16.9.0 || ~16.11.0 || ~16.13.1 || ~17.0.1 || ~17.0.2",
- "react-native": "^0.0.0-0 || 0.60 - 0.67 || 1000.0.0",
- "react-native-macos": "^0.0.0-0 || 0.60 - 0.66",
+ "react": "~16.11.0 || ~16.13.1 || ~17.0.1 || ~17.0.2",
+ "react-native": "^0.0.0-0 || 0.62 - 0.67 || 1000.0.0",
+ "react-native-macos": "^0.0.0-0 || 0.62 - 0.66",
"react-native-windows": "^0.0.0-0 || 0.62 - 0.67"
},
"peerDependenciesMeta": {
diff --git a/test/__fixtures__/with_platform_resources/app.json b/test/__fixtures__/with_platform_resources/app.json
index cca921eea..71fd0dfdb 100644
--- a/test/__fixtures__/with_platform_resources/app.json
+++ b/test/__fixtures__/with_platform_resources/app.json
@@ -12,14 +12,14 @@
"macos": ["dist-macos/assets", "dist-macos/main.jsbundle"]
},
"ios": {
- "bundleIdentifier": "com.react.ReactTestApp-ios",
+ "bundleIdentifier": "bundleIdentifier-ios",
"codeSignEntitlements": "codeSignEntitlements-ios",
"codeSignIdentity": "codeSignIdentity-ios",
"developmentTeam": "developmentTeam-ios",
"reactNativePath": "reactNativePath-ios"
},
"macos": {
- "bundleIdentifier": "com.react.ReactTestApp-macos",
+ "bundleIdentifier": "bundleIdentifier-macos",
"codeSignEntitlements": "codeSignEntitlements-macos",
"codeSignIdentity": "codeSignIdentity-macos",
"developmentTeam": "developmentTeam-macos",
diff --git a/test/test_test_app.rb b/test/test_test_app.rb
index 207e65a39..3bd3af823 100644
--- a/test/test_test_app.rb
+++ b/test/test_test_app.rb
@@ -30,26 +30,16 @@ def test_autolink_script_path
end
end
- def test_autolink_script_version
- cli = fixture_path('test_app', 'node_modules', '@react-native-community', 'cli-platform-ios')
- stub :resolve_module, cli do
- assert_equal(Gem::Version.new('4.10.1'), autolink_script_version)
- end
- end
-
def test_flipper_enabled?
- refute(flipper_enabled?(6199))
- assert(flipper_enabled?(6200))
+ assert(flipper_enabled?)
use_flipper!(false)
- refute(flipper_enabled?(6199))
- refute(flipper_enabled?(6200))
+ refute(flipper_enabled?)
use_flipper!
- refute(flipper_enabled?(6199))
- assert(flipper_enabled?(6200))
+ assert(flipper_enabled?)
ensure
use_flipper!(nil)
end
@@ -104,27 +94,20 @@ def test_react_native_pods
assert_equal('use_react_native-0.62', react_native_pods(Gem::Version.new('0.62.2')))
assert_equal('use_react_native-0.62', react_native_pods(Gem::Version.new('0.62.0')))
- assert_equal('use_react_native-0.61', react_native_pods(Gem::Version.new('0.61.5')))
- assert_equal('use_react_native-0.61', react_native_pods(Gem::Version.new('0.61.0')))
-
- assert_equal('use_react_native-0.60', react_native_pods(Gem::Version.new('0.60.6')))
- assert_equal('use_react_native-0.60', react_native_pods(Gem::Version.new('0.60.0')))
-
assert_raises(RuntimeError) do
- react_native_pods(Gem::Version.new('0.59.10'))
+ react_native_pods(Gem::Version.new('0.61.5'))
end
end
%i[ios macos].each do |target|
- define_method("test_#{target}_bundle_identifier") do
- assert_equal("com.react.ReactTestApp-#{target}",
- bundle_identifier(fixture_path('with_platform_resources'), target))
- assert_nil(bundle_identifier(fixture_path('without_platform_resources'), target))
- assert_nil(bundle_identifier(fixture_path('without_resources'), target))
- end
-
define_method("test_#{target}_project_settings") do
- %w[codeSignEntitlements codeSignIdentity developmentTeam reactNativePath].each do |setting|
+ %w[
+ bundleIdentifier
+ codeSignEntitlements
+ codeSignIdentity
+ developmentTeam
+ reactNativePath
+ ].each do |setting|
assert_equal("#{setting}-#{target}",
platform_config(setting, fixture_path('with_platform_resources'), target))
assert_nil(platform_config(setting, fixture_path('without_platform_resources'), target))
diff --git a/yarn.lock b/yarn.lock
index 0e235f135..9872496cd 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -10482,9 +10482,9 @@ __metadata:
"@react-native-community/cli-platform-android": ">=4.10.0"
"@react-native-community/cli-platform-ios": ">=4.10.0"
mustache: ^4.0.0
- react: ~16.8.6 || ~16.9.0 || ~16.11.0 || ~16.13.1 || ~17.0.1 || ~17.0.2
- react-native: ^0.0.0-0 || 0.60 - 0.67 || 1000.0.0
- react-native-macos: ^0.0.0-0 || 0.60 - 0.66
+ react: ~16.11.0 || ~16.13.1 || ~17.0.1 || ~17.0.2
+ react-native: ^0.0.0-0 || 0.62 - 0.67 || 1000.0.0
+ react-native-macos: ^0.0.0-0 || 0.62 - 0.66
react-native-windows: ^0.0.0-0 || 0.62 - 0.67
peerDependenciesMeta:
"@react-native-community/cli":