Kudo / react-native-v8

Opt-in V8 runtime for React Native Android
MIT License
924 stars 69 forks source link

Different variant depending on buildType or ENV ? #55

Closed OlivierFreyssinet-old closed 3 years ago

OlivierFreyssinet-old commented 4 years ago

Is it possible to configure gradle so that it takes a different v8 variant depending on the app's buildType ?

I would like to use v8-nointl in production but v8-jit-nointl in debugging to avoid impacting the battery too much in prod but at the same time have the best development experience with blazing fast reloads thanks to JIT compilation.

If it was configured in app/build.gradle then I would do something like this:

dependencies {
  // ...
  debugImplementation  project(:'v8-jit-nointl')
  releaseImplementation project(:'v8-nointl')
}

The buildType is defined in app/build.gradle so I guess it's impossible to do it like this in the project's build.gradle, but is there a way to get to the same end result ? Maybe by using an environment variable ?

Kudo commented 4 years ago

It is possible for gradle to specify exact path. You could refer from hermes setup

Kudo commented 3 years ago

Going to close this issue as there are no further responses. Please feel free to reopen or open new one if there are any other problems.