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 React Native to 0.61.5 #1450

Merged
merged 109 commits into from
Jan 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
6f0ec76
Update React Native to 0.61.2
jtreanor Oct 3, 2019
91512f9
Update podspecs for 0.61.2
jtreanor Oct 3, 2019
08b581b
Fix TextInputState import
jtreanor Oct 14, 2019
3d670e9
Use unpatched react-native-svg since we are no longer using RN fork
jtreanor Oct 15, 2019
37dc045
Update Gutenberg.podspec for RN 0.61.x
jtreanor Oct 15, 2019
c9f1fa7
Update iOS project to use Cocoapods for all React dependencies
SergioEstevao Oct 17, 2019
e963bfb
Update project to use Swift 5
SergioEstevao Oct 17, 2019
e7582c7
Update build scripts for ios.
SergioEstevao Oct 17, 2019
6c82c54
Update generated podspec for RNSVG
jtreanor Oct 18, 2019
c305d5c
Add Gemfile to ensure we use a consistent version of CocoaPods
jtreanor Oct 18, 2019
180efb9
Update dependencies cache to cache Bundler and CocoaPods
jtreanor Oct 18, 2019
1da1e1d
Update Gradle to 5.5 and Gradle Plugin to 3.4.2
jtreanor Oct 18, 2019
9ce7cd6
Use Android 28
jtreanor Oct 18, 2019
00b022e
Remove remaining references to react-native-recyclerview-list
jtreanor Oct 18, 2019
08e3b32
Add org.wordpress:utils as dependency of react-native-gutenberg-bridge
jtreanor Oct 18, 2019
535191d
Upgrade react-native-modal to v11.4.0
hypest Oct 21, 2019
ba217a7
Whitespace adjustment
hypest Oct 21, 2019
335034c
Upgrade to react-native-svg 9.12.0
hypest Oct 21, 2019
9a58dd2
Point to new react-native-svg 9.12.0 branch
hypest Oct 22, 2019
ae8c383
Revert "Fix Android device tests for AndroidX migration (#1125)"
hypest Oct 23, 2019
f2f5b94
Revert "Upgrade react-native-modal to v11.4.0"
hypest Oct 23, 2019
5fb9eb8
Update Podfile.lock
hypest Oct 23, 2019
3157886
Merge branch 'develop' into update-rn-0-61
hypest Nov 21, 2019
3687f85
Fix test snapshot
hypest Nov 22, 2019
31666e9
Update subprojects references.
SergioEstevao Nov 26, 2019
8fdd471
Update aztec version number to be explicit.
SergioEstevao Nov 26, 2019
2172afe
No need to specific Aztec here because it come from RNTAztecView pod.
SergioEstevao Nov 26, 2019
72d11b2
Update lock file.
SergioEstevao Nov 26, 2019
dfe9687
Remove explicit dependency of Aztec.
SergioEstevao Nov 26, 2019
73408e6
Update package version to force podfile update in CircleCI
SergioEstevao Nov 26, 2019
a52c900
Update gemfile.lock
SergioEstevao Nov 26, 2019
00f29c7
Update preios script.
SergioEstevao Nov 26, 2019
9d67c14
Update Xcode version for CircleCI
SergioEstevao Nov 26, 2019
220b00f
Remove no longe needed actions to build the Aztec package
SergioEstevao Nov 26, 2019
6c2746b
Reverse update of gutenberg package version.
SergioEstevao Nov 26, 2019
64f41ef
Improve clean phase for iOS Aztec
SergioEstevao Nov 26, 2019
46da3b8
Update podspec files.
SergioEstevao Nov 26, 2019
12ba162
Update app bundles.
SergioEstevao Nov 26, 2019
af157d1
Merge branch 'develop' into update-rn-0-61
SergioEstevao Dec 10, 2019
fb664b3
Update GB reference.
SergioEstevao Dec 10, 2019
0c4d997
Update docker image.
SergioEstevao Dec 10, 2019
e8d3822
Add missing package from merge from develop.
SergioEstevao Dec 10, 2019
52f0f59
Update React_native_cli to version 3.0.4
SergioEstevao Dec 10, 2019
5ec0aae
Merge branch 'develop' into update-rn-0-61
hypest Dec 16, 2019
f7075ee
Update Gutenberg hash
hypest Dec 16, 2019
eed6c13
Update Gutenberg ref
hypest Dec 16, 2019
23ef941
Update Gutenberg ref
hypest Dec 17, 2019
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
b486601
Merge branch 'develop' into update-rn-0-61
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
673cdbd
Merge branch 'develop' into update-rn-0-61
hypest Dec 24, 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
a416a6c
Merge branch 'develop' into update-rn-0-61
SergioEstevao Jan 9, 2020
fd19ce2
Merge branch 'update-rn-0-61' into update-rn-0-61-and-inited-061-app
SergioEstevao Jan 9, 2020
df2f8d2
Merge pull request #1704 from wordpress-mobile/update-rn-0-61-and-ini…
SergioEstevao Jan 10, 2020
7e9812e
Update SVG library to master in fork
SergioEstevao Jan 10, 2020
52623ac
Update React Native Video lib
SergioEstevao Jan 10, 2020
4c5d8bf
Update podspecs
SergioEstevao Jan 10, 2020
221dbdd
Merge branch 'develop' into update-rn-0-61
hypest Jan 22, 2020
376a829
Update JS bundles and strings
hypest Jan 22, 2020
460765b
Merge branch 'develop' into update-rn-0-61 and to GB master
hypest Jan 22, 2020
ca6d37a
Bump Gutenberg hash
hypest Jan 22, 2020
1f807b4
Update bundles and strings
hypest Jan 22, 2020
a99c494
Bump Gutenberg hash, changes only in check-license script
hypest Jan 22, 2020
8fbeb0c
Update iOS project podfile references to Aztec
SergioEstevao Jan 24, 2020
9e2128e
Update forked svg and video libraries hashes.
SergioEstevao Jan 24, 2020
84dc527
Merge branch 'develop' into update-rn-0-61
hypest Jan 24, 2020
f44f7fe
Update reference to Aztec.
SergioEstevao Jan 24, 2020
0f51626
Update GB reference.
SergioEstevao Jan 24, 2020
26b49ac
Update Gutenberg ref
hypest Jan 24, 2020
bce989d
Update Gutenberg ref
hypest Jan 24, 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
21 changes: 12 additions & 9 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 Expand Up @@ -112,20 +112,23 @@ jobs:
- restore_cache:
name: Restore Dependencies Cache
keys:
- dependencies-v2-{{ checksum "react-native-aztec/ios/Cartfile.resolved" }}-{{
- dependencies-v3-{{ checksum "ios/Gemfile.lock" }}-{{ checksum "ios/Podfile.lock" }}-{{
checksum "yarn.lock" }}
- dependencies-v2-{{ checksum "react-native-aztec/ios/Cartfile.resolved" }}
- dependencies-v2-
- dependencies-v3-{{ checksum "ios/Gemfile.lock" }}-{{ checksum "ios/Podfile.lock" }}
- dependencies-v3-{{ checksum "ios/Gemfile.lock" }}
- dependencies-v3-
- run:
name: Yarn preios (if needed)
command: test -e ios/build/gutenberg/Build/Products/Release-iphonesimulator/gutenberg.app || yarn preios
- save_cache:
name: Save Dependencies Cache
key: dependencies-v2-{{ checksum "react-native-aztec/ios/Cartfile.resolved" }}-{{
key: dependencies-v3-{{ checksum "ios/Gemfile.lock" }}-{{ checksum "ios/Podfile.lock" }}-{{
checksum "yarn.lock" }}
paths:
- react-native-aztec/ios/Carthage
- ~/.rncache
- ios/Pods
- ~/Library/Caches/CocoaPods
- ~/.cocoapods/repos/trunk
- ios/vendor
- run:
name: Build (if needed)
command: test -e ios/build/gutenberg/Build/Products/Release-iphonesimulator/gutenberg.app || yarn react-native run-ios --configuration Release --no-packager
Expand Down
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = {
},
react: {
pragma: "React",
version: "16.8.3",
version: "detect",
flowVersion: "0.92.0",
},
},
Expand Down
3 changes: 0 additions & 3 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@
<PROJECT_ROOT>/node_modules/jest-enzyme/.*
<PROJECT_ROOT>/node_modules/enzyme-matchers/.*

; Ignore react-native-recyclerview-list example app
<PROJECT_ROOT>/node_modules/react-native-recyclerview-list/example

; Ignore immutable-js. See https://github.com/facebook/immutable-js/issues/1308
<PROJECT_ROOT>/node_modules/immutable/.*

Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,8 @@ bin/wp-cli.phar

# Report generated from jest-junit
/junit.xml

# Cocoapods

ios/Pods
ios/vendor
2 changes: 1 addition & 1 deletion Gutenberg.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ Pod::Spec.new do |s|
s.swift_version = '5.0'

s.dependency 'React', react_native_version
s.dependency 'React-CoreModules', react_native_version
s.dependency 'React-RCTImage', react_native_version

s.dependency 'WordPress-Aztec-iOS'
s.dependency 'RNTAztecView'
end
2 changes: 1 addition & 1 deletion RNTAztecView.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ Pod::Spec.new do |s|
s.xcconfig = {'OTHER_LDFLAGS' => '-lxml2',
'HEADER_SEARCH_PATHS' => '/usr/include/libxml2'}
s.dependency 'React-Core'
s.dependency 'WordPress-Aztec-iOS'
s.dependency 'WordPress-Aztec-iOS', '1.15.0'

end
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
23 changes: 2 additions & 21 deletions __device-tests__/helpers/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,28 +116,9 @@ const setupDriver = async () => {

await driver.setImplicitWaitTimeout( 2000 );
await timer( 3000 );
await driver.setOrientation( 'PORTRAIT' );

// Proxy driver to patch functions on Android
// This is needed to adapt to changes in the way accessibility ids are being
// assigned after migrating to AndroidX and React Native 0.60. See:
// https://github.com/wordpress-mobile/gutenberg-mobile/pull/1112#issuecomment-501165250
// for more details.
return new Proxy( driver, {
get: ( original, property ) => {
const propertiesToPatch = [
'elementByAccessibilityId',
'hasElementByAccessibilityId',
];
if ( isAndroid() && ( propertiesToPatch.includes( property ) ) ) {
return async function( value, cb ) {
// Add a comma and a space to all ids
return await original[ property ]( `${ value }, `, cb );
};
}
return original[ property ];
},
} );
await driver.setOrientation( 'PORTRAIT' );
return driver;
};

const stopDriver = async ( driver: wd.PromiseChainWebdriver ) => {
Expand Down
24 changes: 7 additions & 17 deletions __device-tests__/pages/editor-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ export default class EditorPage {
imageBlockName = 'Image';
galleryBlockName = 'Gallery';

// This is needed to adapt to changes in the way accessibility ids are being
// assigned after migrating to AndroidX and React Native 0.60. See:
// https://github.com/wordpress-mobile/gutenberg-mobile/pull/1112#issuecomment-501165250
// for more details.
accessibilityIdSuffix = '';

constructor( driver: wd.PromiseChainWebdriver ) {
this.driver = driver;
this.accessibilityIdKey = 'name';
Expand All @@ -36,8 +30,9 @@ export default class EditorPage {
if ( isAndroid() ) {
this.accessibilityIdXPathAttrib = 'content-desc';
this.accessibilityIdKey = 'contentDescription';
this.accessibilityIdSuffix = ', ';
}

driver.setImplicitWaitTimeout( 5000 );
}

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

async getTextViewForHtmlViewContent() {
const accessibilityId = `html-view-content${ this.accessibilityIdSuffix }`;
const accessibilityId = 'html-view-content';
let blockLocator = `//*[@${ this.accessibilityIdXPathAttrib }="${ accessibilityId }"]`;

if ( ! isAndroid() ) {
Expand Down Expand Up @@ -177,13 +172,11 @@ export default class EditorPage {
if ( ! await this.hasBlockAtPosition( position, blockName ) ) {
throw Error( `No Block at position ${ position }` );
}
const parentId = `${ blockName } Block. Row ${ position }.${ this.accessibilityIdSuffix }`;
const parentLocator = `//*[@${ this.accessibilityIdXPathAttrib }="${ parentId }"]`;

const blockId = `Move block up from row ${ position } to row ${ position - 1 }${ this.accessibilityIdSuffix }`;
const parentLocator = `//*[@${ this.accessibilityIdXPathAttrib }="${ blockName } Block. Row ${ position }."]`;
let blockLocator = `${ parentLocator }/following-sibling::*`;
blockLocator += isAndroid() ? '' : '//*';
blockLocator += `[@${ this.accessibilityIdXPathAttrib }="${ blockId }"]`;
blockLocator += `[@${ this.accessibilityIdXPathAttrib }="Move block up from row ${ position } to row ${ position - 1 }"]`;
const moveUpButton = await this.driver.elementByXPath( blockLocator );
await moveUpButton.click();
}
Expand All @@ -194,13 +187,10 @@ export default class EditorPage {
throw Error( `No Block at position ${ position }` );
}

const parentId = `${ blockName } Block. Row ${ position }.`;
const parentLocator = `//*[contains(@${ this.accessibilityIdXPathAttrib }, "${ parentId }")]`;

const blockId = `Move block down from row ${ position } to row ${ position + 1 }${ this.accessibilityIdSuffix }`;
const parentLocator = `//*[contains(@${ this.accessibilityIdXPathAttrib }, "${ blockName } Block. Row ${ position }.")]`;
let blockLocator = `${ parentLocator }/following-sibling::*`;
blockLocator += isAndroid() ? '' : '//*';
blockLocator += `[@${ this.accessibilityIdXPathAttrib }="${ blockId }"]`;
blockLocator += `[@${ this.accessibilityIdXPathAttrib }="Move block down from row ${ position } to row ${ position + 1 }"]`;
const moveDownButton = await this.driver.elementByXPath( blockLocator );
await moveDownButton.click();
}
Expand Down
21 changes: 16 additions & 5 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 All @@ -149,7 +159,6 @@ dependencies {
implementation project(':react-native-video')
implementation project(':react-native-svg')
implementation project(':react-native-aztec')
implementation project(':react-native-recyclerview-list')
implementation project(':react-native-gutenberg-bridge')
implementation "org.wordpress:utils:$wordpressUtilsVersion"
implementation 'androidx.appcompat:appcompat:1.0.0'
Expand All @@ -162,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
2 changes: 0 additions & 2 deletions android/app/src/main/java/com/gutenberg/MainApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import org.wordpress.mobile.ReactNativeGutenbergBridge.GutenbergBridgeJS2Parent;
import org.wordpress.mobile.ReactNativeGutenbergBridge.RNReactNativeGutenbergBridgePackage;

import com.github.godness84.RNRecyclerViewList.RNRecyclerviewListPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
Expand Down Expand Up @@ -131,7 +130,6 @@ protected List<ReactPackage> getPackages() {
new ReactVideoPackage(),
new SvgPackage(),
new ReactAztecPackage(),
new RNRecyclerviewListPackage(),
mRnReactNativeGutenbergBridgePackage);
}

Expand Down
14 changes: 6 additions & 8 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
buildscript {
ext {
gradlePluginVersion = '3.3.1'
gradlePluginVersion = '3.4.2'
kotlinVersion = '1.3.11'
buildToolsVersion = "28.0.3"
minSdkVersion = 21
Expand All @@ -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
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip
5 changes: 3 additions & 2 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 All @@ -7,8 +10,6 @@ include ':react-native-svg'
project(':react-native-svg').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-svg/android')
include ':react-native-aztec'
project(':react-native-aztec').projectDir = new File(rootProject.projectDir, '../react-native-aztec/android')
include ':react-native-recyclerview-list'
project(':react-native-recyclerview-list').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-recyclerview-list/android')
include ':react-native-gutenberg-bridge'
project(':react-native-gutenberg-bridge').projectDir = new File(rootProject.projectDir, '../react-native-gutenberg-bridge/android')

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"
}
7 changes: 2 additions & 5 deletions bin/generate-podspecs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ DEST="${WD}/react-native-gutenberg-bridge/third-party-podspecs"
EXTERNAL_PODSPECS=$(find "node_modules/react-native/third-party-podspecs" \
"node_modules/react-native-svg" \
"node_modules/react-native-keyboard-aware-scroll-view" \
"node_modules/react-native-recyclerview-list" \
"node_modules/react-native-safe-area" \
"node_modules/react-native-dark-mode" -type f -name "*.podspec" -print)

Expand All @@ -34,7 +33,7 @@ done
# Change to the React Native directory to get relative paths for the RN podspecs
cd "node_modules/react-native"

RN_PODSPECS=$(find * -type f -name "*.podspec" -not -path "third-party-podspecs/*" -print)
RN_PODSPECS=$(find * -type f -name "*.podspec" -not -path "third-party-podspecs/*" -not -path "*Fabric*" -print)
TMP_DEST=$(mktemp -d)

for podspec in $RN_PODSPECS
Expand All @@ -49,7 +48,5 @@ do
# Add a "prepare_command" entry to each podspec so that 'pod install' will fetch sources from the correct directory
# and retains the existing prepare_command if it exists
prepare_command="TMP_DIR=\$(mktemp -d); mv * \$TMP_DIR; cp -R \"\$TMP_DIR/${path}\"/* ."
cat "$TMP_DEST/$pod.podspec.json" | jq --arg CMD "$prepare_command" '.prepare_command = "\($CMD) && \(.prepare_command // true)"
# Point to React Native fork. To be removed once https://github.com/facebook/react-native/issues/25349 is closed
| .source.git = "https://github.com/jtreanor/react-native.git"' > "$DEST/$pod.podspec.json"
cat "$TMP_DEST/$pod.podspec.json" | jq --arg CMD "$prepare_command" '.prepare_command = "\($CMD) && \(.prepare_command // true)"' > "$DEST/$pod.podspec.json"
done
Loading