Граф коммитов

333 Коммитов

Автор SHA1 Сообщение Дата
Sam Goldman def3ebe3fd @allow-large-files Deploy Flow v0.110.0
Summary: Changelog: [Internal]

Reviewed By: dsainati1

Differential Revision: D18054545

fbshipit-source-id: 80d88a8004cb3172e4079ff10a4c11741adf2a6f
2019-10-21 22:30:39 -07:00
Frieder Bluemle ff6b2ff325 Update Gradle wrapper to 5.6.3 (#26915)
Summary:
Gradle wrapper `5.6.3`

## Changelog

[Android] [Changed] - Gradle wrapper 5.6.3
Pull Request resolved: https://github.com/facebook/react-native/pull/26915

Test Plan: Builds successfully.

Differential Revision: D18045686

Pulled By: mdvacca

fbshipit-source-id: b2cbe91c42c61aa340c1169d2555c9d821fcf11f
2019-10-21 13:30:52 -07:00
Maksym Rusynyk a0d8740878 Android template: Allow overriding default "index.js" entry file (#26769)
Summary:
- Using "System.getenv" allows to specify any entry file using environment variables and without modifying gradle file. Example:

    export ENTRY_FILE="another_entry_file.js"
    ./gradlew assembleDebug

- This functionality is also more align with iOS implementation that uses 'if [[ "$ENTRY_FILE" ]]; then'. See https://github.com/facebook/react-native/pull/23667 for more details.

- Possibility to define entry file on CI without modifying sources (Example: project like [pixels-catcher](https://www.npmjs.com/package/pixels-catcher) requires different entry file)

## Changelog:

[Android] [Added]  - Custom entry file on android using `ENTRY_FILE` environment variable
Pull Request resolved: https://github.com/facebook/react-native/pull/26769

Test Plan:
- Create a project from template

- Define `ENTRY_FILE` environment variable

```
export ENTRY_FILE="anotherIndexFile.js"
```

- Build android

```
./gradlew assembleDebug
```

Expected result: App contains bundle file that starts from `anotherIndexFile.js` file.

Differential Revision: D17903165

Pulled By: cpojer

fbshipit-source-id: 6b7cdf229918d101c170aa5fbdca6f3ef293d41c
2019-10-13 23:41:15 -07:00
Daniel Sainati b786cd6d69 v0.109.0 in xplat
Summary:
flowboi

allow-large-files

Reviewed By: gabelevi

Differential Revision: D17729593

fbshipit-source-id: 20575b072540497b64fbe63a92d4827eaab78fc4
2019-10-04 16:42:08 -07:00
Frieder Bluemle 6aae8e0756 Update Android Gradle plugin to 3.5.1 (#26694)
Summary:
Android Studio 3.5.1 is now available in the stable channel

https://androidstudio.googleblog.com/2019/10/android-studio-351-available.html

## Changelog

[Android] [Changed] - Update Android Gradle plugin to 3.5.1
Pull Request resolved: https://github.com/facebook/react-native/pull/26694

Test Plan: Build project

Differential Revision: D17729849

Pulled By: cpojer

fbshipit-source-id: 0a0ba7a38ff5be096b56a6470c3ea4912a053d94
2019-10-02 17:44:29 -07:00
Frieder Bluemle d98ff02433 Fix template whitespace error (#26631)
Summary:
Very small update here. 0fcaca8e26 accidentally introduced a whitespace error (trailing whitespace) in an iOS test file - This whitespace error is now propagated into all new projects generated by `react-native init`. This fixes it.

## Changelog

[iOS] [Fixed] - Template whitespace error
Pull Request resolved: https://github.com/facebook/react-native/pull/26631

Test Plan: N/A

Differential Revision: D17661040

Pulled By: cpojer

fbshipit-source-id: 1858d2fe238d139894738187ec73f1e27e306294
2019-09-29 18:03:35 -07:00
Han Lin Yap babf67f11c Upgrade all dependencies in package.json template (#26563)
Summary:
Upgrade all dependencies in package.json template

## Changelog

[General] [Changed] - Upgrade to latest dependencies in package.json template
Pull Request resolved: https://github.com/facebook/react-native/pull/26563

Differential Revision: D17589559

Pulled By: cpojer

fbshipit-source-id: edbc9da11a850e01d00e77d9e689d9278a05f6fd
2019-09-25 22:03:45 -07:00
Mats Byrkjeland 46090b0e56 Make RelativeImageStub regex match images in scoped packages (#26567)
Summary:
I am importing an image from a scoped package and I expected this to be recognized by the `module.name_mapper` and treated as a `RelativeImageStub`. But since there's an `@` in the path, the string does not match the regex pattern as it is defined today. Therefore I added the possibility of a `@` in the start of the path to the regex pattern.

Example import not recognized by the name_mapper today:
```
import NicePicture from 'example-pkg/assets/nice-picture.png'
```

## Changelog

[General] [Fixed] - Make RelativeImageStub regex match images in scoped packages
Pull Request resolved: https://github.com/facebook/react-native/pull/26567

Test Plan:
* I have run `yarn flow` in the `react-native` project
* I tested that it resolves my issue with images in scoped packages in my own app's repo

Differential Revision: D17589473

Pulled By: cpojer

fbshipit-source-id: d0c18f2b36456fd974012a0605f3d9ceff0ad744
2019-09-25 18:27:27 -07:00
Mike Vitousek d34bc5fa64 Upgrade to Flow v0.108.0
Reviewed By: gabelevi

Differential Revision: D17488182

fbshipit-source-id: e67c5bcbd9f0bda49d52531387d92d7c83a01f21
2019-09-20 13:37:25 -07:00
Ramanpreet Nara 4c998fd05d Rename JSCallInvoker{,Holder} to CallInvoker{,Holder}
Summary:
## Motivation
The concept behind JSCallInvoker doesn't necessarily have to apply only to the JS thread. On Android, we need to re-use this abstraction to allow execution of async method calls on the NativeModules thread.

Reviewed By: PeteTheHeat

Differential Revision: D17377313

fbshipit-source-id: 3d9075cbfce0b908d800a366947cfd16a3013d1c
2019-09-20 10:52:56 -07:00
Frieder Bluemle 3e4c5c09c3 Remove ignored iOS schemes from template (#26471)
Summary:
The merge of https://github.com/facebook/react-native/issues/25451 added `xcshareddata` to the .gitignore file in `template`. Two xcscheme files in the `xcschemes` subfolder were still left in the template and should have been removed at the same time.

The project opens and builds fine without the xcscheme files both from command line and in Xcode.

## Changelog

[iOS] [Changed] - Remove ignored iOS schemes from template
Pull Request resolved: https://github.com/facebook/react-native/pull/26471

Test Plan:
Generate new project, remove files, verify that project builds, and opens correctly in Xcode.

Please review karanjthakkar satya164 kelset

Differential Revision: D17491748

Pulled By: cpojer

fbshipit-source-id: 391545293c2d09d52f78f56cd91cef5dcf036a9a
2019-09-19 17:26:24 -07:00
sunnylqm 811401bcac Bump hermes to v0.2.1 (#26451)
Summary:
Bump hermes to v0.2.1

allow-large-files

## Changelog

See https://github.com/facebook/hermes/releases/tag/v0.2.1

[Android] [Changed] - Bump hermes to v0.2.1
Pull Request resolved: https://github.com/facebook/react-native/pull/26451

Test Plan: RNTester builds and runs as expected

Differential Revision: D17394921

Pulled By: cpojer

fbshipit-source-id: 07ce5da3517b7aa24bfb5e1f6eefed6cdc9f5cb5
2019-09-18 04:40:38 -07:00
Kacper Wiszczuk 83a16b16c9 fix: prevent activity recreation on theme change (#26413)
Summary:
On Android 10 whole activity is recreated when the user changes system theme. We should prevent it by adding `uiMode` in `android:configChanges` key in the default template.

## Changelog

[Android] [Fixed] - Android 10: Prevent activity recreation on theme change
Pull Request resolved: https://github.com/facebook/react-native/pull/26413

Test Plan: NOOP

Differential Revision: D17342811

Pulled By: cpojer

fbshipit-source-id: 2bed9b5f91e1b67451fefe34b02a1129d6c80d15
2019-09-12 05:10:58 -07:00
Christoph Nakazawa e54ecf907e Move `react-native-implementation.js` to `index.js`
Summary: I am unsure whether there was a reason not to use an `index.js` file from the beginning. It always struck me as confusing and odd to have the main API hidden in a folder somewhere. This changes RN to use the standard `index.js` file that is common in almost all JavaScript packages.

Reviewed By: yungsters, rubennorte

Differential Revision: D17314423

fbshipit-source-id: 10eaf4fddd41e91163de7d10c0879b623dab00d7
2019-09-12 03:29:51 -07:00
Jakob Krigovsky cc35d0f1bc Fix typos in comments about use_frameworks! (#26381)
Summary:
Fixes typos in code comments about CocoaPods’s `use_frameworks!`.

## Changelog

[Internal] [Fixed] - Fix typos in comments about `use_frameworks!`
Pull Request resolved: https://github.com/facebook/react-native/pull/26381

Test Plan: Considering this only changes code comments, I don’t think this pull request needs a test plan.

Differential Revision: D17258856

Pulled By: cpojer

fbshipit-source-id: fd9a7253ef9744685c233ebbec7df9eea50a8d28
2019-09-09 07:23:59 -07:00
Max Thirouin e6b2cf0418 Fix incorrect `module.name_mapper` in template .flowconfig (#26330)
Summary:
Has explained in https://github.com/facebook/react-native/issues/26233, current template is incorrect & can create error, like having require() of png that are considered as `string` instead of `number. This can probably hide tons of similar mistakes.

The change in this PR should resolve the previous behavior (& for example, some places in previous version of the flowconfig have the full path like here 35300147ca/template/_flowconfig (L61))

Closes https://github.com/facebook/react-native/issues/26233

## Changelog

```
[General] [Fixed] Fix incorrect `module.name_mapper` in template .flowconfig
```

Alternatively, message could be

```
[General] [Internal] Fix incorrect `module.name_mapper` in template .flowconfig
```

As it hasn't this "bug" hasn't been released in a public stable release. You decide
Pull Request resolved: https://github.com/facebook/react-native/pull/26330

Test Plan: I just tested this in my project, thymikee might be able to confirm & approve this PR.

Differential Revision: D17258891

Pulled By: cpojer

fbshipit-source-id: 3904ffbc6f076ee0e435311249d694b8604fc7b8
2019-09-09 06:45:38 -07:00
Frieder Bluemle 87f94d5587 Skip lint check for dynamic react-native version (#26222)
Summary:
The `dependencies` section in the `build.gradle` Android template contains this line:

    implementation "com.facebook.react:react-native:+"  // From node_modules

It causes the following Gradle Lint warning:

> Avoid using '+' in version numbers, can lead to unpredictable or unrepeatable builds

In this case, as the `// From node_modules` comment suggests, the version is _not_ determined by Gradle but by the version specified in `package.json` - Using "+" is completely fine and intentional.

Therefore it can safely be ignored, which is what the added `//noinspection` comment does.

## Changelog

[Android] [Fixed] - Skip lint check for dynamic react-native version
Pull Request resolved: https://github.com/facebook/react-native/pull/26222

Test Plan: Projects generated with the new template no longer cause the warning anymore.

Differential Revision: D17091476

Pulled By: osdnk

fbshipit-source-id: 910b4ecf22ccd11cade9427af68087ffcce8bc8e
2019-09-09 06:33:06 -07:00
Ram N e8541e03f4 Add React Dev tools to the default template
Reviewed By: PeteTheHeat

Differential Revision: D17222891

fbshipit-source-id: ea3ce9b2285f67dc01cd11c66ce4a41a4c4ea958
2019-09-06 19:42:30 -07:00
Ram N 04a011236b Fix Imports in React Native template
Summary: Looks like some of the imports went missing when merging. Found this when testing this again.

Reviewed By: mdvacca

Differential Revision: D17200737

fbshipit-source-id: ded39493786d4999317c5e29be270e5990601b06
2019-09-06 19:39:40 -07:00
Nat Mote 20a4ac9854 Upgrade to v0.107.0
Reviewed By: gabelevi

Differential Revision: D17219316

fbshipit-source-id: c654fd51f8a575a7d810759893273cb6a2b501d6
2019-09-06 11:07:05 -07:00
Frieder Bluemle b1c954b1f1 Update Gradle wrapper to 5.6.2 (#26349)
Summary:
Gradle wrapper `5.6.2`

Supersedes and closes https://github.com/facebook/react-native/issues/26227

## Changelog

[Android] [Changed] - Gradle wrapper 5.6.2
Pull Request resolved: https://github.com/facebook/react-native/pull/26349

Test Plan: Builds successfully (just like the current `master` branch, **only** after either reverting 4763000554 **or** cherry-picking 7f238785ec898560c276d1d37b4c88b7018c245b from https://github.com/facebook/react-native/issues/26314)

Differential Revision: D17224299

Pulled By: mdvacca

fbshipit-source-id: cbd1b3d5d686e284fdc8e3f6faaeaa93654b301d
2019-09-06 00:25:53 -07:00
Ram N 24de443bac Add Fresco Image Plugin
Reviewed By: mdvacca

Differential Revision: D15751118

fbshipit-source-id: 75a8b65b276968462f8e3e3cff6d8f95fd62e8cd
2019-09-03 16:59:33 -07:00
Ram N 70274f4e91 Add code to enable Flipper in React Native iOS Template
Reviewed By: rickhanlonii

Differential Revision: D6997542

fbshipit-source-id: c8f7280b52febabb0a987df5dffadf957dadd1fb
2019-09-03 16:33:11 -07:00
Ram N 755ad3b33a Move ReactNativeFlipper class to template
Reviewed By: mdvacca

Differential Revision: D6101369

fbshipit-source-id: e1ae8f57136dd568b7c14fa873a50bb490d73808
2019-09-03 16:28:24 -07:00
glevi@fb.com b31056d802 Deploy v0.106.3 to xplat/js
Reviewed By: jbrown215

Differential Revision: D17120458

fbshipit-source-id: b1f097acffcf277b624910a3c4d7141ef5f352ad
2019-08-30 08:18:13 -07:00
Ram N 82a8080f07 Change podspec name of yoga to Yoga
Summary:
Needed to capitalize the name, since this is the convention used elsewhere too

## Changelog:

[iOS] [Changed] - Renamed yoga podspec to Yoga

Reviewed By: shergin

Differential Revision: D17127104

fbshipit-source-id: 14047bf452edda000037701f4ba7f4a02a0e717b
2019-08-30 07:12:34 -07:00
Dulmandakh 4763000554 bump android gradle plugin to 3.5.0 (#26129)
Summary:
Android Gradle Plugin 3.5.0 released with a lot of improvements and bug fixes. It's important to have this change merged before 0.61 release. See https://developer.android.com/studio/releases/gradle-plugin

## Changelog

[Android] [Changed] - bump android gradle plugin to 3.5.0
Pull Request resolved: https://github.com/facebook/react-native/pull/26129

Test Plan: RNTester builds and runs as expected

Reviewed By: mdvacca

Differential Revision: D17091520

Pulled By: osdnk

fbshipit-source-id: 232b9209526e62a7344d74422fd8471a03dec7f4
2019-08-29 07:35:41 -07:00
Frieder Bluemle be2a2529af Update Gradle wrapper to 5.6 (#26079)
Summary:
```
Welcome to Gradle 5.6!

Here are the highlights of this release:
 - Incremental Groovy compilation
 - Groovy compile avoidance
 - Test fixtures for Java projects
 - Manage plugin versions via settings script

For more details see https://docs.gradle.org/5.6/release-notes.html
```

## Changelog

[Android] [Changed] - Gradle wrapper 5.6
Pull Request resolved: https://github.com/facebook/react-native/pull/26079

Test Plan: Ran build and tests locally.

Differential Revision: D17054310

Pulled By: mdvacca

fbshipit-source-id: de7ba3a6d04058e51b8bc6a21d5a3f828ef8bc25
2019-08-26 12:13:37 -07:00
glevi@fb.com 97b42bb142 Deploy v0.106.0 to xplat/js
Reviewed By: mroch

Differential Revision: D16979246

fbshipit-source-id: 995fbd391823eaf0c9e3a673cf8fbe061ce0545a
2019-08-23 08:06:44 -07:00
Ram N bb272bacca Don't enable Flipper in React Native by default
Summary:
Removing default integration of Flipper from OSS till discussions happen.

To enable Flipper, just download the Flipper desktop app and uncomment the line in MainApplication.java. Flipper should automatically connect to your app.

Reviewed By: rickhanlonii

Differential Revision: D6654890

fbshipit-source-id: 692cf04fec3273703c0571d04f0100c0dbb8269b
2019-08-19 07:35:47 -07:00
Ram N 3a66fc7dcb Add Flipper to React Native OSS by default
Reviewed By: passy

Differential Revision: D6723578

fbshipit-source-id: f34442689f99cd94220335a171010224a12132a8
2019-08-12 14:56:02 -07:00
iyegoroff 1a92cf9b2a Added jitpack repository to template (#25987)
Summary:
This PR will eliminate additional manual installation step for third-party RN libraries that include jitpack-published dependencies.

## Changelog

[Android] [Added] - Added jitpack repository to template
Pull Request resolved: https://github.com/facebook/react-native/pull/25987

Test Plan: No testing required.

Differential Revision: D16763401

Pulled By: cpojer

fbshipit-source-id: 72ff0146bd20c61a27b244f2dc7fea50781a4d1a
2019-08-12 07:32:36 -07:00
Jakob Krigovsky 9b0adb5ad1 Fix indentation in Gradle files (#26012)
Summary:
Fixes indentation in `*.gradle` files by using four-space indents [as specified in `.editorconfig`](0ccedf3964/.editorconfig (L13-L14)).

## Changelog

[Internal] [Fixed] - Fix indentation in Gradle files
Pull Request resolved: https://github.com/facebook/react-native/pull/26012

Test Plan: Considering [the diff consists of whitespace changes only](https://github.com/facebook/react-native/compare/master...sonicdoe:gradle-indentation?w=1), I think this is safe to merge if the test suite passes.

Differential Revision: D16761514

Pulled By: cpojer

fbshipit-source-id: 9b035b5c6b35a70b2b54fe35416840fb90a0c6b1
2019-08-12 02:45:57 -07:00
Avik Chaudhuri b1ca5be68a @allow-large-files flow 0.105 xplat deploy
Summary:
bypass-lint
allow_many_files

Reviewed By: jbrown215

Differential Revision: D16753543

fbshipit-source-id: 1db37b56c1bb84b547e302dfe13ea0c9787deace
2019-08-11 00:22:31 -07:00
Logan Daniels 9127fb51fc Manual fixes for xplat/js/react-native-github
Summary:
Need to add explicit type annotations in these areas to unblock types-first architecture for Flow. These are locations the codemod could not automatically handle.

I'll call out areas I need a close eye on in the comments.

Reviewed By: panagosg7

Differential Revision: D16659053

fbshipit-source-id: 167dd2abe093019b128676426374c1c62cf71e7f
2019-08-09 10:11:15 -07:00
Kid Commit 7cac6a4b6c Update App.js (#25905)
Summary:
use "shorthand" of `Fragment`

No need to import `Fragment` as it can be used via `<></>` vs `<Fragment><Fragment />`

## Changelog
Use shorthand for Fragment in App.js

[General] [Changed] - Use shorthand for Fragment in App.js
Pull Request resolved: https://github.com/facebook/react-native/pull/25905

Test Plan: Ci Tests should be sufficient

Differential Revision: D16666166

Pulled By: cpojer

fbshipit-source-id: 70e2c9793087bf8f5e0a5477c75f178134cbd6a1
2019-08-06 03:58:13 -07:00
sunnylqm c21e36db45 Bump hermes to v0.1.1 (#25908)
Summary:
Hermes has been updated to [v0.1.1](https://github.com/facebook/hermes/releases/tag/v0.1.1) and [renamed from 'hermesvm' to 'hermes-engine'](c74842ee5c)

## Changelog

[Android] [Changed] - Bump hermes to v0.1.1
Pull Request resolved: https://github.com/facebook/react-native/pull/25908

Test Plan: RNTester builds and runs as expected

Differential Revision: D16645811

Pulled By: cpojer

fbshipit-source-id: 4fb6a3160df2c6d08140dd1fee51acf9ff8baffc
2019-08-05 12:58:25 -07:00
Marshall Roch 59db059dbd upgrade to flow v0.104.0
Reviewed By: dsainati1

Differential Revision: D16523758

fbshipit-source-id: 8816a6b93415b9967888217dd6d0642830d5ed1d
2019-07-26 19:21:32 -07:00
cpojer d7f5153cd8 Add Hermes support to React Native on Android (#25613)
Summary:
Yesterday we shipped hermesengine.dev as part of the current 0.60 release. This PR brings those changes to master.

## Changelog

[General] [Added] - Added support for Hermes
Pull Request resolved: https://github.com/facebook/react-native/pull/25613

Test Plan:
* CI is green both on GitHub and at FB
* Creating a new app from source can use Hermes on Android

Reviewed By: cpojer

Differential Revision: D16221777

Pulled By: willholen

fbshipit-source-id: aa6be10537863039cb666292465ba2e1d44b64ef
2019-07-25 23:05:53 -07:00
Kid Commit fee7f0617e build(gradle): update build.gradle (#25810)
Summary:
Remove obsolete supportLibVersion - no longer required with AndroidX

Removing the `supportLibVersion` variable that was used in `app/build.gradle` to suffix version numbers on android support libraries.
As react-native moved to androidX with the release of `0.60` this is no longer necessary.

## Changelog

[Android] [Removed] - Remove supportLibVersion variable in build.gradle
Pull Request resolved: https://github.com/facebook/react-native/pull/25810

Test Plan: No tests were run locally

Reviewed By: cpojer

Differential Revision: D16498431

Pulled By: osdnk

fbshipit-source-id: 95e77304549c3f7b7ebdaeb363b72dd21d686595
2019-07-25 18:38:29 -07:00
Anders Bondehagen d55025694b Adding the debug.keystore file back (#25807)
Summary:
Fixes https://github.com/facebook/react-native/issues/25629 that happened after v60 upgrade when using the diff tool https://react-native-community.github.io/upgrade-helper/?from=0.59.10&to=0.60.4

When following the diff for upgrading to react native 60. The debug.keystore is missing. It's added in the repository but ignored in the .gitignore, so it does not show. This adds an exception for this file.

## Changelog

[Android] [Fixed] - Add exception in .gitignore for `debug.keystore` to the android template.
Pull Request resolved: https://github.com/facebook/react-native/pull/25807

Test Plan: Create a new project from template and check that debug.keystore will be checked in when committing.

Reviewed By: cpojer

Differential Revision: D16462897

Pulled By: mdvacca

fbshipit-source-id: 18c0e8aee7f5cf8ed0d3544f88dc1621ad17f30f
2019-07-25 15:09:25 -07:00
James Treanor ca9e108110 Remove 's.static_framework = true' requirement for podspec (#25816)
Summary:
As part of the fix for https://github.com/facebook/react-native/issues/25349 I added `s.static_framework = true` to each podspec in repo (see https://github.com/facebook/react-native/pull/25619#discussion_r306993309 for more context).

This was required to ensure the existing conditional compilation with `#if RCT_DEV` and `__has_include` still worked correctly when `use_frameworks!` is enabled.

However, fkgozali pointed out that it would be ideal if we didn't have this requirement as it could make life difficult for third-party libraries.

This removes the requirement by moving `React-DevSupport.podspec` and `React-RCTWebSocket.podspec` into `React-Core.podspec` as subspecs. This means the symbols are present when `React-Core.podspec` is built dynamically so `s.static_framework = true` isn't required.

This means that any `Podfile` that refers to `React-DevSupport` or `React-RCTWebSocket` will need to be updated to avoid errors.

## Changelog

I don't think this needs a changelog entry since its just a refinement of https://github.com/facebook/react-native/pull/25619.
Pull Request resolved: https://github.com/facebook/react-native/pull/25816

Test Plan:
Check `RNTesterPods` still works both with and without `use_frameworks!`:

1. Go to the `RNTester` directory and run `pod install`.
2. Run the tests in `RNTesterPods.xcworkspace` to see that everything still works fine.
3. Uncomment the `use_frameworks!` line at the top of `RNTester/Podfile` and run `pod install` again.
4. Run the tests again and see that it still works with frameworks enabled.

Reviewed By: hramos

Differential Revision: D16495030

Pulled By: fkgozali

fbshipit-source-id: 2708ac9fd20cd04cb0aea61b2e8ab0d931dfb6d5
2019-07-25 11:46:43 -07:00
James Treanor 8131b7bb7b CocoaPods frameworks compatibility: Step 2 (#25619)
Summary:
This is my proposal for fixing `use_frameworks!` compatibility without breaking all `<React/*>` imports I outlined in https://github.com/facebook/react-native/pull/25393#issuecomment-508457700. If accepted, it will fix https://github.com/facebook/react-native/issues/25349.

It builds on the changes I made in https://github.com/facebook/react-native/pull/25496 by ensuring each podspec has a unique value for `header_dir` so that framework imports do not conflict. Every podspec which should be included in the `<React/*>` namespace now includes it's headers from `React-Core.podspec`.

The following pods can still be imported with `<React/*>` and so should not have breaking changes: `React-ART`,`React-DevSupport`, `React-CoreModules`, `React-RCTActionSheet`, `React-RCTAnimation`, `React-RCTBlob`, `React-RCTImage`, `React-RCTLinking`, `React-RCTNetwork`, `React-RCTPushNotification`, `React-RCTSettings`, `React-RCTText`, `React-RCTSettings`, `React-RCTVibration`, `React-RCTWebSocket` .

There are still a few breaking changes which I hope will be acceptable:

- `React-Core.podspec` has been moved to the root of the project. Any `Podfile` that references it will need to update the path.
- ~~`React-turbomodule-core`'s headers now live under `<turbomodule/*>`~~ Replaced by https://github.com/facebook/react-native/pull/25619#issuecomment-511091823.
- ~~`React-turbomodulesamples`'s headers now live under `<turbomodulesamples/*>`~~ Replaced by https://github.com/facebook/react-native/pull/25619#issuecomment-511091823.
- ~~`React-TypeSaferty`'s headers now live under `<TypeSafety/*>`~~ Replaced by https://github.com/facebook/react-native/pull/25619#issuecomment-511040967.
- ~~`React-jscallinvoker`'s headers now live under `<jscallinvoker/*>`~~ Replaced by https://github.com/facebook/react-native/pull/25619#issuecomment-511091823.
- Each podspec now uses `s.static_framework = true`. This means that a minimum of CocoaPods 1.5 ([released in April 2018](http://blog.cocoapods.org/CocoaPods-1.5.0/)) is now required. This is needed so that the ` __has_include` conditions can still work when frameworks are enabled.

Still to do:

- ~~Including `React-turbomodule-core` with `use_frameworks!` enabled causes the C++ import failures we saw in https://github.com/facebook/react-native/issues/25349. I'm sure it will be possible to fix this but I need to dig deeper (perhaps a custom modulemap would be needed).~~ Addressed by 33573511f0.
- I haven't got Fabric working yet. I wonder if it would be acceptable to move Fabric out of the `<React/*>` namespace since it is new? �

## Changelog

[iOS] [Fixed] - Fixed compatibility with CocoaPods frameworks.
Pull Request resolved: https://github.com/facebook/react-native/pull/25619

Test Plan:
### FB

```
buck build catalyst
```

### Sample Project

Everything should work exactly as before, where `use_frameworks!` is not in `Podfile`s. I have a branch on my [sample project](https://github.com/jtreanor/react-native-cocoapods-frameworks) here which has `use_frameworks!` in its `Podfile` to demonstrate this is fixed.

You can see that it works with these steps:

1. `git clone git@github.com:jtreanor/react-native-cocoapods-frameworks.git`
2. `git checkout fix-frameworks-subspecs`
3. `cd ios && pod install`
4. `cd .. && react-native run-ios`

The sample app will build and run successfully. To see that it still works without frameworks, remove `use_frameworks!` from the `Podfile` and do steps 3 and 4 again.

### RNTesterPods

`RNTesterPodsPods` can now work with or without `use_frameworks!`.

1. Go to the `RNTester` directory and run `pod install`.
2. Run the tests in `RNTesterPods.xcworkspace` to see that everything still works fine.
3. Uncomment the `use_frameworks!` line at the top of `RNTester/Podfile` and run `pod install` again.
4. Run the tests again and see that it still works with frameworks enabled.

Reviewed By: PeteTheHeat

Differential Revision: D16465247

Pulled By: PeteTheHeat

fbshipit-source-id: cad837e9cced06d30cc5b372af1c65c7780b9e7a
2019-07-24 23:27:09 -07:00
zhongwuzw 0fcaca8e26 Fixes template build failed in release mode (#25751)
Summary:
Fixes https://github.com/facebook/react-native/issues/25745, Xcode stripped dead code in Release mode, and in template test code, it should only run in Debug mode, so we can use a macro to fix this issue.

## Changelog

[iOS] [Fixed] - Fixes template build failed in release mode
Pull Request resolved: https://github.com/facebook/react-native/pull/25751

Test Plan:
1. Create a new project using `react-native init AwesomProject`.
2. Change project target scheme to `Release`.
3. Build and it should success.

Differential Revision: D16442643

Pulled By: TheSavior

fbshipit-source-id: f08ed70523aa1aa418064465f8df367a06e8974f
2019-07-23 11:08:41 -07:00
George Zahariev 9984ac4786 Deploy Flow 0.103 to xplat
Summary:
Deploy Flow 0.103 to xplat

bypass-lint

Reviewed By: panagosg7

Differential Revision: D16374740

fbshipit-source-id: e0d67e0bc9a209dd75d78bcf257c6af821ed04d1
2019-07-19 21:43:05 -07:00
Christoph Nakazawa ba8f88d1ab Rename HMRLoadingView to LoadingView
Summary:
This view will be re-used for bundle splitting so I'm changing the name to be more generic as it can be used for informing users of any loading activity.

I also cleaned up the files a bit from a class to just an object.

Reviewed By: gaearon

Differential Revision: D16281367

fbshipit-source-id: 5c2ee7790d29ccba473bd6e90737d2f0581e6291
2019-07-18 03:06:49 -07:00
JP Driver 7254bab0b3 Fresh RN projects fails ESLint / Prettier by default (#25478)
Summary:
Fixes https://github.com/facebook/react-native/issues/25477

This PR adds a `.prettierrc.js` config file to the HelloWorld template.

`eslint-config-react-native-community` includes custom settings for some rules which conflict with Prettier's default settings.

Consequently, if you run `eslint` immediately after scaffolding a new app you get errors (see linked issue).

This PR configures Prettier to be compatible with both the existing ESLint config and the existing project template (with no code changes to the latter).

## Changelog

[General] [Changed] - Added a default Prettier config for new projects
Pull Request resolved: https://github.com/facebook/react-native/pull/25478

Test Plan:
- The following screenshots show the output of `yarn lint` before and after these changes
- These were run immediate after running `npx react-native-cli init RN060`

### Without these changes

- Linting errors on new projects
- Unfixable automatically due to conflicting rules
<img width="1116" alt="Screenshot 2019-07-03 at 17 44 55" src="https://user-images.githubusercontent.com/2393035/60610078-f6b44d00-9dba-11e9-826f-1524b949e4fd.png">
<img width="1116" alt="Screenshot 2019-07-03 at 17 45 07" src="https://user-images.githubusercontent.com/2393035/60610085-fb790100-9dba-11e9-9a9c-33f4cfefd51e.png">

### With these changes

- Brand new projects will not produce lint errors out of the box
<img width="1116" alt="Screenshot 2019-07-03 at 17 48 25" src="https://user-images.githubusercontent.com/2393035/60610266-57dc2080-9dbb-11e9-8a55-fd09f3549c17.png">

Differential Revision: D16223094

Pulled By: cpojer

fbshipit-source-id: bd2c00b1fcf27b1afcad8c18b357b95a3900bdf7
2019-07-15 02:09:59 -07:00
Dulmandakh eb48ed1f19 bump Android Gradle Plugin to 3.4.2 (#25652)
Summary:
Bump Android Gradle Plugin to 3.4.2, includes bug fixes and improvements

## Changelog

[Android][Changed] - bump Android Gradle Plugin to 3.4.2
Pull Request resolved: https://github.com/facebook/react-native/pull/25652

Test Plan: RNTester builds and runs as expected

Differential Revision: D16258865

Pulled By: mdvacca

fbshipit-source-id: c20600e3c7fc44793f42a0061bbb22a6ead9f0e4
2019-07-14 23:48:34 -07:00
Kevin Gozali c1b0f398e6 TM iOS: move jscallinvoker under ReactCommon podspec
Summary:
This essentially changes the header namespace to `<ReactCommon/`
Relevant efforts:
https://github.com/facebook/react-native/pull/25619
https://github.com/facebook/react-native/pull/25393

Reviewed By: PeteTheHeat

Differential Revision: D16233125

fbshipit-source-id: 83eda4cc50ebb01efd1ce3eb18f47c97a049cffa
2019-07-12 22:44:20 -07:00
Kevin Gozali 6e7ce9c082 TM iOS: refactor header dir for TM
Summary:
For better cocoapods compatibility, refactored TM podspec to be a subspec of ReactCommon, then use `<ReactCommon/` header prefix for all TM files.

Relevant efforts:
https://github.com/facebook/react-native/pull/25619
https://github.com/facebook/react-native/pull/25393

Reviewed By: hramos

Differential Revision: D16231697

fbshipit-source-id: 38d3418b19978ff54aa0c61b064ac45ac0e1c36c
2019-07-12 22:44:20 -07:00
Kevin Gozali 0c8c95f4ae iOS: Use RCTTypeSafety header namespace instead of React
Summary: For better compatibility re: https://github.com/facebook/react-native/pull/25393, this target should just use `RCTTypeSafety`

Reviewed By: PeteTheHeat

Differential Revision: D16210888

fbshipit-source-id: 6a55d631453cc420909247a7d5a64379587225b7
2019-07-12 14:30:11 -07:00
satyajit.happy afe06e5831 Add package.json scripts ro run android and ios in template (#25618)
Summary:
Currently users have to use the global `react-native` command or run `yarn react-native run-x` which isn't very nice.

This PR adds `android` and `ios` scripts to `package.json` so users can run `yarn android` or `yarn ios` directly.
Pull Request resolved: https://github.com/facebook/react-native/pull/25618

Differential Revision: D16223229

Pulled By: cpojer

fbshipit-source-id: 69b082760ff2ee31ab0406251f9a50339fd227bf
2019-07-12 09:05:12 -07:00
Christoph Nakazawa ba03e4e7bb Use babel-core 7.5+ in new RN Apps
Summary:
We are running into some problems with the spread operator. The solution is to ask for a newer minimum babel version.

See https://github.com/babel/babel/issues/10179

Note: this doesn't actually change behavior. When creating a new app a new babel version will already be used. This simply ensures that the minimum version fulfills the requirements.

Reviewed By: axe-fb

Differential Revision: D16181111

fbshipit-source-id: f5207318b3a7bd9f092c0e64a8065d0f713012da
2019-07-10 07:12:58 -07:00
Kevin Gozali 6853b9bdfa Fixed iOS Podfile template to add React-CoreModules and its deps
Summary:
With React-CoreModules separated from React-Core, the Podfile needs updating to sync with https://github.com/facebook/react-native/blob/master/scripts/autolink-ios.rb
See fde8a4cf93 for the original change.

Note: the template Podfile should be updated to use the same autolink scripts

This fixes the CI failure like this: https://circleci.com/gh/facebook/react-native/99956

Reviewed By: hramos

Differential Revision: D16114264

fbshipit-source-id: d75dff570310f21eb8fbdf030439532a0abe978d
2019-07-04 11:21:56 -07:00
Karan Thakkar d57cdac62b Add generated `xcshareddata` folder to gitignore (#25451)
Summary:
A new project created with `0.60.0-rc.3` generates an `xcshareddata` when you open the workspace in Xcode at `ios/ProjectName.xcworkspace/xcshareddata`. This does not need to be tracked in git.

## Changelog

[IOS] [ADDED] - Add generated `xcshareddata` folder to gitignore
Pull Request resolved: https://github.com/facebook/react-native/pull/25451

Test Plan: N/A

Differential Revision: D16110125

Pulled By: hramos

fbshipit-source-id: 52ac4d2d7734956817f875c3c7bbf341cba2ea28
2019-07-03 16:29:47 -07:00
Nicolas Charpentier 029aad3a4a Upgrade Gradle to 5.5 (#25461)
Summary:
Upgrade Gradle to 5.5, changelog is available here: https://docs.gradle.org/5.5/release-notes.html

```
./gradlew wrapper --gradle-version 5.5 --distribution-type all
```

## Changelog

[Android] [Changed] - Upgrade Gradle to 5.5
Pull Request resolved: https://github.com/facebook/react-native/pull/25461

Test Plan: Ran RNTester, everything is working as expected.

Differential Revision: D16106927

Pulled By: cpojer

fbshipit-source-id: 3fca03b6c7ad8989a9a1c707dea980c831cc1872
2019-07-03 02:29:47 -07:00
Oleksandr Melnykov 6c0f73b322 Format Java code in xplat/js/react-native-github
Summary:
This diff formats the Java class files inside xplat/js/react-native-github. Since google-java-format was enabled in D16071401 we want to codemode the existing code so that users don't have to deal with formatter lint noise at diff-time.

```arc f --paths-cmd 'hg files -I "**/*.java"'```

drop-conflicts

Reviewed By: cpojer

Differential Revision: D16071725

fbshipit-source-id: fc6e3852e45742c109f0c5ac4065d64201c74204
2019-07-02 04:16:46 -07:00
Panagiotis Vekris 454bbff3ba Flow v0.102 in xplat/js
Summary:
https://our.intern.facebook.com/intern/wiki/Flow/Flow_Release_Process/Updating_Internal_Repositories/#update-xplat-js

allow-large-files

Reviewed By: jbrown215

Differential Revision: D16013696

fbshipit-source-id: 1a6185dafd14ef9c9e1aa214cdbf8cf9c573b08f
2019-06-26 19:07:39 -07:00
Michał Pierzchała 86a97e7830 – Bring back autolinking to the iOS template (#25314)
Summary:
Bringing back iOS autolinking to the template after reverting: 261197d857 (commitcomment-33479829)

## Changelog

[iOS] [Added] – Bring back autolinking to the iOS template
Pull Request resolved: https://github.com/facebook/react-native/pull/25314

Test Plan: `test_ios_e2e` should still pass

Differential Revision: D15938862

Pulled By: cpojer

fbshipit-source-id: 4cd948b280a90229fd128b0f6901f7f89c647204
2019-06-21 03:13:38 -07:00
Mehdi Mulani 46bdb4161c Delete fishhook
Summary: Fishhook was used to try to hide the log messages from RCTReconnectingWebSocket but that doesn't really work anymore. Deleting it now to unblock people trying to build for iOS 13.

Reviewed By: cpojer

Differential Revision: D15779390

fbshipit-source-id: ef18575d5d92ac374e189b1267dee3a9befc3551
2019-06-12 06:19:32 -07:00
Jordan Brown dec9698d1c @allow-large-files Deploy v0.101.0 to xplat
Summary: Deploy v0.101.0 to xplat

Reviewed By: gabelevi

Differential Revision: D15765260

fbshipit-source-id: 8535438131ee47eaa94bd3a735c30eaf13a732ff
2019-06-11 15:22:23 -07:00
James Ide bf8d918681 Make Flow configs use path-based imports instead of Haste (#24812)
Summary:
**Depends on https://github.com/facebook/react-native/pull/25100**

This is one of the steps unlocked by migrating RN from Haste to path-based imports. This commit sets Flow to use path-based imports by removing all of the Haste-related configuration options.

Additionally, it maps `react-native` to import from within this module to match Node's module resolution behavior. It also adds `<PROJECT_ROOT>` to the image name mapper so that the mapped name doesn't rely on Haste.

## Changelog

[General] [Changed] - Make Flow configs use path-based imports instead of Haste
Pull Request resolved: https://github.com/facebook/react-native/pull/24812

Differential Revision: D15659189

Pulled By: cpojer

fbshipit-source-id: d0efaa2884485a492dcdef8d94061129cebc2566
2019-06-05 16:00:52 -07:00
Sam Goldman b3a50ec0de Deploy Flow v0.100 to xplat/js
Reviewed By: dsainati1

Differential Revision: D15617077

fbshipit-source-id: b88325dd80d167473d3c4cc7bb93c27ea71e654b
2019-06-03 23:03:41 -07:00
Sam Goldman 87b31bccdf @allow-large-files Deploy Flow v0.99.0 to xplat/js
Reviewed By: dsainati1

Differential Revision: D15541620

fbshipit-source-id: e19795e13d47dca58c5603b308b7cd60ba67ef86
2019-05-29 18:11:43 -07:00
Dulmandakh fbc6d8caff bump android gradle plugin to 3.4.1 (#24883)
Summary:
bump android gradle plugin to 3.4.1, includes many fixes and improvements.

## Changelog

[Android] [Changed] - bump android gradle plugin to 3.4.1
Pull Request resolved: https://github.com/facebook/react-native/pull/24883

Differential Revision: D15474556

Pulled By: hramos

fbshipit-source-id: 8d1eb91855b9f416ed3380c61f34672deded26c1
2019-05-24 11:53:17 -07:00
nossbigg 30a0a03b80 Fix ios/android e2e tests (#24974)
Summary:
Fixes broken ios/android e2e tests for CI.

Changes:
1. Use `npm pack` instead of `yarn pack` during e2e test
2. Update test string assertions in ios/android e2e tests
3. Use `Step One` as candidate for source code replacement to test for page changes (since the "Welcome to React Native" string exists in the `Header` component instead of being on `App.js`)

## Changelog

[Internal] [Fixed] - Fix ios/android e2e tests
Pull Request resolved: https://github.com/facebook/react-native/pull/24974

Differential Revision: D15431539

Pulled By: cpojer

fbshipit-source-id: 054af2c2fff6bbdb2263c15d7f5cd416aaa507fd
2019-05-21 05:44:29 -07:00
Orta Therox ad4a5d9a3e Improves the copy for the new app screen (#24918)
Summary:
1. Consistency with full stops  (you can see screenshots in https://github.com/facebook/react-native/pull/24783 )
2. Improvements to the wording, describing what you're going to see

## Changelog

[Internal] [Fixed] - Improves the copy for the new app screen
Pull Request resolved: https://github.com/facebook/react-native/pull/24918

Differential Revision: D15391421

Pulled By: cpojer

fbshipit-source-id: 2ec6d2d5bd4845c5f4c699838ae865ab4217e49e
2019-05-17 03:49:21 -07:00
Lucas Bento a9e8a71e53 Add `SafeAreaView` to not have content behind `StatusBar` in iOS (#24868)
Summary:
This PR fixes the content being shown behind the `StatusBar` in the new app template, was only happening in iOS.

## Changelog

[General] [Changed] - Fix content being shown behind `StatusBar` in the new app template.
Pull Request resolved: https://github.com/facebook/react-native/pull/24868

Differential Revision: D15353748

Pulled By: cpojer

fbshipit-source-id: 4c84a65d9f8e85e5558d447533e381126c971e38
2019-05-15 08:31:49 -07:00
Eli Perkins fe88e9e48c Replace new app template with new app screen (#24805)
Summary:
This replaces the "new app screen" in the template with the new design from https://github.com/react-native-community/discussions-and-proposals/issues/122

This uses components that are shipped as part of the `react-native` module, but not necessarily as proper components exported by the main `react-native` module. To use these, we use absolute imports to those components.

Related to #24760

[General] [Changed] - Updated new app template design 💖
Pull Request resolved: https://github.com/facebook/react-native/pull/24805

Differential Revision: D15334459

Pulled By: cpojer

fbshipit-source-id: d0b67d08f936eeabd9e93d4e0ff78302b4d6429f
2019-05-14 05:52:03 -07:00
Héctor Ramos da7d3dfc7d Partially back out #24506, fixing iOS e2e tests (#24788)
Summary:
The iOS End-to-End tests started failing with the updates made to the iOS template's Podfile in 261197d857. Undoing these gets our CI iOS e2e test step back to green.

[iOS] [Removed] - Revert auto-linking related changes to the iOS template Podfile
Pull Request resolved: https://github.com/facebook/react-native/pull/24788

Differential Revision: D15317895

Pulled By: cpojer

fbshipit-source-id: a1f3b84b39c6d341740f742d83fd05a1ab841184
2019-05-13 07:37:07 -07:00
James Ide 0ee5f68929 Migrate "Libraries" from Haste to standard path-based requires (sans vendor & renderers) (#24749)
Summary:
This is the next step in moving RN towards standard path-based requires. All the requires in `Libraries` have been rewritten to use relative requires with a few exceptions, namely, `vendor` and `Renderer/oss` since those need to be changed upstream. This commit uses relative requires instead of `react-native/...` so that if Facebook were to stop syncing out certain folders and therefore remove code from the react-native package, internal code at Facebook would not need to change.

See the umbrella issue at https://github.com/facebook/react-native/issues/24316 for more detail.

[General] [Changed] - Migrate "Libraries" from Haste to standard path-based requires
Pull Request resolved: https://github.com/facebook/react-native/pull/24749

Differential Revision: D15258017

Pulled By: cpojer

fbshipit-source-id: a1f480ea36c05c659b6f37c8f02f6f9216d5a323
2019-05-08 08:48:59 -07:00
Kudo Chien 509a07b207 Remove unreliable packagingOptions.pickFirst for libc++_shared.so and libjsc.so (#24672)
Summary:
packagingOptions.pickFirst is unreliable that we could not specify which library will be used.
If user have other third party libraries, the story is more complicated.
From the framework point of view, it is better to drop the pickFirst.

In jsc-android 241213.1.0, we did two things:
1. Remove libc++_shared.so in AAR to prevent the conflict with RN.
2. Build by NDK r17c, which aligned with current RN NDK version.

In this commit, I also revert the pickFirst for JSC.
pickFirst JSC also makes upgrade JSC unreliable.
Currently a lot of user report JSC crash issues, those crash issues may relate to JIT and hard to reproduce in-house.
My plan is to make sure user could choose another JSC build easier,
i.e. only to `yarn add 'jsc-android@latest'`.
We could then propose some experimented JSC build for user to check
if the build could help them to fix the crash issue.

[Android] [Fixed] - Remove unreliable packagingOptions.pickFirst for libc++_shared.so and libjsc.so
NOTE that this may not need to add the changelog, as RN 0.59 does not have pickFirst.
This will also reduce a breaking change for upgrade from RN 0.59 or before.
Pull Request resolved: https://github.com/facebook/react-native/pull/24672

Differential Revision: D15164536

Pulled By: cpojer

fbshipit-source-id: 9fc897a77409173a5841f325b38e2836bb07f599
2019-05-07 07:13:33 -07:00
Nat Mote 0e1dfd4369 Upgrade to Flow v0.98
Summary:
https://our.intern.facebook.com/intern/wiki/Flow/Flow_Release_Process/#update-xplat-js

allow-large-files

Reviewed By: avikchaudhuri

Differential Revision: D15149545

fbshipit-source-id: 85b6107c058d50d9fe80fd277fcdd005faccea8e
2019-05-03 11:43:10 -07:00
Dulmandakh 30348f7899 bump android gradle plugin to 3.4.0 (#24463)
Summary:
This PR bumps Android Gradle Plugin to 3.4.0, which enables R8 shrinker by default and improves build performance significantly.

Disabled R8 for ReactAndroid because it'll strip out AndroidX and other libraries bundled in ReactAndroid.

[Android] [Changed] - bump Android Gradle plugin to 3.4.0
Pull Request resolved: https://github.com/facebook/react-native/pull/24463

Differential Revision: D15107117

Pulled By: hramos

fbshipit-source-id: 35a03dc9955e889c9399faeaf9a862e0fc044fc4
2019-04-27 09:43:19 -07:00
Dulmandakh 6976a93126 bump Gradle to 5.4.1 (#24542)
Summary:
Bump Gradle to 5.4.1, includes many improvements and fixes.

[Android] [Changed] - Bump Gradle to 5.4.1
Pull Request resolved: https://github.com/facebook/react-native/pull/24542

Differential Revision: D15107106

Pulled By: hramos

fbshipit-source-id: aeae0413a720466f1eef00ad8e80d59c406ecd80
2019-04-27 00:10:04 -07:00
Salakar 261197d857 Implement changes to enable native modules auto linking (#24506)
Summary:
Replaces #24099 (original PR became detached for some reason)

Implements the template changes required to enable native modules auto-linking for both Android & iOS.

Requires the following to be merged first and an updated CLI to be published:

- [x] https://github.com/react-native-community/react-native-cli/pull/254
- [x] https://github.com/react-native-community/react-native-cli/pull/256
- [x] https://github.com/react-native-community/react-native-cli/pull/258

cc grabbou thymikee orta for review

- [ ] https://github.com/facebook/react-native/pull/24517 update CLI version)

[TEMPLATE] [FEATURE] - Enable auto-initialization/linking of react native modules for new projects
Pull Request resolved: https://github.com/facebook/react-native/pull/24506

Differential Revision: D15062701

Pulled By: cpojer

fbshipit-source-id: 65296cbec2925405fe8033de71910325e0c719bc
2019-04-24 06:17:05 -07:00
Jonny Burger 0851d5facb Default textColor of #000000 on Android (#24540)
Summary:
By default, the text color is `#000000` on iOS and different on Android, e.g. `#808080`, depending on the manufactorer.

This PR changes it so that newly created projects all have the text color `#000000` by default on both iOS and Android.

The argument for this is to make the app by default be more consistent between platforms.

Expo also does this: https://github.com/expo/expo/blob/master/android/expoview/src/main/res/values/styles.xml#L31

 ---

For context and for your consideration, I have started a discussion here with the topic of whether React Native should try to use OS defaults or be consistent between platforms:

https://github.com/react-native-community/discussions-and-proposals/issues/121

[Android] [Changed] - New projects have a `#000000` by default.
Pull Request resolved: https://github.com/facebook/react-native/pull/24540

Differential Revision: D15044898

Pulled By: cpojer

fbshipit-source-id: 3197266504e1061ac7027bec3100e39e39a4406a
2019-04-23 03:34:28 -07:00
Mike Diarmid 7ac1d186e4 add jsc pickFirst packagingOptions (#24535)
Summary:
Fixes the following build failures on Android Studio (happening when using the 0.60 template):

![image](https://user-images.githubusercontent.com/5347038/56444182-94859900-62ef-11e9-83f4-88b3b5763edd.png)

![image](https://user-images.githubusercontent.com/5347038/56444147-7881f780-62ef-11e9-8e7b-99820d8d2c13.png)

cc dulmandakh

[Android] [Fixed] - Fixed a `more than one file was found... lib/x86/libjsc.so` build failure with the template
Pull Request resolved: https://github.com/facebook/react-native/pull/24535

Differential Revision: D15044695

Pulled By: cpojer

fbshipit-source-id: b714f828e6d80d414339fa77e1805a43392aabba
2019-04-23 02:21:36 -07:00
Panagiotis Vekris 5e44c08fa5 Deploy 0.97.0 to xplat
Summary:
https://our.intern.facebook.com/intern/wiki/Flow/Flow_Release_Process/#update-xplat-js

allow-large-files
bypass-lint

Reviewed By: dsainati1

Differential Revision: D14920747

fbshipit-source-id: db03f6cf73a4b3e9fad6b47e0e657490c45d06a3
2019-04-15 11:19:20 -07:00
Dulmandakh e062cd366c useAndroidX and enableJetifier config in template gradle.properties (#24319)
Summary:
enable useAndroidX and enableJetifier that transforms non-Androidx third-party libraries to use AndroidX.

[Android] [Changed] - useAndroidX and enableJetifier config in template gradle.properties
Pull Request resolved: https://github.com/facebook/react-native/pull/24319

Differential Revision: D14822125

Pulled By: cpojer

fbshipit-source-id: 596a92f26fb06b077da507583b72af2b5abf712a
2019-04-07 11:59:23 -07:00
Héctor Ramos 0f909e3318 Fix duplicate definition Flow error in HMRLoadingView
Summary: Fix duplicate definition Flow error in HMRLoadingView, and match latest changes made to Facebook's internal .flowconfig

Reviewed By: cpojer

Differential Revision: D13110965

fbshipit-source-id: 8c22cab8232e1f539e77014b21e258de8b08d2b3
2019-04-04 16:23:32 -07:00
Kudo Chien 8e375850de Use node package dependency to manage JSC version (#24276)
Summary:
In origin approach, we packed libjsc.so inside react-native.aar and it is difficult for user to choose different JSC variants. E.g., [the Intl supported version](https://github.com/react-native-community/jsc-android-buildscripts#international-variant).

This change list allows application to determine JSC versions or variants by npm/yarn package.

There is a |useIntlJsc| flag in build.gradle, it will use the same JSC version but with Intl support.

`yarn add jsc-android@canary`

[Android] [Changed] - Allow application to select different JSC variants

**MIGRATION**
Note that there are some changes in build.gradle.
Existing application needs to change their android/build.gradle and android/app/build.gradle.
Hopefully, the rn-diff-purge should handle the case well.
Pull Request resolved: https://github.com/facebook/react-native/pull/24276

Differential Revision: D14752359

Pulled By: cpojer

fbshipit-source-id: a4bfb135ad8e328f404a2d1a062412f40ebf4622
2019-04-04 14:22:14 -07:00
Kacper Wiszczuk 81b87e458a Rename ios project name with new template (#24292)
Summary:
With new `init` implementation we replace all occurrences of the project name (`HelloWorld`) inside `ios` and `android` directories. For some reason, a product name field in `ios` was named wrongly. This shouldn't impact initialization using `global-cli`

[iOS] [Fixed] - Change productName in iOS in new init.
Pull Request resolved: https://github.com/facebook/react-native/pull/24292

Differential Revision: D14749249

Pulled By: cpojer

fbshipit-source-id: aaf4294ab23180770aac3075789d3ffb4d5a4f3f
2019-04-03 10:45:35 -07:00
Dulmandakh e02f711ccd fix gradle wrapper in template (#24275)
Summary:
Fix Gradle wrapper in template

[Android] [Changed] - fix Gradle wrapper in template
Pull Request resolved: https://github.com/facebook/react-native/pull/24275

Differential Revision: D14750280

Pulled By: cpojer

fbshipit-source-id: 9aadb1a674503f3fbbdf6cc03a8f8e3d9d2692aa
2019-04-03 10:45:34 -07:00
Mehdi Mulani 17dbf98884 Move iOS Geolocation code out from the repo
Summary:
@public
This resolves the iOS side of #20879.

Reviewed By: natestedman, cpojer

Differential Revision: D14712066

fbshipit-source-id: 88dd0ff80d3467b314cacb9349029dadca4ddf19
2019-04-02 15:36:10 -07:00
Avik Chaudhuri 380ed5581f @allow-large-files xplat flow 0.96 upgrade
Summary:
bypass-lint
allow_many_files

Reviewed By: panagosg7

Differential Revision: D14727932

fbshipit-source-id: 66b2fce7753450204c5daa131ffe43dcd4736539
2019-04-02 13:44:19 -07:00
Dulmandakh d9f5a9dc16 bump gradle to 5.2.1 (#23879)
Summary:
Bump Gradle to 5.2.1, includes many bug fixes and improvements, especially improved Kotlin DSL support.

[Android] [Changed] - bump Gradle to 5.2.1
Pull Request resolved: https://github.com/facebook/react-native/pull/23879

Reviewed By: hramos

Differential Revision: D14486430

Pulled By: cpojer

fbshipit-source-id: 3476516352ff2c947d65103cff6f37e27d888c2d
2019-04-02 12:07:10 -07:00
gengjiawen 4478e50520 add ram bundle to android template (#24264)
Summary:
I plan to do this for a long time :)
Still a little surprised so much people not know it https://twitter.com/geekykaran/status/1112756026611257344

[Android] [Feature] - add ram bundle to android template
Pull Request resolved: https://github.com/facebook/react-native/pull/24264

Differential Revision: D14725396

Pulled By: cpojer

fbshipit-source-id: b8e424f0be81978465259c82024f206d232acb55
2019-04-02 08:29:46 -07:00
Kacper Wiszczuk 6df2edeb2a Bump react-native version in template in release script (#24262)
Summary:
Since template has a fixed version in `template/package.json`, we want to automate this process.

[General] [Added] - Bump react-native in `template/package.json`
Pull Request resolved: https://github.com/facebook/react-native/pull/24262

Differential Revision: D14724831

Pulled By: cpojer

fbshipit-source-id: 164d13001a889941398f3db3b9b96eb9d5114cc3
2019-04-02 08:14:56 -07:00
A C SREEDHAR REDDY 90c51a8b6f update url for apk-splits user-guide (#24253)
Summary:
Changed apk-splits user-guide url.

[ANDROID] [CHANGED] - Apk tools url.
Pull Request resolved: https://github.com/facebook/react-native/pull/24253

Differential Revision: D14724834

Pulled By: cpojer

fbshipit-source-id: 8e9e21ebdcb0d585f1f262640e259ccf71112adb
2019-04-02 08:07:06 -07:00
Kacper Wiszczuk 770da3ac67 Improvement: Adjust template to match new init command (#24138)
Summary:
Adjusting template to new init command (https://github.com/react-native-community/react-native-cli/pull/241).

PR with new init command needs to be merged before we land this.

[General] [Changed] - Adjust template to match new init command
Pull Request resolved: https://github.com/facebook/react-native/pull/24138

Differential Revision: D14617568

Pulled By: cpojer

fbshipit-source-id: f4b90920d47d3e0d2b08470e0eaad1abd733e4cc
2019-04-01 16:25:48 -07:00
Jakob Krigovsky 169ef78e64 Harmonize spacing after colons (#24186)
Summary:
Harmonizes the spacing after colons to have a more consistent coding style.
Pull Request resolved: https://github.com/facebook/react-native/pull/24186

Differential Revision: D14668167

Pulled By: cpojer

fbshipit-source-id: 8f1ba71eec186b3a2221d1f4fac851e51afc52cc
2019-04-01 12:22:40 -07:00
Christoph Nakazawa 6345fcf12b Remove WebView from public RN interface
Summary:
This diff removes the `WebView` export from React Native. Internally, we are requiring `WebView` directly now and externally people will have to use the community maintained module. This diff does not yet move the WebView files from the repo, this will happen in a follow-up.

Note that I had to remove a test for Cookies that displayed data in a WebView. I don't think there is an easy way to retain this (debugging) information that likely very few people ever take a look at so I think it is fine.

Reviewed By: TheSavior

Differential Revision: D14613077

fbshipit-source-id: b1d412f970d09d7d70ecac2c23e62cfdd09d7c8e
2019-03-28 17:37:05 -07:00
Ville Immonen cd8064bc5c Add CocoaPods Podfile to the project template (#23563)
Summary:
CocoaPods makes it easier to add new iOS dependencies to a project without having to manually edit Xcode projects. Editing Xcode projects is time consuming and merging changes to them difficult. Automating the changes to Xcode project `react-native link` is error prone. CocoaPods is a de-facto standard way to manage iOS dependencies and a central part of unimodules and upcoming improvements to `react-native link`.

This PR adds a `Podfile` to the default project template of React Native. To use a project with CocoaPods, after creating it, run `cd ios; pod install` and use the created `<projectname>.xcworkspace` file instead of the `.xcodeproj` file. (We could make this a part of `react-native init` so you only need to run one command when creating a project.)

[iOS] [Added] - Add CocoaPods Podfile to the project template
Pull Request resolved: https://github.com/facebook/react-native/pull/23563

Differential Revision: D14576505

Pulled By: cpojer

fbshipit-source-id: f6c9e93d61a52ad445d2931ccc4933d559a6ec1a
2019-03-22 03:29:11 -07:00
michalchudziak 395197dafe Add .eslintrc to RN project template (#23901)
Summary:
The goal of this PR is to enable eslint checks in the projects generated by `react-native init` command. I added `template/_eslintrc` file, that would be replaced in an initialized project with `.eslintrc` file. This PR comes in parallel with https://github.com/react-native-community/react-native-cli/pull/229

[General] [Added] - Added `.eslintrc` file to generated template.
Pull Request resolved: https://github.com/facebook/react-native/pull/23901

Differential Revision: D14561084

Pulled By: cpojer

fbshipit-source-id: 6eb717bf03c45d83ae8a393e6a0abb79e1e2f915
2019-03-21 07:14:23 -07:00
Dulmandakh cb0d61d533 allow HTTP in debug builds (#24066)
Summary:
It allows HTTP connections in debug builds, and requires no configuration compared to previous/current solution where you need to edit config file to test on device.

Consulted with Salakar about this.

[Android] [Changed] - Allow HTTP in debug builds
Pull Request resolved: https://github.com/facebook/react-native/pull/24066

Differential Revision: D14540255

Pulled By: cpojer

fbshipit-source-id: f1239154c27c36c21c9b080a826f8b1d0eb0fc7d
2019-03-20 08:57:21 -07:00
Dulmandakh f49f1812ed land androidx in gradle (#24014)
Summary:
Use AndroidX in ReactAndroid/build.gradle, and remove androidx dependency from template and RNTester app because it's already exposed/exported from ReactAndroid.

[Android] [Changed] - Land AndroidX in gradle
Pull Request resolved: https://github.com/facebook/react-native/pull/24014

Differential Revision: D14508774

Pulled By: mdvacca

fbshipit-source-id: c96b97876571a5a7f2b400dd29188cfdf1f84a4c
2019-03-18 13:37:17 -07:00
Jan Kassens 8b206cab82 remove $FlowFixedInNextDeploy
Summary:
This gets completely rid of this flow ignore. The flow team is using the version
aware `$FlowFixMe` now and the only instance of this used was on www dating back
to 2016: D3235864

My intention here was to slightly simplify the flowconfigs.

Reviewed By: gabelevi

Differential Revision: D14494167

fbshipit-source-id: 0fab176ce326007ac45b47691378812c74a523e6
2019-03-18 13:32:28 -07:00
Marshall Roch 5613aa8948 flow v0.95
Summary: 0.95 has a more accurate definition of JSON.stringify which could return void.

Reviewed By: dsainati1

Differential Revision: D14494286

fbshipit-source-id: 6cf9cb5889b4078548665bc66fe899a266c689ce
2019-03-16 09:12:27 -07:00
Frieder Bluemle 7b44fe56ff Fix Info.plist templates to prevent parse error (#23924)
Summary:
I ran into a build error when `xcodebuild` would invoke a custom script (in my case `sentry-cli`):

```
error: Could not parse Info.plist file
  caused by: invalid data
```

Upon further investigation it turned out the parse error was **caused by a comment**, and I found some other oddities with the default `Info.plist` template files:

- The problematic comment is a **dead link** (website does not exist)
- The main Info.plist contains a **duplicate entry** for `NSLocationWhenInUseUsageDescription`
- Some entries are _reordered_ and the comment is removed when modifying/saving the file in Xcode

This PR fixes these inconsistencies, unnecessary customizations, and potential sources of errors.

[iOS] [Fixed] - Fix Info.plist templates to prevent parse error
Pull Request resolved: https://github.com/facebook/react-native/pull/23924

Differential Revision: D14477557

Pulled By: cpojer

fbshipit-source-id: 6d734c5aa3b800f05394db189e8d8db63be8e353
2019-03-15 03:40:20 -07:00
zhongwuzw 4aa731ae76 Fixed template build gradle error on x86_64 (#23897)
Summary:
Fixes #23893 . Fixes x86_64 apk build.

[Android] [Fixed] - Fixed template build gradle error on x86_64
Pull Request resolved: https://github.com/facebook/react-native/pull/23897

Differential Revision: D14459720

Pulled By: hramos

fbshipit-source-id: e78ac06771736915ff6592ecf5310b536d425ef4
2019-03-14 17:27:40 -07:00
Dulmandakh d752446b23 bump Gradle Android Plugin to 3.3.2 (#23854)
Summary:
Gradle Android  Plugin version 3.3.2 includes many fixes and improvements.

[Android] [Changed] - bump Gradle Android Plugin to 3.3.2
Pull Request resolved: https://github.com/facebook/react-native/pull/23854

Reviewed By: cpojer

Differential Revision: D14422827

Pulled By: hramos

fbshipit-source-id: 0c8b70f522c9b9caa023991f3c20928a2fbb76d3
2019-03-13 09:45:54 -07:00
George Zahariev 35d2dfcabf Deploy 0.94 to xplat
Summary:
Update Flow version in xplat (https://our.intern.facebook.com/intern/wiki/Flow/Flow_Release_Process/#update-xplat-js)

allow-large-files
bypass-lint

Reviewed By: nmote

Differential Revision: D14317820

fbshipit-source-id: 07ec22c0745321db036f4e10a502009a4b640652
2019-03-06 14:57:30 -08:00
Dulmandakh 4a5266c1e0 bump android gradle plugin to 3.3.1 (#23598)
Summary:
Bump android gradle plugin to 3.3.1

[Android] [Changed] - Bump android Gradle plugin to 3.3.1
Pull Request resolved: https://github.com/facebook/react-native/pull/23598

Differential Revision: D14185571

Pulled By: mdvacca

fbshipit-source-id: 30d353b42acfea3788da5c6876cf1d6d133f4a85
2019-02-22 10:22:47 -08:00
Dulmandakh b4017a9923 bump gradle to 5.0, android gradle plugin to 3.3.1 (#23324)
Summary:
This PR bumps gradle to 5.0, which includes Kotlin DSL 1.0, and android gradle plugin to 3.3.1, which includes includes various bug fixes and performance improvements. Also Gradle 5.x requires Java 8.

This is preparation for Kotlin DSL migration.

[Android] [Changed] - Bump Gradle to 5.0

Pull Request resolved: https://github.com/facebook/react-native/pull/23324

Reviewed By: mdvacca

Differential Revision: D14028563

Pulled By: hramos

fbshipit-source-id: 61fe1a2d4ea5707d6f07945acbd950f852420e13
2019-02-20 11:42:54 -08:00
Dulmandakh 84a2fb0a4a SYSTEM_ALERT_WINDOW only in debug builds (#23504)
Summary:
SYSTEM_ALERT_WINDOW permission is used only for debug builds to show draw overlay views or show warnings/errors. This permissions is unused in release builds, and there is an issue regarding removing unused permissions on Android build https://github.com/facebook/react-native/issues/5886#issuecomment-464495388. This PR removes SYSTEM_ALERT_WINDOW from all builds bug debug.

[Android] [Changed] - SYSTEM_ALERT_WINDOW permissions available only in debug builds
Pull Request resolved: https://github.com/facebook/react-native/pull/23504

Differential Revision: D14123045

Pulled By: cpojer

fbshipit-source-id: 68829a774ff23c7cb2721076a9d3870405f48fea
2019-02-18 02:39:55 -08:00
Daniel Sainati 8da1f1149f deploy 0.93
Summary:
upgrades flow version

allow-large-files
bypass-lint

Reviewed By: nmote

Differential Revision: D14095305

fbshipit-source-id: 000b3b2e085f673bc443fc8bc1b3aae1b42df0e9
2019-02-15 12:04:32 -08:00
Dulmandakh da5b5d2fa1 bump android plugin to 3.3.1 (#23473)
Summary:
Bump Android Plugin to 3.3.1, with many bug fixes and performance improvements. Split the change from https://github.com/facebook/react-native/pull/23324 to make cherry-pick easy to 0.59 branch.

[Android] [Changed] - bump Android Plugin to 3.3.1
Pull Request resolved: https://github.com/facebook/react-native/pull/23473

Differential Revision: D14099741

Pulled By: cpojer

fbshipit-source-id: 7491c49cd2467f1bb8776345bdda2ab9cea11c06
2019-02-15 02:50:06 -08:00
Dulmandakh 19492b730b react_native_config available to all Android versions (#23470)
Summary:
Move react_native_config.xml so that it's available to all Android versions, and fixes https://github.com/facebook/react-native/issues/23445. It's my bad, I should've tested previous change on multiple versions of Android.

[Android] [Changed] - Fix network security
Pull Request resolved: https://github.com/facebook/react-native/pull/23470

Differential Revision: D14099612

Pulled By: cpojer

fbshipit-source-id: 15b5e5f575de8033bbfd524d9ad2aa0e22daa813
2019-02-15 02:29:32 -08:00
Dulmandakh 57f444bd8a bump targetSdkVersion to 28 (#23431)
Summary:
Bump targetSdkVersion to 28

[Android] [Changed] - Bump targetSdkVersion to 28
Pull Request resolved: https://github.com/facebook/react-native/pull/23431

Differential Revision: D14065177

Pulled By: cpojer

fbshipit-source-id: a161d1d385b7b40ec93d70851e5a41baeb58f830
2019-02-13 07:13:19 -08:00
Dulmandakh 5747094532 improve Android Network Security config (#23429)
Summary:
This PR is trying to improve Android Network Security configuration introduced in 84572c4051. I found that Android merges all manifest files into a single manifest file when building an app, so this PR provides AndroidManifest.xml with network security config in debug folder, that will be used only for debug builds. Also the network security configuration will be applied to only app that target API 28. Moved security config file to xml-v28, so that it'll only visible to API 28 and above.

See https://developer.android.com/studio/build/manifest-merge

[Android] [Changed] -  Android Network Security configuration.
Pull Request resolved: https://github.com/facebook/react-native/pull/23429

Differential Revision: D14065124

Pulled By: cpojer

fbshipit-source-id: 0f5ac5addbe968ed7e5cb57f356e2572de2690a8
2019-02-13 06:38:29 -08:00
Andres Suarez aefb05941a Exclude RN templates from internal linters
Reviewed By: cpojer

Differential Revision: D14032447

fbshipit-source-id: b36c2e01b10341077bec7fca43a35e980e9c13ce
2019-02-11 15:42:17 -08:00
zhongwuzw cdd615136f Revert RCTRootView's backgroundColor to white (#23358)
Summary:
Fixes #23314 , the change came from #20945 , its purpose is to fix orientation change issue in HelloWord template, but I think it's just a trick, to make rootView's backgroundColor the same as window backgroundColor, the orientation issue seems related to [UIManager setAvailableSize:forRootView:](d2fc19f4aa/React/Modules/RCTUIManager.m (L343)) async layout things.

[iOS] [Fixed] - Revert RCTRootView's backgroundColor to white.
Pull Request resolved: https://github.com/facebook/react-native/pull/23358

Differential Revision: D14030666

Pulled By: cpojer

fbshipit-source-id: 7c9a45f03b87c3be0f2b7c64a3c837c6ae14af3e
2019-02-11 14:31:26 -08:00
Christoph Nakazawa ae11993d0f Add a Metro configuration with inline require/import
Summary:
We have been working on turning on inline-requires/imports and RAM bundles for React Native for a long time, however we have not made real progress on making it the default, even though it is easy. In this diff I am adding a Metro configuration to a new React Native template with the defaults set to `false` (off). This means that everyone creating a new project now or upgrading from an existing one will receive this template file. In a future release of React Native we will turn this setting on to default. From then on, new projects will be using inline-requires while existing ones that are upgrading can make an explicit choice when they are diffing their template and the latest version of it.

This approach was outlined in https://github.com/react-native-community/discussions-and-proposals/blob/master/core-meetings/2018-09-metro-meeting.md#actions-that-will-be-taken

Note: There is a weird lint-ignore thing in there like in the other template files. I'm working on getting rid of that separately.

Reviewed By: TheSavior

Differential Revision: D14030370

fbshipit-source-id: cf4c5551c795f2ea0fd1b731b352489f04b8c22e
2019-02-11 14:17:54 -08:00
Dulmandakh cf52ab561d add back buildToolsVersion to build.gradle (#23316)
Summary:
add back buildToolsVersion to build.gradle, because many third-party modules depend on it. The lack of this info causing issues in 0.58.

[Android] [Changed] - add back buildToolsVersion to template
Pull Request resolved: https://github.com/facebook/react-native/pull/23316

Differential Revision: D13974264

Pulled By: hramos

fbshipit-source-id: 058fc5617196d6481d1b69d2420c8b2be9cf4f81
2019-02-06 11:15:54 -08:00
Dulmandakh 38eb2a70af Enable Java8 (#23295)
Summary:
Running *lint* on RN found that there are some Java 8 features used without specifying Java 8 compatibility in projects. This PR adds Java 8 compatibility and fixes errors caused by Java 8 feature use. I suspend that it may be cause of many failures on older Androids, but also found that many modules/packages switched to and require Java 8.

```java
../../src/main/java/com/facebook/react/devsupport/BundleDownloader.java:167: Try-with-resources requires API level 19 (current min is 16)
../../src/main/java/com/facebook/react/devsupport/DevServerHelper.java:658: Try-with-resources requires API level 19 (current min is 16)
```

For more information https://developer.android.com/studio/write/java8-support

[Android] [Changed] - Enable Java 8
Pull Request resolved: https://github.com/facebook/react-native/pull/23295

Differential Revision: D13959096

Pulled By: cpojer

fbshipit-source-id: 0bfd0565b61a132906cf35ee55b4afcf5450f7cb
2019-02-05 10:18:27 -08:00
Gabe Levi ffc9908bef Back out "[Flow] Set wait_for_recheck=true to work around crash"
Summary: Now that Flow v0.92.1 is deployed, we can backout {D13942380}, which was a temporary fix.

Reviewed By: avikchaudhuri

Differential Revision: D13952515

fbshipit-source-id: d423379a03fff09316aa499e1152b410a1bb4178
2019-02-04 17:41:04 -08:00
Gabe Levi c599625df0 Set wait_for_recheck=true to work around crash
Summary: Flow v0.92 is crashing sometimes after a save when run through Nuclide. This fixes the issue temporarily until we can push a Flow v0.92.1

Reviewed By: samwgoldman

Differential Revision: D13942380

fbshipit-source-id: f7bf2aef0aab90980bbb786d89710f399c9427d5
2019-02-04 10:11:32 -08:00
Paco Estevez Garcia 5ee738659b Update xplat/js to 0.92.0
Summary: This diff updates `xplat/js` to Flow 0.92.0

Reviewed By: panagosg7

Differential Revision: D13917049

fbshipit-source-id: 69613182badecd4c23aef25b79f7380d5604a13b
2019-02-01 09:35:42 -08:00
Salakar 84572c4051 apply Network Security Config file (fixes #22375) (part 2 of #23105) (#23135)
Summary:
This is a follow-up PR for https://github.com/facebook/react-native/pull/23105 - as mentioned on discord.

 ---

This PR applies the network security config for the RN template project only. New RN projects started with the updated template will be able to connect to the packager on builds built with Android API 28 & above.

See https://developer.android.com/training/articles/security-config#CleartextTrafficPermitted for more information about this newly required config, specifically:

![image](https://user-images.githubusercontent.com/5347038/52124287-b3de2580-2620-11e9-958d-bc2da15c6f01.png)

Changelog:
----------
[ANDROID] [Template] add Network Security Config file to allow access to packager via cleartext requests in Android API 28 and above. (fixes #22375)
Pull Request resolved: https://github.com/facebook/react-native/pull/23135

Differential Revision: D13917058

Pulled By: cpojer

fbshipit-source-id: 0e66f2cde712c1285d217e3625b73028c3770b65
2019-02-01 06:36:18 -08:00
Kacper Wiszczuk 5218932b13 fix: change template to work with jest (#23150)
Summary:
This change is required to make `yarn test` work in newly initialized project.
`Jest@23` doesn't play well with new babel, so we need to install `babel-core@^7.0.0-bridge.0` and change `.babelrc` to `babel.config.js` to make it work. This is a temporary change till `jest` releases stable `24` version.
Pull Request resolved: https://github.com/facebook/react-native/pull/23150

Differential Revision: D13811428

Pulled By: hramos

fbshipit-source-id: 8db6b9177cd31d4a1213fb44964b05f26982bdf2
2019-01-24 17:33:50 -08:00
Dulmandakh 5bbed43854 android support library 28.0.0 (#23109)
Summary:
Bump Android Support Library to 28.0.0. Therefore fix Android CI

Changelog:
----------
[Android] [Changed] - Bump Android Support Library to 28.0.0.
Pull Request resolved: https://github.com/facebook/react-native/pull/23109

Differential Revision: D13779835

Pulled By: mdvacca

fbshipit-source-id: 7645ffe2c04ca81424b2f9cfa43dc4ec30c50e25
2019-01-23 02:22:00 -08:00
Jordan Brown be51dbc214 @allow-large-files [flow] Bump xplat/js to 0.91 and remove unused suppressions
Summary: Upgrades flow in xplat/js to 0.91. This diff also adds and removes suppressions.

Reviewed By: samwgoldman

Differential Revision: D13720697

fbshipit-source-id: 1bf8830ce286db92277476a2d2404cf0c0dddca2
2019-01-18 14:47:53 -08:00
Janic Duplessis 68b0d4d510 Use RCTBridgeDelegate in the new project template (#23031)
Summary:
The main goal of this change is to fix an issue that happens on iOS when the native app starts before the packager server is available which causes app reloads to fail continually until the app is restarted.

What happens is that with the current setup we call `RCTBundleURLProvider#jsBundleURLForBundleRoot` once in `AppDelegate#didFinishLaunchingWithOptions`. If at that point the packager server is not running yet it will return nil (expected behaviour) and that will be passed to the bridge constructor. Subsequent reloads will keep trying to load this nil bundle url since it has no way to ask `RCTBundleURLProvider` for a new url now that the packager is actually running.

We can fix this by using `RCTBridgeDelegate` instead which is a lot more flexible. Instead of passing the bundle url at construction time it will call the `sourceURLForBridge` method each time the bridge is reloaded. This means that even if the packager is not running yet and that `RCTBundleURLProvider` returns nil for the first invocation, subsequent reloads will call `RCTBundleURLProvider` again for a new value.

Changelog:
----------

[iOS] [Added] - Use RCTBridgeDelegate in the new project template
Pull Request resolved: https://github.com/facebook/react-native/pull/23031

Differential Revision: D13710048

Pulled By: cpojer

fbshipit-source-id: 0059c5c962d508737ae410a82315c11ad305efe8
2019-01-17 02:31:51 -08:00
Sam Goldman 2c7895706d @allow-large-files Deploy Flow v0.90 to xplat/js
Reviewed By: dsainati1

Differential Revision: D13708161

fbshipit-source-id: b83dab505f2739bf4bc5077936e71ebd1800eaf4
2019-01-16 21:55:02 -08:00
Dulmandakh b98964ba39 bump android gradle plugin to 3.3.0 (#22988)
Summary:
Android Gradle Plugin 3.3.0 add many improvements in compile time speed, but also enable R8 shrinker.

Changelog:
----------

[Android] [Changed] - Bump Android Gradle Plugin to 3.3.0
Pull Request resolved: https://github.com/facebook/react-native/pull/22988

Differential Revision: D13676104

Pulled By: hramos

fbshipit-source-id: 5a3834e64816222ee8a4aa6682c07ac6857fc5f6
2019-01-15 14:39:34 -08:00
Héctor Ramos 700c713671 Bump to Android Build Tools 28.0.3, Gradle 4.10.2, Gradle Plugin 3.2.1
Summary: Bump Android Build Tools to Version 28.0.3, Gradle to 4.10.2, and the Android Gradle Plugin to 3.2.1.

Reviewed By: mdvacca

Differential Revision: D13631120

fbshipit-source-id: 709aa25a7a8e1ff0bfc0a969ba6e7cd92850bc0f
2019-01-11 12:24:59 -08:00
Daniel Zlotin f3e5cce474 Use new JavaScriptCore from npm (#22231)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/22231

- Use clang instead of the deprecated gcc
- Use libc++ instead of the deprecated gnustl
- Updated gradle and android plugin version
- Fixed missing arch in local-cli template
- `clean` task should now always succeed
- `clean` task deletes build artifacts
- No need to specify buildToolsVersion. It's derived.
- Elvis operator for more readable code
Pull Request resolved: https://github.com/facebook/react-native/pull/22263

Reviewed By: hramos

Differential Revision: D13004499

Pulled By: DanielZlotin

fbshipit-source-id: da54bb744cedb4c6f3bda590f8c25d0ad64086ef
2018-12-27 14:51:03 -08:00
Nicolas Charpentier 5d06c7495d Replace our local types by flow-typed (#20320)
Summary:
These comments were confusing since we don't use flow-typed.

cc bvaughn.

I have replaced our local types by flow-typed, removed metro custom stub and deleted `flow-github` directory.

As result, createReactClass, PropTypes and Metro types won't be distributed to RN users. If you need it, you should relay on flow-typed.
Pull Request resolved: https://github.com/facebook/react-native/pull/20320

Reviewed By: TheSavior

Differential Revision: D13517157

Pulled By: rickhanlonii

fbshipit-source-id: e52c0b6114114a706f6152b2031c600e3dece0d2
2018-12-20 04:42:34 -08:00
gengjiawen 63ebbd6bfc add basic signature in template (#22665)
Summary:
https://github.com/react-native-community/react-native-cli/issues/38.
add basic signature in template.
Signature file is the same as RNTester.
pass all current ci.
 [Android] [Feature] - add basic signature in template
Pull Request resolved: https://github.com/facebook/react-native/pull/22665

Differential Revision: D13490480

Pulled By: hramos

fbshipit-source-id: 9d0ca4debde2ddbde0d4a611b9b41fc24235314a
2018-12-17 13:34:36 -08:00
glevi@fb.com 24f8d4d3db Deploy v0.89
Reviewed By: jbrown215

Differential Revision: D13457087

fbshipit-source-id: 9f01371ae3515990c5595f1eb2361174050066b8
2018-12-14 13:57:50 -08:00
Nat Mote aaa4a38fbc Upgrade to Flow v0.88.0
Summary:
allow-large-files

https://our.intern.facebook.com/intern/wiki/Flow/Flow_Release_Process/#update-xplat-js

Reviewed By: samwgoldman

Differential Revision: D13418170

fbshipit-source-id: 91ab0d2788c1061b8c81a39f8a017eedea48abe2
2018-12-11 20:01:00 -08:00
Christoph Nakazawa 896bb8a21e Move react-native template
Summary: This diff moves the React Native template from `local-cli/templates/HelloWorld` to `template`. Keeping it in the react-native repo will allow us to make changes to the template and version it together with react-native, instead of moving it out into a separate repo and trying to keep the template in sync with RN.

Reviewed By: TheSavior

Differential Revision: D13372949

fbshipit-source-id: e68e267b4dcf6384535d7b48fc11e297a12e9676
2018-12-07 07:49:19 -08:00