Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,12 @@ jsi::Value ShareableWorklet::toJSValue(jsi::Runtime &rt) {
auto code = std::make_shared<const jsi::StringBuffer>(
"(" + initData.getProperty(rt, "__reanimated_workletCode").asString(rt).utf8(rt) + "\n)");

auto sourceURL = initData.getProperty(rt, "location").asString(rt).utf8(rt);
std::string sourceURL = "unknown.js";
auto locationValue = initData.getProperty(rt, "location");
if (locationValue.isString()) {
sourceURL = locationValue.asString(rt).utf8(rt);
}

// The code has to be evaluated in the context of the worklet runtime.
// This is done by creating a new function that evaluates the code and
// returns the resulting function.
Expand Down
9 changes: 6 additions & 3 deletions packages/react-native-reanimated/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ android {
// We'll let the build system to resolve the version of CMake
// but keeping this here as a reminder that you should actually
// match the version being used in the React Native repo
// version = System.getenv("CMAKE_VERSION") ?: "3.22.1"
version = System.getenv("CMAKE_VERSION") ?: "3.22.1"
path "CMakeLists.txt"
}
}
Expand Down Expand Up @@ -522,10 +522,13 @@ dependencies {
implementation "com.facebook.react:react-android" // version substituted by RNGP
if (JS_RUNTIME == "hermes") {
if (System.getenv("BUILD_TYPE") == "release") {
// Worklets compilation requires the hermes-engine headers
// swap out the hermes-engine with our own prebuilt version
// for release builds.
def hermesPath = "../../../@exodus/hermes-engine/android/";
releaseImplementation files(hermesPath + "hermes-release.aar")
compileOnly files(hermesPath + "hermes-release.aar")
} else {
implementation("com.facebook.react:hermes-android")
compileOnly("com.facebook.react:hermes-android")
}
}
}
Expand Down
Loading