Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 31b634b

Browse files
authored
fix: move prefab headers inside JavaScriptCore folder (#186)
# Why following up facebook/react-native#47972 (comment) # How move prefab headers into `JavaScriptCore/` directory, so that `#include <JavaScriptCore/JavaScript.h>` in JSCRuntime will not break. this also simulates how JavaScriptCore.framework works.
1 parent 9c61fec commit 31b634b

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

‎lib/jsc-android/build.gradle‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ def i18n = project.findProperty("i18n") ?: ""
1111
def signingKey = project.findProperty('signingKey')
1212
def signingPassword = project.findProperty('signingPassword')
1313

14+
def prefabHeadersDir = "${buildDir}/prefab-headers"
15+
1416
if (!distDir) throw new RuntimeException("expecting --project-prop distDir=??? but was empty")
1517
if (!jniLibsDir) throw new RuntimeException("expecting --project-prop jniLibsDir=??? but was empty")
1618
if (!version) throw new RuntimeException("expecting --project-prop version=??? but was empty")
@@ -56,7 +58,7 @@ android {
5658

5759
prefab {
5860
jsc {
59-
headers file(headersDir).absolutePath
61+
headers file(prefabHeadersDir).absolutePath
6062
}
6163
}
6264

@@ -72,7 +74,17 @@ project.group = "io.github.react-native-community"
7274
def artifactName = Boolean.valueOf(i18n) ? "jsc-android-intl" : "jsc-android"
7375
project.version = "${version}"
7476

77+
tasks.register('preparePrefabHeaders', Copy) {
78+
from("${headersDir}")
79+
filesMatching('**/*.h') {
80+
path = "JavaScriptCore/${it.name}"
81+
}
82+
into(file("${prefabHeadersDir}"))
83+
}
84+
7585
afterEvaluate {
86+
preBuild.dependsOn(preparePrefabHeaders)
87+
7688
publishing {
7789
publications {
7890
release(MavenPublication) {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /