Summary:
This PR tries to consolidate Android native dependencies versions to make it less error prone to version bumps.
Pull Request resolved: https://github.com/facebook/react-native/pull/20742
Differential Revision: D9818155
Pulled By: hramos
fbshipit-source-id: 9bf631640910edad5731014f4e23dbca45af2b59
Summary: This change drops the year from the copyright headers and the LICENSE file.
Reviewed By: yungsters
Differential Revision: D9727774
fbshipit-source-id: df4fc1e4390733fe774b1a160dd41b4a3d83302a
Summary:
Bump android gradle plugin to 3.1.4. We have been stay to 2.x too long. With 3.x we can have instant run and great performance and new features brought by google.
Also thanks to CFKevinRef great pr to make this possible.
pass all current ci. I have also tested RNTester release version works without crash.
https://github.com/facebook/react-native/pull/17967.
[GENERAL] [ANDROID] [FEATURE] - bump android gradle to 3.1.4
Pull Request resolved: https://github.com/facebook/react-native/pull/20767
Differential Revision: D9437576
Pulled By: hramos
fbshipit-source-id: 6084056a1390582a75a879918f2538b0480f6299
Summary:
I found that android support library 27.x (874cca1ac2) requires compileSdkVersion to be 27. Also found that many FB projects use SDK 27.
Pull Request resolved: https://github.com/facebook/react-native/pull/20777
Differential Revision: D9478431
Pulled By: hramos
fbshipit-source-id: ca100f6b5b39e7d112926124423f9510a0efc291
Summary:
This PR removes TextLayoutBuilder, which is not used anywhere.
Pull Request resolved: https://github.com/facebook/react-native/pull/20600
Reviewed By: achen1
Differential Revision: D9367345
Pulled By: hramos
fbshipit-source-id: 407a6a80f5c69650fcc7167b28214f7315beed2f
Summary:
This PR removes infer-annotation from the repo and uses latest version of it from maven.
Pull Request resolved: https://github.com/facebook/react-native/pull/20599
Differential Revision: D9437594
Pulled By: hramos
fbshipit-source-id: 93c33041dd8a61b220c352fb187a23bb2dd1b4db
Summary:
This is a small missing piece from b6f2aad9c0 and will complete fresco version bump.
Pull Request resolved: https://github.com/facebook/react-native/pull/20580
Differential Revision: D9228658
Pulled By: hramos
fbshipit-source-id: 9cf1509a590cedfe4c3358006cfb62533058e946
Summary:
@public
This reverts the Yoga/Java storage experiment. I will follow up with any learnings.
Reviewed By: pasqualeanatriello
Differential Revision: D9168405
fbshipit-source-id: fb227fb9353bd4c4e3bebbe9b04eec1132e532e8
Summary:
@public
Adds another version of property storage for `YogaNode`, using `sun.misc.Unsafe`.
Adopts the stub concept from Litho for `Unsafe`, as it is hidden by the Android SDK.
Reviewed By: pasqualeanatriello
Differential Revision: D9140103
fbshipit-source-id: a4b376eca341b724a00f873467ae8bf8eaac69f4
Summary:
This PR sets gradle targetSdkVersion to 26, which will satisfy new requirements from Play Store. Also removed redundant config from manifest files.
Closes https://github.com/facebook/react-native/pull/19944
Differential Revision: D8679682
Pulled By: hramos
fbshipit-source-id: 5c900d47be1d8b81ce340e38a05d9b309da143c3
Summary:
bump glog to 0.3.5.
Version 0.3.4 added support for libc++ or clang. Starting with revision 11, Android NDK recommends and defaults to clang, so it'll add support for it.
notable changes in 0.3.4 and 0.3.5:
* add libc++ support
* reduce dynamic allocation from 3 to 1 per log message
* style fix for C++11
* Add CMake support
Closes https://github.com/facebook/react-native/pull/19890
Differential Revision: D8662179
Pulled By: hramos
fbshipit-source-id: ae2554d36e5b922e8649fc2ac7afc273a34cc127
Summary:
bump double conversion to 1.1.6.
Version 1.1.2 added ARM 64 support, so it's a step to add support for 64bit in RN.
Closes https://github.com/facebook/react-native/pull/19885
Differential Revision: D8662108
Pulled By: hramos
fbshipit-source-id: 446d83eab4df90efed9c08eac912e7f857b7f253
Summary:
This will bump android build tools to 26.0.3, and will remove warning about newer version of build tools in Android Studio, thus improve developer experience.
Closes https://github.com/facebook/react-native/pull/19831
Differential Revision: D8620094
Pulled By: hramos
fbshipit-source-id: fa1c6739bb7556736c1b323acea88fe87e82f4d7
Summary:
Android Target API Level 26 will be required starting from August 2018, it's so soon 😄.Read https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html
This PR uses android build tools 26.0.2, support library 26.1.0 (with android lifecycle) and setting compileSdkVersion to 26, but leaving minSdkVersion and targetSdkVersion intact, which will make targeting 26 easy.
Circle CI: https://circleci.com/gh/dulmandakh/react-native/209
Everything will build and work just fine.
[ANDROID] [ENHANCEMENT] [TOOLS] - Use android build-tools 26.0.2 and set compileSdk to 26, and use support library version 26.1.0.
Closes https://github.com/facebook/react-native/pull/19662
Differential Revision: D8398855
Pulled By: hramos
fbshipit-source-id: a4066eb04cb5f947efe1f3202b638c1092b79aae
Summary:
This reverts a3931e9531
The open source `test_android` job is not configured to use Android 26 quite yet. I've spent a couple of days trying to get our Android tests back in working order, with no luck.
I'm reverting the change that bumped React Native to use build tools 26 + Android SDK 26. I encourage contributors interested in making this change happen to work on getting our Android tests working with API 26.
This will allow us to focus on getting `test_android` back to green, and _then_ we can work on bumping to API 26 while keeping tests green.
Reviewed By: fkgozali
Differential Revision: D8066226
fbshipit-source-id: 9bfd58a7f081c0971b78b331073e70545c21ca6d
Summary:
Starting August 2018, Google Play will require targetSdkVersion 26 for new applications, and November 2018 for application updates.
This PR will use Android build tools 26.0.3 and compilerSdk 26, then support library version 26.0.2 to make targeting 26 easier in the future.
I think this PR will help to people compile and test their applications, thus make transition easier (smoother). Also we'll have opportunity and time to migrate code to target 26.
https://github.com/facebook/react-native/issues/18095
React Native on android must work as usual
Closes https://github.com/facebook/react-native/pull/19257
Differential Revision: D8010354
Pulled By: mdvacca
fbshipit-source-id: 63ba03585e918b38c2a2adb5d2f2e85d7ce46fae
Summary:
I found many crash reports of imagepipeline in our android app,
this is caused by fresco webp native memory leak, they have fixed it in v1.9.0
fixed wrong pull request of [18848](https://github.com/facebook/react-native/pull/18848)
Test with local build.
Check CI passes.
[ANDROID] [ENHANCEMENT] [Fresco/OkHttp] - Updates Fresco to 1.9.0, OkHttp to 3.10.0
Closes https://github.com/facebook/react-native/pull/18849
Differential Revision: D7651377
Pulled By: mdvacca
fbshipit-source-id: 0bfe79fd3d232b11a6a9380c961b9401c9e0ced9
Summary:
There was a fix around folly::dynamic constructor that will be needed for Fabric work. This was done in 94e964976c (diff-7d1cb97d222ba0c863ea8a8e43b2ee2b) and luckily the release 1 month after the Folly version we used in RN already had the fix, so that we don't need to upgrade to the latest folly yet (minimizing breakages).
Tested by:
* running RNTester xcode project (ios)
* running RNTesterPods workspace via cocoapods
* building android via gradle
Reviewed By: shergin
Differential Revision: D7626037
fbshipit-source-id: cb36ba5b91ba131d4e450300bd620db657cfa1e8
Summary:
The original proguard rules are put in the template, which is not very convenient and easy to get wrong. Because new rules get put, people also has two copy paste the rule. And there are also existing project import react native as a dependency. So the best way to keep a android library project proguard rule is to manage the rule itself, using `consumerProguardFiles` like [dagger](46baef6d96/butterknife/build.gradle (L9)) and other android library project.
<!--
Required: Write your motivation here.
If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged.
-->
Use RNTester to build the release flavor (now it has bugs https://github.com/facebook/react-native/issues/18460, I keep my change in local for now), after build success, run to check if crash.
In the process, I also fix https://github.com/facebook/react-native/issues/12994 and https://github.com/facebook/react-native/issues/6624 by adding the following to proguard rules
```proguard
-keep,includedescriptorclasses class com.facebook.react.bridge.** { *; }
```
<!--
Does this PR require a documentation change?
Create a PR at https://github.com/facebook/react-native-website and add a link to it here.
-->
[ANDROID] [ENHANCEMENT and BUGFIX] [Proguard rules] - inline and fix proguard rules .
<!--
**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**
CATEGORY
[----------] TYPE
[ CLI ] [-------------] LOCATION
[ DOCS ] [ BREAKING ] [-------------]
[ GENERAL ] [ BUGFIX ] [ {Component} ]
[ INTERNAL ] [ ENHANCEMENT ] [ {Filename} ]
[ IOS ] [ FEATURE ] [ {Directory} ] |-----------|
[ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} |
[----------] [-------------] [-------------] |-----------|
EXAMPLES:
[IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
[ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
[CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
[DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
[GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
[INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
Closes https://github.com/facebook/react-native/pull/18461
Differential Revision: D7527533
Pulled By: hramos
fbshipit-source-id: 447dbc16983bcfb597187b40c1be3987a8c5a832
Summary:
This is to help build offline module caches for gradle builds.
allow-large-files
Reviewed By: hramos
Differential Revision: D7441450
fbshipit-source-id: 37ceb070223f0de06720f5c104ecfce2ad6cedfd
Summary:
Update okio dependency from 1.13.0 to 1.14.0.
The interesting feature is `BufferedSource` extending `java.nio.ReadableByteChannel`, allowing to bridge with `java.nio` more easily and integrating with the latest fbjni additions.
Reviewed By: emilsjolander
Differential Revision: D7443269
fbshipit-source-id: e397d7a0436e3fc59ade1f4357f30190ca7bbe35
Summary:
<!--
Required: Write your motivation here.
If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged.
-->
The current version of fresco in use is [v1.3.0](https://github.com/facebook/fresco/releases/tag/v1.3.0) from April 2017. There has been a lot of [improvements](https://github.com/facebook/fresco/releases) since then.
Fresco also depends on OkHttp 3.8.0 and soloader 0.3.0 so I have updated these too. Let me know if there's any reason either of these shouldn't be updated, however this will prevent Fresco from being updated.
The latest version of OkHttp is 3.10.0, but I have kept it as low as possible to allow developers to choose the version.
<!--
Required: Write your test plan here. If you changed any code, please provide us with
clear instructions on how you verified your changes work. Bonus points for screenshots and videos!
-->
Test with local build.
Check CI passes.
<!--
Does this PR require a documentation change?
Create a PR at https://github.com/facebook/react-native-website and add a link to it here.
-->
<!--
Required.
Help reviewers and the release process by writing your own release notes. See below for an example.
-->
[ANDROID] [ENHANCEMENT] [Fresco/OkHttp/SoLoader] - Updates Fresco to 1.8.1, OkHttp to 3.8.0, & SoLoader to 0.3.0
cc foghina
<!--
**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**
CATEGORY
[----------] TYPE
[ CLI ] [-------------] LOCATION
[ DOCS ] [ BREAKING ] [-------------]
[ GENERAL ] [ BUGFIX ] [ {Component} ]
[ INTERNAL ] [ ENHANCEMENT ] [ {Filename} ]
[ IOS ] [ FEATURE ] [ {Directory} ] |-----------|
[ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} |
[----------] [-------------] [-------------] |-----------|
EXAMPLES:
[IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
[ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
[CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
[DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
[GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
[INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
Closes https://github.com/facebook/react-native/pull/18496
Differential Revision: D7361161
Pulled By: foghina
fbshipit-source-id: 6d2c5afb94ce5ff8e621188c2ac60f1ca4b787a6
Summary:
Fix a bug that allows us to run integration tests in our android project, where RN is specified as a module to our project.
sdkHandler does not exist. The android documentation suggests that we should be using android.ndkDirectory instead.
http://tools.android.com/tech-docs/new-build-system/migrating-to-1-0-0
An alternative solution would be to set the environment variable ANDROID_NDK, but we do not want to rely on setting this environemnt variable at a system wide level.
We ran two tests.
1.) perform a gradle sync from within our Android studio project, and verify there is no error output.
2.) build android using ./gradleW, from command land. Verify there are no build errors.
Closes https://github.com/facebook/react-native/pull/14136
Differential Revision: D5327421
Pulled By: shergin
fbshipit-source-id: d9e18519a8ca318f2026eb409b90cb09e2adbda1
Summary: View tags are currently used for end-to-end test IDs. We'd like to overload the tag field with other information such as nativeID (for native refs) and transitionID (for shared element transitions) in the future. Added a key for testID's tag
Reviewed By: AaaChiuuu
Differential Revision: D4833045
fbshipit-source-id: c2f9371c9a3dbb2411e114f4f096f723ac3132c0
Summary:
We use this version internally.
Closes https://github.com/facebook/react-native/pull/12837
Differential Revision: D4688986
Pulled By: mkonicek
fbshipit-source-id: 93d9dedb51a56d6104aae443e939455c44397e88
Summary:
Removing unused code. We used to have this dependency for the RecyclerViewBackedScrollView, which has been removed.
**Test plan (required)**
Tests pass on Circle CI.
Closes https://github.com/facebook/react-native/pull/12636
Differential Revision: D4646561
Pulled By: ericnakagawa
fbshipit-source-id: 285de78debec306078eb9ad34a2339f95bc42a9c
Summary:
A copy of https://github.com/facebook/react-native/pull/7791 because of our very imperfect tools that mirror the changes from pull requests in the fb monorepo. The internal Phabricator revision for #7791 is in an 'abandoned' state (by foghina probably because of changing teams) and Phabricator doesn't allow me to claim that revision and merge it. Therefore I'm creating a new one.
(It's not foghina's fault, no one probably knew about this "abandoned Phabricator revision" edge case, don't remember we hit it before.)
Will try to keep attribution (git blame) to rigdern when merging.
Closes https://github.com/facebook/react-native/pull/12448
Differential Revision: D4584743
Pulled By: mkonicek
fbshipit-source-id: 66e5b88134fca1980adc4cd8a2ff17c42e10022c
Summary: Update the Android RecyclerView, support v4, and annotation libraries to 23.4.0.
Differential Revision: D4345649
fbshipit-source-id: 859c6555bc79358b1c8ffed0629cdf0e83408a00
Summary:
Improvement over https://github.com/facebook/react-native/pull/11469.
Depends on https://github.com/react-native-community/boost-for-react-native/issues/1, **don't merge before it is fixed**.
It would be more in line with other dependencies to depend only on github for thirdparty bridge dependencies.
**Test plan (required)**
- Circle (testing with caches cleaned)
- ./gradlew ReactAndroid:packageReactNdkLibsForBuck (check twice to make sure caches work)
REACT_NATIVE_BOOST_PATH=./path-to-local-boost/
- ./gradlew ReactAndroid:packageReactNdkLibsForBuck (check twice to make sure caches work)
Closes https://github.com/facebook/react-native/pull/11511
Differential Revision: D4348098
fbshipit-source-id: 5c2f25cc395ae0cad19d56b7c0b2b102513580fb
Summary:
Boost is officially hosted on SourceForge which has ab SSL problem that Gradle complains about and also it is sometimes unavailable.
I switched to using npm hosted (yarnpkg mirrored for performance) boost lib exactly the same as from Source Forge.
Other alternatives considered:
- CDN e.g. mirror.nienbo.com started responding with 4XX code when requested by Gradle
- File sharing like DropBox are not for mass anonymous downloads
- Github is not good for binary files and is throttled for anonymous raw file downloads
- S3 or similar. Requires amazon account for maintenance and does not expose semver API and other nice features that npm has
In the future I'd like to try Yarn as dependency management tool for bridge builds, this could be the first step.
**Test plan (required)**
- Circle (testing with caches cleaned)
- `./gradlew ReactAndroid:packageReactNdkLibsForBuck` (check twice to make sure caches work)
- `REACT_NATIVE_BOOST_PATH=./bridge-dependencies/node_modules/boost-react-native-bundle ./
Closes https://github.com/facebook/react-native/pull/11469
Differential Revision: D4339446
Pulled By: mkonicek
fbshipit-source-id: ccc9196e9b675c16a235a318c4861aaa4e263d6e
Summary:
ReactAndroid/build.gradle downloads a number of ad-hoc dependencies from the internet such as boost, JSC headers, and folly. Having the build depend on the internet is problematic. For example, if the site hosting the JSC headers was to go down, then CI builds would start failing.
This change introduces the environment variable REACT_NATIVE_DEPENDENCIES which refers to a path. Developers can pre-download all of the ad-hoc dependencies into that path and then the build process will grab the dependencies from that local path rather than trying to download them from the internet. This solution is in the spirit of the existing REACT_NATIVE_BOOST_PATH hook.
**Test plan (required)**
This change is used by my team's app.
Adam Comella
Microsoft Corp.
Closes https://github.com/facebook/react-native/pull/11195
Differential Revision: D4247080
Pulled By: mkonicek
fbshipit-source-id: 7c4350339c8d509a829e258d8f1bf320ff8eef64
Summary:
This PR removes dependency to Jackson third-party library in Android React Native.
Looking at some older PRs that got merged, it seems like some work had already been done to move away from Jackson.
Anyway, there was only two classes left with a dependency on Jackson. I refactored the code to use android built-in `JsonReader` and `JsonWriter` classes instead.
Prep work was done in https://github.com/facebook/react-native/pull/10516 introducing a few unit tests around serialization, to make sure that refactoring around serialization would not break things.
All references to Jackson in build systems files (BUCK files & build.gradle) have also been removed now that no code depend anymore on this third-party library.
Motivation behind this work is that third-party dependencies in Android React Native can prove to be a pain when trying to integrate React Native components into an already existing large Android application (I know this is not the most common use case for react-native ... yet ;P), that might a
Closes https://github.com/facebook/react-native/pull/10521
Differential Revision: D4226705
Pulled By: mkonicek
fbshipit-source-id: e3a7430a79dd00c871ba3c6a705b0b0c3ec3a701
Summary:
Downloading from the CDN is much faster than from SourceForge, both on my home WiFi and at the office.
I checked using the `diff` utility that both files are identical.
**Test Plan**
Circle CI build on this PR.
Closes https://github.com/facebook/react-native/pull/11087
Differential Revision: D4226538
fbshipit-source-id: a30ec1d94fe3228342c4a198bf65df7a95e0c005
Summary:
In most .gradle files, lines are indented with 4 spaces, but in some places they are indented with 2 spaces. This PR fixes them and enforce it by adding .editorconfig settings.
Closes https://github.com/facebook/react-native/pull/10267
Differential Revision: D4048335
Pulled By: lacker
fbshipit-source-id: df2f2556380f56672cf85690eb1c80e640a6aedf