Merge commit 'ed20a851522ba88d0f7108bb8516f62cad383839' into 0.67-merge-latest
This commit is contained in:
Коммит
61ccd9d333
|
@ -4,7 +4,9 @@
|
|||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
require "json"
|
||||
require_relative "../../scripts/react_native_pods.rb"
|
||||
|
||||
react_native_path = "../.."
|
||||
require_relative "#{react_native_path}/scripts/react_native_pods.rb"
|
||||
|
||||
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json")))
|
||||
version = package['version']
|
||||
|
@ -47,5 +49,13 @@ Pod::Spec.new do |s|
|
|||
s.dependency "React-jsi", version
|
||||
s.dependency "ReactCommon/turbomodule/core", version
|
||||
|
||||
use_react_native_codegen! (s)
|
||||
use_react_native_codegen!(s, {
|
||||
:react_native_path => react_native_path,
|
||||
:js_srcs_dir => "#{react_native_path}/Libraries",
|
||||
:library_name => "FBReactNativeSpec",
|
||||
:output_dir => "#{react_native_path}/React/FBReactNativeSpec",
|
||||
:component_library_name => "rncore",
|
||||
# TODO: component_output_dir should be programmatically specified, and may change with use_frameworks! support.
|
||||
:component_output_dir => "#{react_native_path}/ReactCommon/react/renderer/components/"
|
||||
})
|
||||
end
|
||||
|
|
|
@ -56,7 +56,6 @@ task downloadBoost(dependsOn: createNativeDepsDirectories, type: Download) {
|
|||
|
||||
task prepareBoost(dependsOn: boostPath ? [] : [downloadBoost], type: Copy) {
|
||||
from(boostPath ?: tarTree(resources.gzip(downloadBoost.dest)))
|
||||
from("src/main/jni/third-party/boost/Android.mk")
|
||||
from("src/main/jni/third-party/boost")
|
||||
include("Android.mk", "boost_${BOOST_VERSION}/boost/**/*.hpp", "boost/boost/**/*.hpp", "asm/**/*.S")
|
||||
includeEmptyDirs = false
|
||||
|
@ -171,6 +170,7 @@ task downloadGlog(dependsOn: createNativeDepsDirectories, type: Download) {
|
|||
// Prepare glog sources to be compiled, this task will perform steps that normally should've been
|
||||
// executed by automake. This way we can avoid dependencies on make/automake
|
||||
task prepareGlog(dependsOn: dependenciesPath ? [] : [downloadGlog], type: Copy) {
|
||||
duplicatesStrategy("warn")
|
||||
from(dependenciesPath ?: tarTree(downloadGlog.dest))
|
||||
from("src/main/jni/third-party/glog/")
|
||||
include("glog-${GLOG_VERSION}/src/**/*", "Android.mk", "config.h")
|
||||
|
@ -362,7 +362,8 @@ def buildReactNdkLib = tasks.register("buildReactNdkLib", Exec) {
|
|||
inputs.dir("src/main/java/com/facebook/react/turbomodule/core/jni")
|
||||
inputs.dir("src/main/java/com/facebook/react/modules/blob")
|
||||
outputs.dir("$buildDir/react-ndk/all")
|
||||
commandLine(getNdkBuildFullPath(),
|
||||
def commandLineArgs = [
|
||||
getNdkBuildFullPath(),
|
||||
"APP_ABI=${reactNativeArchitectures()}",
|
||||
"NDK_DEBUG=" + (nativeBuildType.equalsIgnoreCase("debug") ? "1" : "0"),
|
||||
"NDK_PROJECT_PATH=null",
|
||||
|
@ -375,7 +376,12 @@ def buildReactNdkLib = tasks.register("buildReactNdkLib", Exec) {
|
|||
"REACT_SRC_DIR=$projectDir/src/main/java/com/facebook/react",
|
||||
"-C", file("src/main/jni/react/jni").absolutePath,
|
||||
"--jobs", project.findProperty("jobs") ?: Runtime.runtime.availableProcessors()
|
||||
)
|
||||
]
|
||||
if (Os.isFamily(Os.FAMILY_MAC)) {
|
||||
// This flag will suppress "fcntl(): Bad file descriptor" warnings on local builds.
|
||||
commandLineArgs.add("--output-sync=none")
|
||||
}
|
||||
commandLine(commandLineArgs)
|
||||
}
|
||||
|
||||
def cleanReactNdkLib = tasks.register("cleanReactNdkLib", Exec) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
|
@ -1,89 +1,89 @@
|
|||
@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=.
|
||||
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 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%"=="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=.
|
||||
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 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%"=="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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@react-native-community/eslint-config",
|
||||
"version": "3.0.0",
|
||||
"version": "3.0.1",
|
||||
"description": "ESLint config for React Native",
|
||||
"main": "index.js",
|
||||
"license": "MIT",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
|
@ -1,89 +1,89 @@
|
|||
@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=.
|
||||
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 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%"=="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=.
|
||||
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 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%"=="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
|
||||
|
|
|
@ -11,13 +11,16 @@ import java.io.File
|
|||
import org.gradle.api.DefaultTask
|
||||
import org.gradle.api.file.FileTree
|
||||
import org.gradle.api.tasks.Input
|
||||
import org.gradle.api.tasks.InputFile
|
||||
import org.gradle.api.tasks.InputFiles
|
||||
import org.gradle.api.tasks.Internal
|
||||
import org.gradle.api.tasks.OutputDirectory
|
||||
import org.gradle.api.tasks.OutputFile
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
|
||||
open class BundleJsAndAssetsTask : DefaultTask() {
|
||||
internal lateinit var reactRoot: File
|
||||
|
||||
@get:Internal internal lateinit var reactRoot: File
|
||||
|
||||
@get:InputFiles
|
||||
@Suppress("UNUSED") // used to invalidate caches
|
||||
|
@ -25,7 +28,7 @@ open class BundleJsAndAssetsTask : DefaultTask() {
|
|||
@get:Input internal lateinit var execCommand: List<String>
|
||||
@get:Input internal lateinit var bundleCommand: String
|
||||
@get:Input internal var devEnabled: Boolean = true
|
||||
@get:Input internal lateinit var entryFile: File
|
||||
@get:InputFile internal lateinit var entryFile: File
|
||||
@get:Input internal var extraArgs: List<String> = emptyList()
|
||||
|
||||
@get:OutputDirectory internal lateinit var jsBundleDir: File
|
||||
|
|
|
@ -11,18 +11,20 @@ import java.io.File
|
|||
import org.gradle.api.DefaultTask
|
||||
import org.gradle.api.tasks.Input
|
||||
import org.gradle.api.tasks.InputFile
|
||||
import org.gradle.api.tasks.Internal
|
||||
import org.gradle.api.tasks.OutputFile
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
|
||||
open class HermesBinaryTask : DefaultTask() {
|
||||
internal lateinit var reactRoot: File
|
||||
|
||||
@get:Internal internal lateinit var reactRoot: File
|
||||
|
||||
@get:Input internal lateinit var hermesCommand: String
|
||||
@get:Input internal var hermesFlags: List<String> = emptyList()
|
||||
@get:InputFile internal lateinit var jsBundleFile: File
|
||||
|
||||
@get:Input internal lateinit var composeSourceMapsCommand: List<String>
|
||||
@get:Input internal lateinit var jsPackagerSourceMapFile: File
|
||||
@get:InputFile internal lateinit var jsPackagerSourceMapFile: File
|
||||
|
||||
@get:OutputFile internal lateinit var jsCompilerSourceMapFile: File
|
||||
@get:OutputFile internal lateinit var jsOutputSourceMapFile: File
|
||||
|
|
|
@ -542,8 +542,8 @@ SPEC CHECKSUMS:
|
|||
boost-for-react-native: 8f7c9ecfe357664c072ffbe2432569667cbf1f1b
|
||||
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
|
||||
DoubleConversion: ed15e075aa758ac0e4c1f8b830bd4e4d40d669e8
|
||||
FBLazyVector: b04d46643b820872d517121ab99ee0fcc3652735
|
||||
FBReactNativeSpec: 29fbafa21846fc05f16601462c2cdd85c8ab2327
|
||||
FBLazyVector: 7c8aac02c39d485811dc4765bb28b52a84919d09
|
||||
FBReactNativeSpec: 17c26ea384592e63bd60e0ba9de27926df2837a9
|
||||
Flipper: 30e8eeeed6abdc98edaf32af0cda2f198be4b733
|
||||
Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c
|
||||
Flipper-DoubleConversion: 57ffbe81ef95306cc9e69c4aa3aeeeeb58a6a28c
|
||||
|
@ -558,36 +558,36 @@ SPEC CHECKSUMS:
|
|||
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
|
||||
OpenSSL-Universal: 1aa4f6a6ee7256b83db99ec1ccdaa80d10f9af9b
|
||||
RCT-Folly: 43adc9ce880eb76792f88c011773cb5c664c1419
|
||||
RCTRequired: e6c345a47b0a8f4d7a3580eae3b7d0f2988df60d
|
||||
RCTTypeSafety: 18b870bddb331c7e20adac11ee9583886a282627
|
||||
React: 56de49d8da4553e37919863849a49c0ed2a465cf
|
||||
React-callinvoker: 36a10abf76935c8b8e203df2358069e4e44a48d8
|
||||
React-Core: ed44b2fc2eae9bae380a19331e0042057328ee9a
|
||||
React-CoreModules: 0da1659db734216d777800d4de0eb4bd68af210a
|
||||
React-cxxreact: f2d046b584dd2f39030af320162b630ffb7b9696
|
||||
React-jsi: 0bf552b8e8e4be5ed595ebe8b1124b43360972f9
|
||||
React-jsiexecutor: ae67abfcb813dac739f4dd84877d2fbd0474ec77
|
||||
React-jsinspector: 445d4bfb2a4cc193700e1cd55104a3e19d8c30a8
|
||||
React-logger: 55d2951923395c7cd0c7e293045acf087b035840
|
||||
React-perflogger: c4a96a6dc927a184f5a2ecd2af63eda1e7f1f6d2
|
||||
React-RCTActionSheet: 135b7376307a5e810a820460c7acdffb09572cce
|
||||
React-RCTAnimation: d6ff61f5bf7c705ac756364103eb52b130a967a6
|
||||
React-RCTBlob: d3e8bc6d1c03a58aaa254bf12723ad8a49c87bdd
|
||||
React-RCTImage: 7c66a75aa705802914e45b5a018d7a1188393f43
|
||||
React-RCTLinking: 3e91123397f6c0189521212ac4c5ed145749e2ab
|
||||
React-RCTNetwork: 7da561efde67f2c69616e9366aa69fc9a3073729
|
||||
React-RCTPushNotification: fed975816f88ff617355f6506c95c6730fa2489b
|
||||
React-RCTSettings: 74f5795e9d771d22c78b7d70d1e86d7fccf56a91
|
||||
React-RCTTest: 47c1358e4b9fe92ce3423b35cb09fb35f4d36d0a
|
||||
React-RCTText: f2422acef4b6f05cf476f8281bb8e037376cb382
|
||||
React-RCTVibration: 0e85b7f956d418743725c0ef58e3e4cdffa5bef7
|
||||
React-runtimeexecutor: 48b53a0d27d87992792da7cf7717636bcc3f283b
|
||||
RCTRequired: 320464f092e42e15d8118464f979498ab051d4da
|
||||
RCTTypeSafety: 18aee2ca89822032f60d32788318f7120fafa5f3
|
||||
React: a25b6456ee27523260048ac30376c0150dc9b07b
|
||||
React-callinvoker: a69fd28637a28bac6416def4684bae768b5d0376
|
||||
React-Core: e2e230dba9a1495af91c033325fa3cbb0f9a7c7d
|
||||
React-CoreModules: 460eb420650076c1d6b4b4771155d4bb29821190
|
||||
React-cxxreact: b7366d4e05f1b690a79b5b0f137cecefbb136412
|
||||
React-jsi: cd5adc6c1b038974065e61ac16d3024bd972babb
|
||||
React-jsiexecutor: ff4978510270b6ead9260da2e29f24edb26c6905
|
||||
React-jsinspector: 47c93335c0e329560a80d6f6b8fe8dedb5fa4f59
|
||||
React-logger: 8a15b60f4df7f369c38d2f11d4db8701ef2a0682
|
||||
React-perflogger: 46570f1e5452827a7b83478786d13eff61b80f14
|
||||
React-RCTActionSheet: 0638dbca25380810406d563c34aa0e7cfe34c151
|
||||
React-RCTAnimation: 7ea0233080f10a8b33e2265281f4cd150f64dff3
|
||||
React-RCTBlob: 63156bcb0a2d81848bbaeee8e7b767f4f5cbd58d
|
||||
React-RCTImage: 44bd40c48d9d12308b61ed84892a512bfe12eeb7
|
||||
React-RCTLinking: 034fc478a1464392d6e35b9486b1a11e2e988467
|
||||
React-RCTNetwork: 75c85e3a91b895124cc00621c577f3079614b1e3
|
||||
React-RCTPushNotification: c9bf10d6c071e08906d0a375f380bbdf2124fa2e
|
||||
React-RCTSettings: 487fc61d031ac5d17483a6a38065cb0322e07ee1
|
||||
React-RCTTest: d994a7e3117c7a47cec970f586ec4f478d314763
|
||||
React-RCTText: 7cccadc19b5903ceb49c36ea5fdee4f1c1fc5768
|
||||
React-RCTVibration: 394627c96284924ae1d79bd86734b5702b6d1320
|
||||
React-runtimeexecutor: 9971968e4e824ff315fe0a6b77864b8eb8bbf354
|
||||
React-TurboModuleCxx-RNW: f2e32cbfced49190a61d66c993a8975de79a158a
|
||||
React-TurboModuleCxx-WinRTPort: cf61ecb7e83a2f403c5abc286dd7482db38f4ae5
|
||||
ReactCommon: 5c06a07ebe8e546f61fd4c749f3197a1ff9072c1
|
||||
Yoga: 025b741b201dcf30e983cf2a3e59c28e65c18c59
|
||||
React-TurboModuleCxx-WinRTPort: b58698647617eebfac563a9edaa4f1077877b064
|
||||
ReactCommon: a828b336729026aae8f3f48dc31d7f92c6839258
|
||||
Yoga: 085719604f98e57c7af55503bff5548f4aadad6f
|
||||
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
|
||||
|
||||
PODFILE CHECKSUM: c7a7110b242497f2bf323ba74caedb9ee61ee05e
|
||||
|
||||
COCOAPODS: 1.11.3
|
||||
COCOAPODS: 1.11.2
|
||||
|
|
|
@ -288,6 +288,7 @@ if (enableCodegen) {
|
|||
def packageReactNdkLibs = tasks.register("packageReactNdkLibs", Copy) {
|
||||
// TODO: handle extracting .so from prebuilt :ReactAndroid.
|
||||
dependsOn(":ReactAndroid:packageReactNdkLibs")
|
||||
dependsOn("generateCodegenSchemaFromJavaScript")
|
||||
from("$reactAndroidBuildDir/react-ndk/exported")
|
||||
into("$buildDir/react-ndk/exported")
|
||||
}
|
||||
|
|
|
@ -1,54 +0,0 @@
|
|||
#!/usr/bin/env node
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
require('shelljs/global');
|
||||
const yargs = require('yargs');
|
||||
const execSync = require('child_process').execSync;
|
||||
|
||||
let argv = yargs.option('srcs', {
|
||||
alias: 'srcs_dir',
|
||||
type: 'string',
|
||||
description: 'Path to JavaScript sources',
|
||||
}).option('modules_library_name', {
|
||||
type: 'string',
|
||||
description: 'Native modules interfaces library name',
|
||||
}).option('modules_output_dir', {
|
||||
type: 'string',
|
||||
description: 'Native modules interfaces output dir',
|
||||
}).option('components_library_name', {
|
||||
type: 'string',
|
||||
description: 'Native components interfaces library name',
|
||||
}).option('components_output_dir', {
|
||||
type: 'string',
|
||||
description: 'Native components interfaces output dir',
|
||||
}).argv;
|
||||
|
||||
let env_vars = [];
|
||||
const { srcs_dir, modules_library_name, modules_output_dir, components_library_name, components_output_dir } = argv;
|
||||
|
||||
if (srcs_dir) {
|
||||
env_vars.push(`SRCS_DIR=${srcs_dir}`);
|
||||
}
|
||||
if (modules_library_name) {
|
||||
env_vars.push(`MODULES_LIBRARY_NAME=${modules_library_name}`);
|
||||
}
|
||||
if (modules_output_dir) {
|
||||
env_vars.push(`MODULES_OUTPUT_DIR=${modules_output_dir}`);
|
||||
}
|
||||
if (components_library_name) {
|
||||
env_vars.push(`COMPONENTS_LIBRARY_NAME=${components_library_name}`);
|
||||
}
|
||||
if (components_output_dir) {
|
||||
env_vars.push(`COMPONENTS_OUTPUT_DIR=${components_output_dir}`);
|
||||
}
|
||||
|
||||
execSync(`${env_vars.join(' ')} ./generate-specs.sh`);
|
|
@ -4,20 +4,12 @@
|
|||
# This source code is licensed under the MIT license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
# This script collects the JavaScript spec definitions for core
|
||||
# This script collects the JavaScript spec definitions for
|
||||
# native modules and components, then uses react-native-codegen
|
||||
# to generate native code.
|
||||
#
|
||||
# Optionally, set these envvars to override defaults:
|
||||
# - SRCS_DIR: Path to JavaScript sources
|
||||
# - MODULES_LIBRARY_NAME: Defaults to FBReactNativeSpec
|
||||
# - MODULES_OUTPUT_DIR: Defaults to React/$MODULES_LIBRARY_NAME/$MODULES_LIBRARY_NAME
|
||||
# - COMPONENTS_LIBRARY_NAME: Defaults to rncore
|
||||
# - COMPONENTS_OUTPUT_DIR: Defaults to ReactCommon/react/renderer/components/$COMPONENTS_LIBRARY_NAME
|
||||
#
|
||||
# Usage:
|
||||
# ./scripts/generate-specs.sh
|
||||
# SRCS_DIR=myapp/js MODULES_LIBRARY_NAME=MySpecs MODULES_OUTPUT_DIR=myapp/MySpecs ./scripts/generate-specs.sh
|
||||
#
|
||||
|
||||
# shellcheck disable=SC2038
|
||||
|
@ -44,27 +36,45 @@ describe () {
|
|||
printf "\\n\\n>>>>> %s\\n\\n\\n" "$1" >&2
|
||||
}
|
||||
|
||||
print_usage () {
|
||||
printf "\\nNAME\\n\\t%s -- generate specs\\n" "$1" >&2
|
||||
printf "\\nSYNOPSIS\\n" >&2
|
||||
printf "\\t%s javascript_sources_directory specs_library_name output_directory\\n" "$1" >&2
|
||||
printf "\\t%s javascript_sources_directory specs_library_name output_directory component_library_name [component_output_directory]\\n" "$1" >&2
|
||||
printf "\\n\\nDESCRIPTION\\n\\tIn the first synopsis form, this script collects native module and native component JavaScript spec definitions in javascript_sources_directory, then uses react-native-codegen to generate the native interface code into a library named specs_library_name, which is copied to the destination output_directory.\\n" >&2
|
||||
printf "\\n\\tIn the second synopsis form, the component_library_name will be used as the name of the component native interface code library. If provided, the component output will be copied to the component_output_directory, otherwise it will be copied to the output_directory.\\n" >&2
|
||||
}
|
||||
|
||||
main() {
|
||||
SRCS_DIR=${SRCS_DIR:-$(cd "$RN_DIR/Libraries" && pwd)}
|
||||
MODULES_LIBRARY_NAME=${MODULES_LIBRARY_NAME:-FBReactNativeSpec}
|
||||
|
||||
COMPONENTS_LIBRARY_NAME=${COMPONENTS_LIBRARY_NAME:-rncore}
|
||||
MODULES_OUTPUT_DIR=${MODULES_OUTPUT_DIR:-"$RN_DIR/React/$MODULES_LIBRARY_NAME/$MODULES_LIBRARY_NAME"}
|
||||
# TODO: $COMPONENTS_PATH should be programmatically specified, and may change with use_frameworks! support.
|
||||
COMPONENTS_PATH="ReactCommon/react/renderer/components"
|
||||
COMPONENTS_OUTPUT_DIR=${COMPONENTS_OUTPUT_DIR:-"$RN_DIR/$COMPONENTS_PATH/$COMPONENTS_LIBRARY_NAME"}
|
||||
|
||||
TEMP_OUTPUT_DIR="$TEMP_DIR/out"
|
||||
SCHEMA_FILE="$TEMP_DIR/schema.json"
|
||||
|
||||
CODEGEN_REPO_PATH="$RN_DIR/packages/react-native-codegen"
|
||||
CODEGEN_NPM_PATH="$RN_DIR/../react-native-codegen"
|
||||
MIN_ARG_NUM=3
|
||||
if [ "$#" -eq 0 ]; then
|
||||
print_usage "$0"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$NODE_BINARY" ]; then
|
||||
echo "Error: Could not find node. Make sure it is in bash PATH or set the NODE_BINARY environment variable." 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$#" -lt "$MIN_ARG_NUM" ]; then
|
||||
echo "Error: Expected $MIN_ARG_NUM arguments, got $# instead. Run $0 with no arguments to learn more." 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SRCS_DIR=$1
|
||||
LIBRARY_NAME=$2
|
||||
OUTPUT_DIR=$3
|
||||
COMPONENT_LIBRARY_NAME_OVERRIDE=$4
|
||||
COMPONENT_OUTPUT_DIR_OVERRIDE=$5
|
||||
|
||||
PLATFORM="ios"
|
||||
TEMP_OUTPUT_DIR="$TEMP_DIR/out"
|
||||
SCHEMA_FILE="$TEMP_DIR/schema.json"
|
||||
|
||||
CODEGEN_REPO_PATH="$RN_DIR/packages/react-native-codegen"
|
||||
CODEGEN_NPM_PATH="$RN_DIR/../react-native-codegen"
|
||||
|
||||
if [ -d "$CODEGEN_REPO_PATH" ]; then
|
||||
CODEGEN_PATH=$(cd "$CODEGEN_REPO_PATH" && pwd)
|
||||
elif [ -d "$CODEGEN_NPM_PATH" ]; then
|
||||
|
@ -82,15 +92,38 @@ main() {
|
|||
describe "Generating schema from Flow types"
|
||||
"$NODE_BINARY" "$CODEGEN_PATH/lib/cli/combine/combine-js-to-schema-cli.js" "$SCHEMA_FILE" "$SRCS_DIR"
|
||||
|
||||
describe "Generating native code from schema (iOS)"
|
||||
pushd "$RN_DIR" >/dev/null || exit 1
|
||||
"$NODE_BINARY" scripts/generate-specs-cli.js ios "$SCHEMA_FILE" "$TEMP_OUTPUT_DIR" "$MODULES_LIBRARY_NAME"
|
||||
popd >/dev/null || exit 1
|
||||
describe "Generating native code from schema ($PLATFORM)"
|
||||
pushd "$RN_DIR" >/dev/null
|
||||
"$NODE_BINARY" scripts/generate-specs-cli.js "$PLATFORM" "$SCHEMA_FILE" "$TEMP_OUTPUT_DIR" "$LIBRARY_NAME"
|
||||
popd >/dev/null
|
||||
|
||||
mkdir -p "$COMPONENTS_OUTPUT_DIR" "$MODULES_OUTPUT_DIR"
|
||||
cp -R "$TEMP_OUTPUT_DIR/$MODULES_LIBRARY_NAME.h" "$TEMP_OUTPUT_DIR/$MODULES_LIBRARY_NAME-generated.mm" "$MODULES_OUTPUT_DIR" || exit 1
|
||||
find "$TEMP_OUTPUT_DIR" -type f | xargs sed -i.bak "s/$MODULES_LIBRARY_NAME/$COMPONENTS_LIBRARY_NAME/g" || exit 1
|
||||
find "$TEMP_OUTPUT_DIR" -type f -not -iname "$MODULES_LIBRARY_NAME*" -exec cp '{}' "$COMPONENTS_OUTPUT_DIR/" ';' || exit 1
|
||||
|
||||
mkdir -p "$OUTPUT_DIR"
|
||||
|
||||
if [ -z "$COMPONENT_LIBRARY_NAME_OVERRIDE" ]; then
|
||||
# Copy all output to output_dir
|
||||
cp -R "$TEMP_OUTPUT_DIR/" "$OUTPUT_DIR"
|
||||
echo >&2 "$LIBRARY_NAME output has been written to $OUTPUT_DIR:"
|
||||
ls -1 "$OUTPUT_DIR" 2>&1
|
||||
else
|
||||
# Copy modules output to output_dir
|
||||
cp "$TEMP_OUTPUT_DIR/$LIBRARY_NAME.h" "$TEMP_OUTPUT_DIR/$LIBRARY_NAME-generated.mm" "$OUTPUT_DIR"
|
||||
echo >&2 "$LIBRARY_NAME output has been written to $OUTPUT_DIR:"
|
||||
ls -1 "$OUTPUT_DIR" 2>&1
|
||||
|
||||
# Rename library name used in components output files
|
||||
find "$TEMP_OUTPUT_DIR" -type f | xargs sed -i.bak "s/$LIBRARY_NAME/$COMPONENT_LIBRARY_NAME_OVERRIDE/g"
|
||||
|
||||
if [ -n "$COMPONENT_OUTPUT_DIR_OVERRIDE" ]; then
|
||||
# Components codegen output to be moved to separate directory
|
||||
mkdir -p "$COMPONENT_OUTPUT_DIR_OVERRIDE"
|
||||
OUTPUT_DIR="$COMPONENT_OUTPUT_DIR_OVERRIDE"
|
||||
fi
|
||||
|
||||
find "$TEMP_OUTPUT_DIR" -type f -not -iname "$LIBRARY_NAME.h" -not -iname "$LIBRARY_NAME-generated.mm" -not -iname "*.bak" -exec cp '{}' "$OUTPUT_DIR/" ';'
|
||||
echo >&2 "$COMPONENT_LIBRARY_NAME_OVERRIDE output has been written to $OUTPUT_DIR:"
|
||||
ls -1 "$OUTPUT_DIR" 2>&1
|
||||
fi
|
||||
|
||||
echo >&2 'Done.'
|
||||
}
|
||||
|
|
|
@ -164,38 +164,38 @@ def use_react_native_codegen!(spec, options={})
|
|||
js_srcs = options[:js_srcs_dir] ||= "#{prefix}/Libraries"
|
||||
|
||||
# Library name (e.g. FBReactNativeSpec)
|
||||
modules_library_name = options[:library_name] ||= spec.name
|
||||
library_name = options[:library_name] ||= "#{spec.name}Spec"
|
||||
|
||||
# Output dir, relative to podspec that invoked this method
|
||||
modules_output_dir = options[:modules_output_dir] ||= "#{prefix}/React/#{modules_library_name}/#{modules_library_name}"
|
||||
output_dir = options[:output_dir] ||= "#{prefix}/React/#{library_name}"
|
||||
|
||||
generated_dirs = [ modules_output_dir ]
|
||||
generated_filenames = [ "#{modules_library_name}.h", "#{modules_library_name}-generated.mm" ]
|
||||
generated_files = generated_filenames.map { |filename| "#{modules_output_dir}/#{filename}" }
|
||||
generated_dirs = [ "#{output_dir}/#{library_name}" ]
|
||||
generated_filenames = [ "#{library_name}.h", "#{library_name}-generated.mm" ]
|
||||
generated_files = generated_filenames.map { |filename| "#{output_dir}/#{library_name}/#{filename}" }
|
||||
|
||||
# Run the codegen as part of the Xcode build pipeline.
|
||||
env_vars = "SRCS_DIR='${PODS_TARGET_SRCROOT}/#{js_srcs}'"
|
||||
env_vars += " MODULES_OUTPUT_DIR='${PODS_TARGET_SRCROOT}/#{modules_output_dir}'"
|
||||
env_vars += " MODULES_LIBRARY_NAME='#{modules_library_name}'"
|
||||
codegen_script_args = [ "'${PODS_TARGET_SRCROOT}/#{js_srcs}'" ]
|
||||
codegen_script_args.push "'#{library_name}'"
|
||||
codegen_script_args.push "'${PODS_TARGET_SRCROOT}/#{output_dir}/#{library_name}'"
|
||||
|
||||
if ENV['USE_FABRIC'] == '1'
|
||||
# We use a different library name for components, as well as an additional set of files.
|
||||
# Eventually, we want these to be part of the same library as #{modules_library_name} above.
|
||||
components_output_dir = options[:components_output_dir] ||= "#{prefix}/ReactCommon/react/renderer/components/rncore/"
|
||||
generated_dirs.push components_output_dir
|
||||
env_vars += " COMPONENTS_OUTPUT_DIR='${PODS_TARGET_SRCROOT}/#{components_output_dir}'"
|
||||
components_generated_filenames = [
|
||||
"ComponentDescriptors.h",
|
||||
"EventEmitters.cpp",
|
||||
"EventEmitters.h",
|
||||
"Props.cpp",
|
||||
"Props.h",
|
||||
"RCTComponentViewHelpers.h",
|
||||
"ShadowNodes.cpp",
|
||||
"ShadowNodes.h"
|
||||
]
|
||||
generated_files = generated_files.concat(components_generated_filenames.map { |filename| "#{components_output_dir}/#{filename}" })
|
||||
end
|
||||
# We use a different library name for components, as well as an additional set of files.
|
||||
# Eventually, we want these to be part of the same library as #{library_name} above.
|
||||
component_library_name = options[:component_library_name] ||= library_name
|
||||
component_output_dir = options[:component_output_dir] ||= output_dir
|
||||
generated_dirs.push "#{component_output_dir}/#{component_library_name}"
|
||||
codegen_script_args.push "'#{component_library_name}'"
|
||||
codegen_script_args.push "'${PODS_TARGET_SRCROOT}/#{component_output_dir}/#{component_library_name}'"
|
||||
components_generated_filenames = [
|
||||
"ComponentDescriptors.h",
|
||||
"EventEmitters.cpp",
|
||||
"EventEmitters.h",
|
||||
"Props.cpp",
|
||||
"Props.h",
|
||||
"RCTComponentViewHelpers.h",
|
||||
"ShadowNodes.cpp",
|
||||
"ShadowNodes.h"
|
||||
]
|
||||
generated_files = generated_files.concat(components_generated_filenames.map { |filename| "#{component_output_dir}/#{component_library_name}/#{filename}" })
|
||||
|
||||
# Prepare filesystem by creating empty files that will be picked up as references by CocoaPods.
|
||||
prepare_command = "mkdir -p #{generated_dirs.join(" ")} && touch -a #{generated_files.join(" ")}"
|
||||
|
@ -205,11 +205,11 @@ def use_react_native_codegen!(spec, options={})
|
|||
spec.script_phase = {
|
||||
:name => 'Generate Specs',
|
||||
:input_files => [ "${PODS_TARGET_SRCROOT}/#{js_srcs}" ], # This also needs to be relative to Xcode
|
||||
:output_files => ["${DERIVED_FILE_DIR}/codegen-#{modules_library_name}.log"].concat(generated_files.map { |filename| " ${PODS_TARGET_SRCROOT}/#{filename}"} ),
|
||||
:output_files => ["${DERIVED_FILE_DIR}/codegen-#{library_name}.log"].concat(generated_files.map { |filename| " ${PODS_TARGET_SRCROOT}/#{filename}"} ),
|
||||
# The final generated files will be created when this script is invoked at Xcode build time.
|
||||
:script => %{set -o pipefail
|
||||
|
||||
bash -l -c '#{env_vars} $\{PODS_TARGET_SRCROOT\}/#{prefix}/scripts/generate-specs.sh' 2>&1 | tee "${SCRIPT_OUTPUT_FILE_0}"
|
||||
bash -l -c '$\{PODS_TARGET_SRCROOT\}/#{prefix}/scripts/generate-specs.sh #{codegen_script_args.join(" ")}' 2>&1 | tee "${SCRIPT_OUTPUT_FILE_0}"
|
||||
},
|
||||
:execution_position => :before_compile,
|
||||
:show_env_vars_in_log => true
|
||||
|
|
|
@ -22,3 +22,10 @@ include(
|
|||
// Include this to enable codegen Gradle plugin.
|
||||
includeBuild("packages/react-native-codegen/android")
|
||||
includeBuild("packages/react-native-gradle-plugin/")
|
||||
|
||||
// Include this to build the Android template as well and make sure is not broken.
|
||||
if (File("template/node_modules/").exists()) {
|
||||
includeBuild("template/android/") {
|
||||
name = "template-android"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
|
@ -1,89 +1,89 @@
|
|||
@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=.
|
||||
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 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%"=="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=.
|
||||
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 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%"=="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
|
||||
|
|
|
@ -807,7 +807,7 @@
|
|||
debug "^4.1.0"
|
||||
globals "^11.1.0"
|
||||
|
||||
"@babel/types@^7.0.0", "@babel/types@^7.14.0", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.16.8", "@babel/types@^7.17.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.7.0":
|
||||
"@babel/types@^7.0.0", "@babel/types@^7.14.0", "@babel/types@^7.14.1", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.16.8", "@babel/types@^7.17.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.7.0":
|
||||
version "7.17.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.17.0.tgz#a826e368bccb6b3d84acd76acad5c0d87342390b"
|
||||
integrity sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==
|
||||
|
@ -5493,7 +5493,7 @@ json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1:
|
|||
resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
|
||||
integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=
|
||||
|
||||
json5@^2.2.1:
|
||||
json5@^2.1.2, json5@^2.2.1:
|
||||
version "2.2.1"
|
||||
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c"
|
||||
integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==
|
||||
|
|
Загрузка…
Ссылка в новой задаче