Skip to content

Commit

Permalink
fix: move prefab headers inside JavaScriptCore folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Kudo committed Nov 28, 2024
1 parent 9c61fec commit 4ceabd0
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion lib/jsc-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ def i18n = project.findProperty("i18n") ?: ""
def signingKey = project.findProperty('signingKey')
def signingPassword = project.findProperty('signingPassword')

def prefabHeadersDir = "${buildDir}/prefab-headers"

if (!distDir) throw new RuntimeException("expecting --project-prop distDir=??? but was empty")
if (!jniLibsDir) throw new RuntimeException("expecting --project-prop jniLibsDir=??? but was empty")
if (!version) throw new RuntimeException("expecting --project-prop version=??? but was empty")
Expand Down Expand Up @@ -56,7 +58,7 @@ android {

prefab {
jsc {
headers file(headersDir).absolutePath
headers file(prefabHeadersDir).absolutePath
}
}

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

tasks.register('preparePrefabHeaders', Copy) {
from("${headersDir}")
filesMatching('**/*.h') {
path = "JavaScriptCore/${it.name}"
}
into(file("${prefabHeadersDir}"))
}

afterEvaluate {
preBuild.dependsOn(preparePrefabHeaders)

publishing {
publications {
release(MavenPublication) {
Expand Down

0 comments on commit 4ceabd0

Please sign in to comment.