Skip to content

Commit

Permalink
Merge branch 'main' into fix/1517-reanimated-crash
Browse files Browse the repository at this point in the history
  • Loading branch information
chrfalch authored May 4, 2023
2 parents 87ffefd + 8a0e399 commit 9fb9220
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions package/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -272,11 +272,24 @@ task extractJNIFiles {
extractJNIFiles.mustRunAfter extractAARHeaders

if (ENABLE_PREFAB) {
// Package everything with the original file structure
// Package all the cpp code in a flattened directory structure
task prepareHeaders(type: Copy) {
from('./cpp')
from("./cpp")
into "${project.buildDir}/headers/rnskia/"
includeEmptyDirs = false
include "**/*.h"
eachFile {
String path = it.path

// Skip flattening third_party dir
if (path.contains("api/third_party")) {
path = path.substring("api/".length())
} else {
// flatten anything else
path = path.substring(path.lastIndexOf("/") + 1)
}
it.path = path
}
}
preBuild.dependsOn(prepareHeaders)
}
Expand Down

0 comments on commit 9fb9220

Please sign in to comment.