mirror of
https://github.com/status-im/react-native.git
synced 2025-01-14 11:34:23 +00:00
boost is downloaded from https://github.com/react-native-community/boost
Summary: Improvement over https://github.com/facebook/react-native/pull/11469. Depends on https://github.com/react-native-community/boost-for-react-native/issues/1, **don't merge before it is fixed**. It would be more in line with other dependencies to depend only on github for thirdparty bridge dependencies. **Test plan (required)** - Circle (testing with caches cleaned) - ./gradlew ReactAndroid:packageReactNdkLibsForBuck (check twice to make sure caches work) REACT_NATIVE_BOOST_PATH=./path-to-local-boost/ - ./gradlew ReactAndroid:packageReactNdkLibsForBuck (check twice to make sure caches work) Closes https://github.com/facebook/react-native/pull/11511 Differential Revision: D4348098 fbshipit-source-id: 5c2f25cc395ae0cad19d56b7c0b2b102513580fb
This commit is contained in:
parent
5671dc3fae
commit
5d4b476583
@ -35,33 +35,17 @@ task createNativeDepsDirectories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
task downloadBoost(dependsOn: createNativeDepsDirectories, type: Download) {
|
task downloadBoost(dependsOn: createNativeDepsDirectories, type: Download) {
|
||||||
src 'https://registry.yarnpkg.com/boost-react-native-bundle/-/boost-react-native-bundle-1.57.0.tgz'
|
src 'https://github.com/react-native-community/boost-for-react-native/releases/download/v1.57.0-1/boost_1_57_0.tar.gz'
|
||||||
onlyIfNewer true
|
onlyIfNewer true
|
||||||
overwrite false
|
overwrite false
|
||||||
dest new File(downloadsDir, 'boost-react-native-bundle-1.57.0.tgz')
|
dest new File(downloadsDir, 'boost_1_57_0.tar.gz')
|
||||||
}
|
}
|
||||||
|
|
||||||
task unpackBoost(dependsOn: downloadBoost, type: Copy) {
|
task prepareBoost(dependsOn: boostPath ? [] : [downloadBoost], type: Copy) {
|
||||||
from tarTree(resources.gzip(downloadBoost.dest))
|
from boostPath ?: tarTree(resources.gzip(downloadBoost.dest))
|
||||||
include 'package/boost_1_57_0/boost/**/*.hpp'
|
|
||||||
into "$thirdPartyNdkDir/boost"
|
|
||||||
// npm packages are unpacked into folder "package" that we want to strip
|
|
||||||
eachFile { FileCopyDetails fcp ->
|
|
||||||
if (fcp.relativePath.pathString.startsWith("package")) {
|
|
||||||
// remap the file to the root
|
|
||||||
def segments = fcp.relativePath.segments
|
|
||||||
def pathsegments = segments[1..-1] as String[]
|
|
||||||
fcp.relativePath = new RelativePath(!fcp.file.isDirectory(), pathsegments)
|
|
||||||
} else {
|
|
||||||
fcp.exclude()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
task prepareBoost(dependsOn: boostPath ? [] : [unpackBoost], type: Copy) {
|
|
||||||
from boostPath ?: []
|
|
||||||
from 'src/main/jni/third-party/boost/Android.mk'
|
from 'src/main/jni/third-party/boost/Android.mk'
|
||||||
include 'boost_1_57_0/boost/**/*.hpp', 'Android.mk'
|
include 'boost_1_57_0/boost/**/*.hpp', 'Android.mk'
|
||||||
|
includeEmptyDirs = false
|
||||||
into "$thirdPartyNdkDir/boost"
|
into "$thirdPartyNdkDir/boost"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,7 +119,8 @@ task prepareGlog(dependsOn: dependenciesPath ? [] : [downloadGlog], type: Copy)
|
|||||||
}
|
}
|
||||||
|
|
||||||
task downloadJSCHeaders(type: Download) {
|
task downloadJSCHeaders(type: Download) {
|
||||||
def jscAPIBaseURL = 'https://svn.webkit.org/repository/webkit/!svn/bc/174650/trunk/Source/JavaScriptCore/API/'
|
// in sync with webkit SVN revision 174650
|
||||||
|
def jscAPIBaseURL = 'https://raw.githubusercontent.com/WebKit/webkit/38b15a3ba3c1b0798f2036f7cea36ffdc096202e/Source/JavaScriptCore/API/'
|
||||||
def jscHeaderFiles = ['JavaScript.h', 'JSBase.h', 'JSContextRef.h', 'JSObjectRef.h', 'JSRetainPtr.h', 'JSStringRef.h', 'JSValueRef.h', 'WebKitAvailability.h']
|
def jscHeaderFiles = ['JavaScript.h', 'JSBase.h', 'JSContextRef.h', 'JSObjectRef.h', 'JSRetainPtr.h', 'JSStringRef.h', 'JSValueRef.h', 'WebKitAvailability.h']
|
||||||
def output = new File(downloadsDir, 'jsc')
|
def output = new File(downloadsDir, 'jsc')
|
||||||
output.mkdirs()
|
output.mkdirs()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user