File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ apply plugin: "org.jetbrains.kotlin.android"
33apply plugin : " com.facebook.react"
44apply plugin : ' org.jetbrains.kotlin.plugin.compose'
55
6+ import org.gradle.internal.os.OperatingSystem
7+
68/**
79 * This is the configuration block to customize your React Native Android app.
810 * By default you don't need to apply any configuration, just uncomment the lines you need.
@@ -48,7 +50,18 @@ apply plugin: 'org.jetbrains.kotlin.plugin.compose'
4850 // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
4951 // hermesFlags = ["-O", "-output-source-map"]
5052
51- hermesCommand = " ../node_modules/react-native/node_modules/hermes-compiler/hermesc"
53+ def hermescDir = file(" ../node_modules/react-native/node_modules/hermes-compiler/hermesc" )
54+ def os = OperatingSystem . current()
55+
56+ if (os. isMacOsX()) {
57+ hermesCommand = " ${ hermescDir} /osx-bin/hermesc"
58+ } else if (os. isLinux()) {
59+ hermesCommand = " ${ hermescDir} /linux64-bin/hermesc"
60+ } else if (os. isWindows()) {
61+ hermesCommand = " ${ hermescDir} /win64-bin/hermesc.exe"
62+ } else {
63+ throw new GradleException (" Unsupported OS for Hermes compiler: " + OperatingSystem . current())
64+ }
5265
5366 /* Autolinking */
5467 autolinkLibrariesWithApp()
You can’t perform that action at this time.
0 commit comments