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 gabrieldonadel committed Jul 17, 2024
1 parent 002ada1 commit 85f388c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/react-native/ReactAndroid/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,8 @@ android {
ndkVersion = libs.versions.ndkVersion.get()
}

resourcePrefix = "reactandroid_"

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
Expand Down Expand Up @@ -799,6 +801,13 @@ dependencies {
compileOnly(libs.javax.annotation.api)
api(libs.javax.inject)

if (!buildHermesSource) {
debugCompileOnly(files("${prebuiltHermesDir}/hermes-engine-debug.aar"))
releaseCompileOnly(files("${prebuiltHermesDir}/hermes-engine-release.aar"))
} else {
compileOnly(project(":packages:react-native:ReactAndroid:hermes-engine"))
}

// It's up to the consumer to decide if hermes should be included or not.
// Therefore hermes-engine is a compileOnly dependency.
compileOnly(project(":packages:react-native:ReactAndroid:hermes-engine"))
Expand Down

0 comments on commit 85f388c

Please sign in to comment.