Skip to content

Commit

Permalink
[android] Support caching prebuilt hermes-engine
Browse files Browse the repository at this point in the history
  • Loading branch information
Kudo authored and alanjhughes committed Mar 21, 2024
1 parent d8402f3 commit 044e0ad
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/react-native/ReactAndroid/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,12 @@ val preparePrefab by
outputDir.set(prefabHeadersDir)
}

val prebuiltHermesDir = findProperty("expo.prebuiltHermesDir") ?: File("$rootDir/prebuiltHermes")
val prebuiltHermesVersion = if (File("${prebuiltHermesDir}/.hermesversion").exists()) File("${prebuiltHermesDir}/.hermesversion").readText() else null
val currentHermesVersion = if (File("${project(":packages:react-native:ReactAndroid").projectDir}/../sdks/.hermesversion").exists()) File("${project(":packages:react-native:ReactAndroid").projectDir}/../sdks/.hermesversion").readText() else null
val buildHermesSource = currentHermesVersion != prebuiltHermesVersion
logger.info(":ReactAndroid - buildHermesSource[$buildHermesSource]")

val createNativeDepsDirectories by
tasks.registering {
downloadsDir.mkdirs()
Expand Down

0 comments on commit 044e0ad

Please sign in to comment.