-
Notifications
You must be signed in to change notification settings - Fork 11
Hermes is working #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
f3c9344
a6539f1
fe061b9
0d95b4b
37b0d6e
0bb2e93
05403ec
4334b8f
64b3642
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,7 @@ | ||
| apply plugin: "com.android.application" | ||
|
|
||
| apply plugin: 'io.sentry.android.gradle' | ||
|
|
||
| import com.android.build.OutputFile | ||
|
|
||
| /** | ||
|
|
@@ -77,8 +79,9 @@ import com.android.build.OutputFile | |
| * ] | ||
| */ | ||
|
|
||
| // This is for enabling Hermes | ||
| project.ext.react = [ | ||
| enableHermes: false, // clean and rebuild if changing | ||
| enableHermes: true, // clean and rebuild if changing | ||
| ] | ||
|
|
||
| apply from: "../../node_modules/react-native/react.gradle" | ||
|
|
@@ -97,7 +100,7 @@ def enableSeparateBuildPerCPUArchitecture = false | |
| /** | ||
| * Run Proguard to shrink the Java bytecode in release builds. | ||
| */ | ||
| def enableProguardInReleaseBuilds = false | ||
| def enableProguardInReleaseBuilds = true | ||
|
|
||
| /** | ||
| * The preferred build flavor of JavaScriptCore. | ||
|
|
@@ -119,9 +122,11 @@ def jscFlavor = 'org.webkit:android-jsc:+' | |
| * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode | ||
| * and the benefits of using Hermes will therefore be sharply reduced. | ||
| */ | ||
| def enableHermes = project.ext.react.get("enableHermes", false); | ||
| def enableHermes = project.ext.react.get("enableHermes", true); | ||
|
|
||
| android { | ||
| ndkVersion rootProject.ext.ndkVersion | ||
|
|
||
| compileSdkVersion rootProject.ext.compileSdkVersion | ||
|
|
||
| compileOptions { | ||
|
|
@@ -170,11 +175,12 @@ android { | |
| variant.outputs.each { output -> | ||
| // For each separate APK per architecture, set a unique version code as described here: | ||
| // https://developer.android.com/studio/build/configure-apk-splits.html | ||
| // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc. | ||
| def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] | ||
| def abi = output.getFilter(OutputFile.ABI) | ||
| if (abi != null) { // null for the universal-debug, universal-release variants | ||
| output.versionCodeOverride = | ||
| versionCodes.get(abi) * 1048576 + defaultConfig.versionCode | ||
| defaultConfig.versionCode * 1000 + versionCodes.get(abi) | ||
| } | ||
|
|
||
| } | ||
|
|
@@ -184,10 +190,13 @@ android { | |
| dependencies { | ||
| implementation fileTree(dir: "libs", include: ["*.jar"]) | ||
| //noinspection GradleDynamicVersion | ||
| implementation "com.facebook.react:react-native:+" // From node_modules | ||
| implementation "com.facebook.react:react-native:0.64.0" // From node_modules | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you indicate in the README (and PR would be nice too) what the current supported version of React Native is for our demo? Nice job with getting to 0.64.0 as that's the latest. I know it was missing previously but we're slowly updating all our demo's so the framework/platform version we're building on is always indicated. Mobile demo's are very sensitive to changes in this too so it's good to document.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
|
|
||
| //AndroidX UX Widget, https://developer.android.com/jetpack/androidx/releases/swiperefreshlayout | ||
| implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" | ||
|
|
||
| //Flipper is a debugging tool for React Native, https://fbflipper.com/ | ||
|
|
||
| debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") { | ||
| exclude group:'com.facebook.fbjni' | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-all.zip | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you put in the README that we're on gradle 6.7? A lot of times when people clone our mobile demo's and get errors when running, it's because they're not on the right versions of Gradle, so it's good to know what was last worked with.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup, done |
||
| zipStoreBase=GRADLE_USER_HOME | ||
| zipStorePath=wrapper/dists | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome | |
|
|
||
| set JAVA_EXE=java.exe | ||
| %JAVA_EXE% -version >NUL 2>&1 | ||
| if "%ERRORLEVEL%" == "0" goto init | ||
| if "%ERRORLEVEL%" == "0" goto execute | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did your changes in If not, could you link me to the documentation you followed for this?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct, I did not make any direct changes to |
||
|
|
||
| echo. | ||
| echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. | ||
|
|
@@ -54,7 +54,7 @@ goto fail | |
| set JAVA_HOME=%JAVA_HOME:"=% | ||
| set JAVA_EXE=%JAVA_HOME%/bin/java.exe | ||
|
|
||
| if exist "%JAVA_EXE%" goto init | ||
| if exist "%JAVA_EXE%" goto execute | ||
|
|
||
| echo. | ||
| echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% | ||
|
|
@@ -64,28 +64,14 @@ echo location of your Java installation. | |
|
|
||
| goto fail | ||
|
|
||
| :init | ||
| @rem Get command-line arguments, handling Windows variants | ||
|
|
||
| if not "%OS%" == "Windows_NT" goto win9xME_args | ||
|
|
||
| :win9xME_args | ||
| @rem Slurp the command line arguments. | ||
| set CMD_LINE_ARGS= | ||
| set _SKIP=2 | ||
|
|
||
| :win9xME_args_slurp | ||
| if "x%~1" == "x" goto execute | ||
|
|
||
| set CMD_LINE_ARGS=%* | ||
|
|
||
| :execute | ||
| @rem Setup the command line | ||
|
|
||
| set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar | ||
|
|
||
|
|
||
| @rem Execute Gradle | ||
| "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% | ||
| "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* | ||
|
|
||
| :end | ||
| @rem End local scope for the variables with windows NT shell | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| defaults.url=https://sentry.io/ | ||
| defaults.org=testorg-az | ||
| defaults.project=mobile-webinar | ||
| defaults.project=reactnativeadamtest | ||
| auth.token=XXXX |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| defaults.url=https://sentry.io/ | ||
| defaults.org=testorg-az | ||
| defaults.project=mobile-webinar | ||
| defaults.project=adamreactnative | ||
| auth.token=XXXX |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious, are these the emulator commands you ended up using? Did you launch an emulator from CLI?
Or do you use the AVD through Android Studio?
if you could describe your workflow on this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done