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

80 Коммитов

Автор SHA1 Сообщение Дата
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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