Skip to content

Commit 6ab5a17

Browse files
bestanderide
authored andcommitted
Summary: Improvement over #11469. Depends on react-native-community/boost-for-react-native#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 #11511 Differential Revision: D4348098 fbshipit-source-id: 5c2f25cc395ae0cad19d56b7c0b2b102513580fb
1 parent 4a2d8d4 commit 6ab5a17

1 file changed

Lines changed: 7 additions & 22 deletions

File tree

ReactAndroid/build.gradle

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -35,33 +35,17 @@ task createNativeDepsDirectories {
3535
}
3636

3737
task downloadBoost(dependsOn: createNativeDepsDirectories, type: Download) {
38-
src 'https://registry.yarnpkg.com/boost-react-native-bundle/-/boost-react-native-bundle-1.57.0.tgz'
38+
src 'https://github.com/react-native-community/boost-for-react-native/releases/download/v1.57.0-1/boost_1_57_0.tar.gz'
3939
onlyIfNewer true
4040
overwrite false
41-
dest new File(downloadsDir, 'boost-react-native-bundle-1.57.0.tgz')
41+
dest new File(downloadsDir, 'boost_1_57_0.tar.gz')
4242
}
4343

44-
task unpackBoost(dependsOn: downloadBoost, type: Copy) {
45-
from tarTree(resources.gzip(downloadBoost.dest))
46-
include 'package/boost_1_57_0/boost/**/*.hpp'
47-
into "$thirdPartyNdkDir/boost"
48-
// npm packages are unpacked into folder "package" that we want to strip
49-
eachFile { FileCopyDetails fcp ->
50-
if (fcp.relativePath.pathString.startsWith("package")) {
51-
// remap the file to the root
52-
def segments = fcp.relativePath.segments
53-
def pathsegments = segments[1..-1] as String[]
54-
fcp.relativePath = new RelativePath(!fcp.file.isDirectory(), pathsegments)
55-
} else {
56-
fcp.exclude()
57-
}
58-
}
59-
}
60-
61-
task prepareBoost(dependsOn: boostPath ? [] : [unpackBoost], type: Copy) {
62-
from boostPath ?: []
44+
task prepareBoost(dependsOn: boostPath ? [] : [downloadBoost], type: Copy) {
45+
from boostPath ?: tarTree(resources.gzip(downloadBoost.dest))
6346
from 'src/main/jni/third-party/boost/Android.mk'
6447
include 'boost_1_57_0/boost/**/*.hpp', 'Android.mk'
48+
includeEmptyDirs = false
6549
into "$thirdPartyNdkDir/boost"
6650
}
6751

@@ -135,7 +119,8 @@ task prepareGlog(dependsOn: dependenciesPath ? [] : [downloadGlog], type: Copy)
135119
}
136120

137121
task downloadJSCHeaders(type: Download) {
138-
def jscAPIBaseURL = 'https://svn.webkit.org/repository/webkit/!svn/bc/174650/trunk/Source/JavaScriptCore/API/'
122+
// in sync with webkit SVN revision 174650
123+
def jscAPIBaseURL = 'https://raw.githubusercontent.com/WebKit/webkit/38b15a3ba3c1b0798f2036f7cea36ffdc096202e/Source/JavaScriptCore/API/'
139124
def jscHeaderFiles = ['JavaScript.h', 'JSBase.h', 'JSContextRef.h', 'JSObjectRef.h', 'JSRetainPtr.h', 'JSStringRef.h', 'JSValueRef.h', 'WebKitAvailability.h']
140125
def output = new File(downloadsDir, 'jsc')
141126
output.mkdirs()

0 commit comments

Comments
 (0)