Skip to content
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

Update to RN 0.61, Hermes #1704

Merged
merged 42 commits into from
Jan 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
0a0cfee
Try to match a default RN 061 app
hypest Dec 18, 2019
0a88d79
Some more updates
hypest Dec 18, 2019
c808857
Don't force resolve rn/cli
hypest Dec 18, 2019
f08eb6e
Needs commas
hypest Dec 18, 2019
679de7b
Match the allowBackup value from WordPress-Aztec-Android:glide-loader
hypest Dec 18, 2019
7dd0dfe
Using the Hermes binary
hypest Dec 18, 2019
c4873c9
Upgrade react-native-svg to 9.13.6-gb
hypest Dec 18, 2019
722e875
Replace the removed leftShift gradle operator
hypest Dec 18, 2019
ec6c216
Keep Hermes AARs around after node_modules cleanup, to use while buil…
hypest Dec 19, 2019
403b858
Let's try building on JitPack without installing SDKs manually
hypest Dec 19, 2019
3e6e104
Log the Hermes state
hypest Dec 19, 2019
e979814
Set the Hermes executor factory. Not sure if really needed
hypest Dec 19, 2019
1282f76
Upgrade react-native-video to 5.0.1
hypest Dec 20, 2019
20ccb07
Bump the bridge RN dep to 0.61.5 too
hypest Dec 20, 2019
300f8da
Remove some refs to JSC
hypest Dec 20, 2019
9be1794
Dep on Hermes only in the bridge lib
hypest Dec 20, 2019
9fe679b
Use an env var in CircleCI cache key for remotecontrol
hypest Dec 20, 2019
7c2237a
Upgrade all locked package versions
hypest Dec 20, 2019
ba322d2
Revert "Upgrade all locked package versions"
hypest Dec 20, 2019
a03777d
Bump react-native-svg ref
hypest Dec 20, 2019
c745e8c
Bump react-native-video ref
hypest Dec 20, 2019
8a41046
Update Gutenberg ref from gb-mobile develop
hypest Dec 20, 2019
5a169bd
Merge branch 'develop' into update-rn-0-61-and-inited-061-app
hypest Dec 20, 2019
467c96d
Update yarn.lock
hypest Dec 20, 2019
71f6d33
Try to bypass CI issue by pinning to an older lodash version
hypest Dec 20, 2019
d7af9d5
Revert "Try to bypass CI issue by pinning to an older lodash version"
hypest Dec 20, 2019
aafff36
Match @babel/core version to v0.61.5's init app
hypest Dec 20, 2019
381ddf9
Match @babel/runtime version to v0.61.5's init app
hypest Dec 20, 2019
7185a64
Upgrade the Slider lib ref
hypest Dec 20, 2019
ed7045e
Try bypassing CI yarn issue by serializing package fetches
hypest Dec 30, 2019
37c98d2
Merge branch 'develop' into update-rn-0-61-and-inited-061-app
hypest Dec 30, 2019
f60071b
Match e2e fix from cc5b1b4ef2cf146ae1a51f030eef9e4a0fc3f533
hypest Dec 30, 2019
1122824
Add implicit wait to Selenium
hypest Dec 30, 2019
2a9763a
Scroll content to reveal blocks at the end
hypest Dec 30, 2019
3609c9b
Update Gutenberg ref
hypest Dec 30, 2019
2fdbebe
Bump RN version to 0.61.5 inside GB too
hypest Dec 30, 2019
9b407af
Move the console statement out of the render()
hypest Dec 30, 2019
133a4f5
Update Gutenberg ref
hypest Dec 31, 2019
720ef39
Update iOS project file.
SergioEstevao Jan 9, 2020
69d92bd
Update Appium
SergioEstevao Jan 9, 2020
ce5fc4b
Merge branch 'develop' into update-rn-0-61-and-inited-061-app
SergioEstevao Jan 9, 2020
fd19ce2
Merge branch 'update-rn-0-61' into update-rn-0-61-and-inited-061-app
SergioEstevao Jan 9, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ commands:
- restore_cache:
name: Restore Yarn Cache
keys:
- yarn-i18n-v4-{{ .Environment.CIRCLE_JOB }}-{{ checksum "yarn.lock" }}
- yarn-i18n-v4-cache-v{{ .Environment.CACHE_TRIGGER_VERSION }}-job-{{ .Environment.CIRCLE_JOB }}-{{ checksum "yarn.lock" }}
- run:
name: Yarn Install
command: yarn install --frozen-lockfile --prefer-offline
command: yarn install --frozen-lockfile --prefer-offline --network-concurrency 1
- save_cache:
name: Save Yarn Cache
key: yarn-i18n-v4-{{ .Environment.CIRCLE_JOB }}-{{ checksum "yarn.lock" }}
key: yarn-i18n-v4-cache-v{{ .Environment.CACHE_TRIGGER_VERSION }}-job-{{ .Environment.CIRCLE_JOB }}-{{ checksum "yarn.lock" }}
paths:
- node_modules
- i18n-cache/data
Expand Down
2 changes: 2 additions & 0 deletions __device-tests__/gutenberg-editor-paragraph.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
clickBeginningOfElement,
stopDriver,
isAndroid,
swipeUp,
} from './helpers/utils';
import testData from './helpers/test-data';

Expand Down Expand Up @@ -115,6 +116,7 @@ describe( 'Gutenberg Editor tests for Paragraph Block', () => {
await editorPage.sendTextToParagraphBlockAtPosition( 1, testData.longText );

for ( let i = 3; i > 0; i-- ) {
await swipeUp( driver );
await editorPage.removeParagraphBlockAtPosition( i );
}
} );
Expand Down
4 changes: 3 additions & 1 deletion __device-tests__/pages/editor-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ export default class EditorPage {
this.accessibilityIdXPathAttrib = 'content-desc';
this.accessibilityIdKey = 'contentDescription';
}

driver.setImplicitWaitTimeout( 5000 );
}

async getBlockList() {
Expand Down Expand Up @@ -201,7 +203,7 @@ export default class EditorPage {
}

const parentLocator = `//*[contains(@${ this.accessibilityIdXPathAttrib }, "${ blockName } Block. Row ${ position }.")]`;
let removeBlockLocator = `${ parentLocator }/following-sibling::*`;
let removeBlockLocator = `${ parentLocator }`;
removeBlockLocator += isAndroid() ? '//*' : '//XCUIElementTypeButton';
let removeButtonIdentifier = `Remove block at row ${ position }`;

Expand Down
20 changes: 16 additions & 4 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ import com.android.build.OutputFile
*/

project.ext.react = [
entryFile: "index.js"
entryFile: "index.js",
enableHermes: true, // clean and rebuild if changing
]

apply from: "../../node_modules/react-native/react.gradle"
Expand All @@ -93,6 +94,15 @@ def enableSeparateBuildPerCPUArchitecture = false
*/
def enableProguardInReleaseBuilds = false

/**
* Whether to enable the Hermes VM.
*
* This should be set on project.ext.react and mirrored here. If it is not set
* 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);

android {
compileSdkVersion rootProject.ext.compileSdkVersion

Expand All @@ -113,7 +123,7 @@ android {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86", "arm64-v8a", "x86-64"
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
buildTypes {
Expand All @@ -126,8 +136,8 @@ android {
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3, "x86-64": 4]
// https://developer.android.com/studio/build/configure-apk-splits.html
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 =
Expand Down Expand Up @@ -161,3 +171,5 @@ task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
7 changes: 0 additions & 7 deletions android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,3 @@
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
1 change: 0 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
android:versionName="1.0">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>

<application
android:name=".MainApplication"
Expand Down
12 changes: 5 additions & 7 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,13 @@ project.ext.buildGutenbergFromSource = project.properties.getOrDefault('wp.BUILD
allprojects {
repositories {
mavenLocal()
google()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
maven {
// Local Maven repo containing AARs with JSC library built for Android
url "$rootDir/../node_modules/jsc-android/dist"
url("$rootDir/../node_modules/react-native/android")
}

google()
jcenter()
maven { url 'https://jitpack.io' }
}
}
3 changes: 2 additions & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

android.useAndroidX=true
android.enableJetifier=true
android.useAndroidX=true
3 changes: 3 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
rootProject.name = 'gutenberg'

apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)

include ':@react-native-community_slider'
project(':@react-native-community_slider').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/slider/src/android')
include ':react-native-video'
Expand Down
3 changes: 0 additions & 3 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"expo": {
"sdkVersion": "25.0.0"
},
"name": "gutenberg",
"displayName": "Gutenberg"
}
2 changes: 1 addition & 1 deletion gutenberg
Submodule gutenberg updated 342 files
Loading