Skip to content

Commit 4ceabd0

Browse files
committed
fix: move prefab headers inside JavaScriptCore folder
1 parent 9c61fec commit 4ceabd0

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

lib/jsc-android/build.gradle

+13-1
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)