Commit Graph

92 Commits

Author SHA1 Message Date
gengjiawen 6e356895e7 bump android gradle to 3.1.4 (#20767)
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
2018-08-22 23:19:42 -07:00
Dulmandakh 044b399e65 Bump compileSdkVersion to 27 and buildToolsVersion to 27.0.3 (#20777)
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
2018-08-22 23:19:42 -07:00
Dulmandakh 7ff9352a88 Remove TextLayoutBuilder from ReactAndroid dependency (#20600)
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
2018-08-22 13:48:53 -07:00
Dulmandakh f884a1be69 use latest infer-annotations from maven (#20599)
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
2018-08-22 12:31:19 -07:00
Dulmandakh 874cca1ac2 Bump Android Support Library to 27.1.1 (#20586)
Summary:
This PR bumps Android Support Library version to 27.1.1.

FYI, originally was a part of https://github.com/facebook/react-native/pull/20026.
Pull Request resolved: https://github.com/facebook/react-native/pull/20586

Differential Revision: D9414901

Pulled By: hramos

fbshipit-source-id: 580338e62a924c214accc5d944f17c81ad9e3f9f
2018-08-20 18:08:52 -07:00
Dulmandakh 69912495f9 Bump imagepipeline-okhttp3 to 1.10.0 (#20580)
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
2018-08-08 14:02:26 -07:00
David Aurelio 151ec411aa Back to JNI storage
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
2018-08-06 02:16:22 -07:00
David Aurelio 73d5746122 Add `Unsafe` based storage backend
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
2018-08-05 16:46:26 -07:00
gengjiawen b6f2aad9c0 Upgrade to soloader 0.5.1 (#20325)
Summary:
Upgrade to soloader 0.5.1. Fixes #20323.

pass all current ci.

none

 [GENERAL] [BUGFIX] [ANDROID] - Upgrade to soloader 0.5.1
Pull Request resolved: https://github.com/facebook/react-native/pull/20325

Differential Revision: D9060688

Pulled By: hramos

fbshipit-source-id: 614c0c1e3cd3981a0acb2effab7ddd4e4508cbcd
2018-07-31 01:32:30 -07:00
Dulmandakh 3ea803a814 bump mockito to 2.19.1 (#20317)
Summary:
This PR will bump mockito to 2.19.1, which has many enhancements over 1.x version. Read https://github.com/mockito/mockito/wiki/What%27s-new-in-Mockito-2. Also bumps jsr305 to 3.0.2.
Pull Request resolved: https://github.com/facebook/react-native/pull/20317

Differential Revision: D9071184

Pulled By: hramos

fbshipit-source-id: 109c8adde7dabdb25ddc329ff84ee40c9a0a5e3d
2018-07-30 15:31:38 -07:00
Dulmandakh bfb68c09ee android targetSdkVersion is 26 (#19944)
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
2018-06-28 11:49:32 -07:00
Dulmandakh b5fca80605 bump glog to 0.3.5 (#19890)
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
2018-06-27 12:03:21 -07:00
Dulmandakh f32032e460 bump double conversion to 1.1.6 (#19885)
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
2018-06-27 11:50:02 -07:00
Dulmandakh b569154ae6 bump build tools to 26.0.3 (#19831)
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
2018-06-25 17:17:25 -07:00
Héctor Ramos 5fd5e6b230 Revert "Bump soloader to 0.5.0 (#19676)" (#19739)
Summary:
This reverts commit e3c5524bc6.
Closes https://github.com/facebook/react-native/pull/19739

Differential Revision: D8446714

Pulled By: hramos

fbshipit-source-id: 1b0e78fe57e9864faafcc766364bd76a1ba5bd03
2018-06-15 07:47:43 -07:00
Dulmandakh 065c5b6590 use android build-tools 26.0.2 and set compileSdk to 26 (#19662)
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
2018-06-13 10:39:55 -07:00
Héctor Ramos e3c5524bc6 Bump soloader to 0.5.0 (#19676)
Summary:
Closes https://github.com/facebook/react-native/pull/19676

0.5.0 adds compatibility for Android P.

Reviewed By: mdvacca

Differential Revision: D8379610

fbshipit-source-id: cbef6c2e5e82e2d9e17756b00d210fecb04e8a40
2018-06-12 12:05:17 -07:00
Héctor Ramos da7873563b Migrate Android sources to MIT license header
Reviewed By: fkgozali

Differential Revision: D8065619

fbshipit-source-id: 719c303b40c96950bab8e5dde9a75f449b2956c6
2018-05-31 15:37:30 -07:00
Héctor Ramos 3e0ebc7663 Revert bump to API 26 and fix Android tests failures
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
2018-05-23 13:06:12 -07:00
Dulmandakh a3931e9531 android compileSdkVersion 26, use buildToolsVersion 26.0.3
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
2018-05-15 09:28:41 -07:00
liangtongchuan 6b07602915 Update fresco to v1.9.0, okhttp3 to v3.10.0
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
2018-04-24 09:49:32 -07:00
Kevin Gozali f569b45f4c OSS: upgrade Folly 2016.09.26 => 2016.10.31
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
2018-04-13 17:33:23 -07:00
gengjiawen 9b9b6c845e Inline and fix proguard rules
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
2018-04-05 17:34:53 -07:00
Kevin Gozali 1020ac9481 OSS: add gradle wrapper helper to prepare offline gradle caches
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
2018-03-29 21:17:02 -07:00
David Aurelio 6be7b396ec Update okio
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
2018-03-29 11:18:22 -07:00
Andrew Jack 8e065baad4 Update fresco to v1.8.1
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
2018-03-21 18:10:46 -07:00
David Vacca 331cc791ec Extend Navigation to support "is_fabric" param from native
Reviewed By: fkgozali

Differential Revision: D6955828

fbshipit-source-id: 1a77b652a7e372acf961a0b0772ae93a999b90b1
2018-02-13 13:50:22 -08:00
Felix Oghina 999851a389 Update OSS Fresco dependency
Reviewed By: oprisnik

Differential Revision: D5406106

fbshipit-source-id: 3d928f431701b783fa0862d0dff818ec61d8b737
2017-07-12 07:54:09 -07:00
Alex Kring bb832e1238 Akring integration tests fix
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
2017-06-26 21:01:17 -07:00
Owen Auch e8df8d9fd5 Corrected spelling of the word "properties" in error message in ReactAndroid/build.gradle
Summary:
The misspelling in the error message bothered me.

N/A
Closes https://github.com/facebook/react-native/pull/14425

Differential Revision: D5225388

Pulled By: shergin

fbshipit-source-id: b20f31f0685099ae1d1c3dd2de74dfb33eadfd6e
2017-06-11 00:15:40 -07:00
Pieter De Baets bd5051adeb Move xreact/jni to react/jni
Reviewed By: mhorowitz

Differential Revision: D5155612

fbshipit-source-id: 871a23916c0069498691dc0dd3c94fd2e404cec9
2017-06-01 05:53:25 -07:00
Emil Sjolander 3af9be52b2 Downgrade okhttp in open source
Reviewed By: yungsters

Differential Revision: D5144011

fbshipit-source-id: ef897bf7e03b84e4e60ec6607027666608a460cb
2017-05-27 09:15:20 -07:00
Emil Sjolander 93a1d592d6 Update okhttp3
Reviewed By: bestander

Differential Revision: D5078004

fbshipit-source-id: 79c66cedeeb682d8bb4e67798b41115899fd1c81
2017-05-18 08:16:02 -07:00
Michael Lee 48c27b9a6c Fix gradle build due to renamed boost directory
Reviewed By: yungsters

Differential Revision: D5033507

fbshipit-source-id: 1ab1126e0beb0a72f5a090a7cfeee0d5d99b0d16
2017-05-10 06:03:06 -07:00
Andrew Y. Chen 3bf367cbb7 Use tag ids for testID
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
2017-04-05 12:39:29 -07:00
Martin Konicek 193afff926 Update Boost dependency on Android to 1.63
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
2017-03-10 05:45:28 -08:00
Martin Konicek ee122be97e Android: Remove dependency on recyclerview
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
2017-03-02 16:16:49 -08:00
Martin Konicek 8c0e6ecfc0 Android: Support HTTP headers for source prop on <Image> components
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
2017-02-18 04:45:11 -08:00
Caleb Gomer 573170699f Update Android RecyclerView Library to 23.4.0
Summary: Update the Android RecyclerView, support v4, and annotation libraries to 23.4.0.

Differential Revision: D4345649

fbshipit-source-id: 859c6555bc79358b1c8ffed0629cdf0e83408a00
2016-12-28 18:43:39 -08:00
Ahmed El-Helw d3d5d7b7c9 Update build scripts for Nodes 2016-12-19 13:41:07 -08:00
Konstantin Raev 5d4b476583 boost is downloaded from https://github.com/react-native-community/boost
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
2016-12-19 13:13:28 -08:00
Konstantin Raev 0579efea8c Switched to npm hosted boost lib
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
2016-12-16 06:43:33 -08:00
Martin Konicek 70f07b1e4e Revert to downloading Boost from SourceForge for now
Summary: The unpkg mirror started returning HTTP 403 Forbidden for some reason.

Reviewed By: mkonicek

Differential Revision:
D4278637
Ninja: OSS only, tests already broken

fbshipit-source-id: 7dbfce40e8246f2a021ebe2592d24fa86c12bf21
2016-12-05 11:58:34 -08:00
Adam Comella aac8daf378 Android: Enable ad-hoc dependencies to be pre-downloaded
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
2016-11-29 14:28:34 -08:00
Benoit Lemaire 6fef014295 Remove Jackson dependency
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
2016-11-23 08:59:50 -08:00
Martin Konicek 1488725db3 Use a CDN to download Boost
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
2016-11-23 06:58:27 -08:00
Yoshiya Hinosawa 71676809d6 Fix indent of .gradle files
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
2016-10-19 16:58:36 -07:00
Pieter De Baets 86c195b3d8 Upgrade OSS folly dependency
Reviewed By: bestander

Differential Revision: D3952605

fbshipit-source-id: 70146987c07b3c9917d19d7fbf844242343f9777
2016-09-30 15:28:38 -07:00
Aaron Chiu 605a0a62dc Add annotation processor to create static ReactModule infos
Reviewed By: lexs

Differential Revision: D3781016

fbshipit-source-id: 8169e8b55fc044df2230fd01e912c4e96a044f98
2016-09-01 19:28:57 -07:00
Adam Comella e6de198a4b Fix gradle clean task
Summary:
Running the command `./gradlew clean` resulted in the following error:

```
./node_modules/react-native/ReactAndroid/src/main/jni//xreact/jni/Android.mk:42: *** Android NDK: Aborting.    .  Stop.
Android NDK: ./node_modules/react-native/ReactAndroid/src/main/jni//xreact/jni/Android.mk: Cannot find module with tag 'cxxreact' in import path
Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?
Android NDK: The following directories were searched:
```

The problem was that `REACT_COMMON_DIR` wasn't defined.

**Test plan (required)**

Running `./gradlew clean` now works.

Adam Comella
Microsoft Corp.
Closes https://github.com/facebook/react-native/pull/9607

Differential Revision: D3780364

fbshipit-source-id: 2b45d538413f7ee2cf0b36a1fa33287f0b1bf23f
2016-08-26 17:13:44 -07:00