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

239 Коммитов

Автор SHA1 Сообщение Дата
Janic Duplessis 9b2374b542 Release underlying resources when JS instance is GC'ed on Android try 2 (#26155)
Summary:
Reland https://github.com/facebook/react-native/pull/24767

The commit had to be reverted because it caused a crash when using remote debugging in chrome. This is normal since jsi is not available in that environment. The crash was caused by `jsContext.get()` being 0, then being dereferenced later in c++. We can simply skip initializing the blob collector in this case.

This also includes the fix from https://github.com/facebook/react-native/issues/25720 to fix a crash when using hermes.

## Changelog

[Android] [Fixed] - Release underlying resources when JS instance is GC'ed on Android
Pull Request resolved: https://github.com/facebook/react-native/pull/26155

Test Plan:
Test using RN tester with jsc and hermes
Test remote debugging

Reviewed By: mdvacca, fred2028

Differential Revision: D17072644

Pulled By: makovkastar

fbshipit-source-id: 079d1d43501e854297fbbe586ba229920c892584
2019-09-18 04:52:43 -07:00
Dulmandakh 7c8e266e39 lazy configure ReactAndroid gradle tasks (#26314)
Summary:
ReactAndroid Gradle was failing mysteriously with error below, because it was trying to read values from **android** when it wasn't configured completely.

```java
extensionSupplier.get()!!.compileSdkVersion must not be null
```

or

```java
compileSdkVersion is not specified.
```

It is happening because **buildReactNdkLib** task was created and configured eagerly. So this PR changes some tasks to be configured lazily, and reads values from **android** when ready. Also remove ANDROID_NDK variable check because android gradle plugin doing it automatically.

## Changelog

[Android] [Changed] - lazily configure ReactAndroid gradle tasks
Pull Request resolved: https://github.com/facebook/react-native/pull/26314

Test Plan: ./gradlew ReactAndroid:tasks run without errors, while master throws exception.

Differential Revision: D17177945

Pulled By: cpojer

fbshipit-source-id: c7a165092157d2059f946da70b801d1a475d4b8c
2019-09-18 02:34:46 -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
Pascal Hartig 35fc0add2d Remove vendored proguard annotation (#26069)
Summary:
There have been multiple complaints about combining RN with various
other FB libraries, including Litho and Flipper, because of bundled dependencies
that can't be deduplicated by Gradle.

This is one of three current conflicts:

1) Proguard annotations (this PR)
2) Yoga
3) fbjni

While the Yoga group name doesn't make a massive amount of sense
it was the easiest existing package to use and since we don't
have a better namespace for this, we might as well use this.

A similar change to Litho is landing right now.

## Changelog

[Android] [Changed] - Use centralized package for DoNotStrip annotation
Pull Request resolved: https://github.com/facebook/react-native/pull/26069

Test Plan:
```
yarn
./gradlew :RNTester:android:app:assembleDebug
```

Reviewed By: cpojer

Differential Revision: D16827430

Pulled By: passy

fbshipit-source-id: 87542b5422fee598d8e635651441f0ecd42eb9d7
2019-08-15 06:04:16 -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
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
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
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
Fred Liu 983ba63025 Back out "[RN][Android] Release underlying resources when JS instance is GC'ed on Android"
Summary: Original commit changeset: 12f14fa4a582

Reviewed By: furdei

Differential Revision: D16494091

fbshipit-source-id: f3080873a11ebb376e819b102fc13efe97146a89
2019-07-25 08:43:07 -07:00
Oleksandr Melnykov 88e18b6c8d Release underlying resources when JS instance is GC'ed on Android
Summary:
[Android] [Added] - Release underlying resources when JS instance is GC'ed on Android

D15826082 was reverted because it introduced a crash in Ads Manager for Android (see P67222724).

This diff fixes the crash and re-applies D15826082. The problem was that `jni::findClassStatic` in the destructor of BlobCollector.cpp couldn't find the Java class `com/facebook/react/modules/blob/BlobModule` and crashed the app.

JNI didn't seem to have access to the Java class loader probably because the destructor was called from a non-Java thread (https://our.intern.facebook.com/intern/wiki/Fbjni/environment-and-thread-management/?vitals_event=wiki_click_navigation_link#threads). The fix is to wrap the code in the destructor inside `ThreadScope::WithClassLoader `, which will allow to run code that has full access to Java as though you were running in a Java thread.

Reviewed By: shergin

Differential Revision: D16122059

fbshipit-source-id: 12f14fa4a58218242a482c2c3e2149bb6770e8ec
2019-07-09 02:20:55 -07:00
Oleksandr Melnykov a15eecf6bd Back out "[RN][Android] Release underlying resources when JS instance is GC'ed on Android"
Summary:
Since Ads Manager for Android is crashing when a user tries to log in, I'm reverting D15826082 for now. Will investigate the reason of the crash later.

Crashlog: P67222724

Reviewed By: cpojer

Differential Revision: D15939152

fbshipit-source-id: bc1276e6057418821e1ebd90203bea586943b633
2019-06-21 05:28:43 -07:00
Oleksandr Melnykov 3a8b988cb2 Release underlying resources when JS instance is GC'ed on Android
Summary:
[Android] [Added] - Release underlying resources when JS instance is GC'ed on Android

D15279651 introduced a crash for Oculus Twilight on Android (T45199437), so it was reverted by D15611385.

This diff fixes the crash and re-applies D15279651. The problem was that ProGuard renamed BlobModule.remove() to BlobModule.release(), but the C++ code in `BlobCollector.cpp` still expected the old name. I confirmed this by looking at the Extracted Symbols file for the build which introduces the crash (https://fburl.com/mobile/ud40od3i):

```
com.facebook.react.modules.blob.BlobModule -> com.facebook.react.modules.blob.BlobModule:
...
8190:8193:void remove(java.lang.String):190:193 -> release
...
```

See the full log file here: https://fburl.com/pn02bwkb.

The solution is to annotate the method with `DoNotStrip` so that ProGuard doesn't rename it.

Reviewed By: mdvacca, cpojer

Differential Revision: D15826082

fbshipit-source-id: f7470d394666cd34c1acae5c6ffaecc84d5ca5a3
2019-06-20 02:49:19 -07:00
Nate 995b4d3049 Android Fix for 9145: No longer hard code build port (#23616)
Summary:
### Problem

According to https://github.com/facebook/react-native/issues/9145, the `--port` setting is not respected when executing `react-native run-android`. The templates that report things like what port the dev server runs on are hard coded as well.

### Solution

This commit replaces the hardcoded instances of port 8081 on Android with a build configuration property. This allows setting of the port React Native Android connects to for the local build server.

For this change to work, there must also be an update to the react native CLI to pass along this setting:

https://github.com/react-native-community/react-native-cli/compare/master...nhunzaker:9145-android-no-port-hardcode-cli

To avoid some noise on their end, I figured I wouldn't submit a PR until it's this approach is deemed workable.

## Changelog

[Android][fixed] - `react-native run-android --port <x>` correctly connects to dev server and related error messages display the correct port
Pull Request resolved: https://github.com/facebook/react-native/pull/23616

Differential Revision: D15645200

Pulled By: cpojer

fbshipit-source-id: 3bdfd458b8ac3ec78290736c9ed0db2e5776ed46
2019-06-05 06:15:06 -07:00
Kody Greenbaum 7cf939b0ad Back out "[react-native][PR] [Blob] Release underlying resources when JS instance is GC'ed on Android"
Summary: Testing if reverting this fixes the android instacrash. Original commit changeset: 2bbdc4bbcbea

Reviewed By: cpojer

Differential Revision: D15611385

fbshipit-source-id: 396fc0698e1056c93dbb154f95c8cc13924d5495
2019-06-05 01:49:54 -07:00
Kudo Chien 6b4e526b2d Add debug build support for Android native code (#25147)
Summary:
With JSI based architecture, there will be more and more C++ native code involved.
Original NDK builder in RN only supports release build and that's not reasonable for native debugging.
This change introduces a way to build native code in debuggable version.

Simply add `NATIVE_BUILD_TYPE=Debug` environment variable during gradle build,
e.g.
`NATIVE_BUILD_TYPE=Debug ./gradlew clean :ReactAndroid:assembleDebug`

## Changelog

[Android] [Added] - Add native debug build support to improve debugging DX
Pull Request resolved: https://github.com/facebook/react-native/pull/25147

Differential Revision: D15628533

Pulled By: cpojer

fbshipit-source-id: 8f5b54c4580824452d2a1236a7bd641889b001ec
2019-06-04 12:46:16 -07:00
Janic Duplessis a4f7e17a4f Release underlying resources when JS instance is GC'ed on Android (#24767)
Summary:
Android followup for #24745. This adds a jsi object that removes blobs when it is gc'ed. We don't have many modules with native code on Android so I've added the native code directly in the blob package as a separate .so. I used a similar structure as the turbomodule package.

## Changelog

[Android] [Fixed] - [Blob] Release underlying resources when JS instance is GC'ed on Android
Pull Request resolved: https://github.com/facebook/react-native/pull/24767

Differential Revision: D15279651

Pulled By: cpojer

fbshipit-source-id: 2bbdc4bbcbeae8945588ac5e3e895c49e6ac9e1a
2019-05-31 03:55:27 -07:00
Petter Hesselberg 2aca234dee Don't reference null android.ndkDirectory in build.gradle (#25088)
Summary:
If you (try to) build React Native for Android without having the NDK properly installed and referenced, you get the following error:

>A problem occurred evaluating project ':ReactAndroid'.
\> Cannot get property 'absolutePath' on null object

This is not an overly helpful diagnostic. This PR results in this message instead:

>ndk-build binary cannot be found, check if you've set $ANDROID_NDK environment variable correctly or if ndk.dir is setup in local.properties

Fixes #25087

## Changelog

[Android] [Fixed] - Show proper error message instead of throwing a NullReferenceException if Gradle cannot find the NDK
Pull Request resolved: https://github.com/facebook/react-native/pull/25088

Differential Revision: D15559271

Pulled By: cpojer

fbshipit-source-id: 35c9a9321af4e4a34bf519144ada48884b48352d
2019-05-30 11:11:09 -07:00
Dulmandakh 654868da33 revert gradle download plugin import (#24863)
Summary:
Revert Gradle download plugin import, because new way is causing some issues when building from source.

## Changelog

[Android] [Changed] - revert Gradle download plugin import
Pull Request resolved: https://github.com/facebook/react-native/pull/24863

Differential Revision: D15352002

Pulled By: cpojer

fbshipit-source-id: 5996ce8aeeca1fdd8b43fdc9087af705cf7f682d
2019-05-15 03:31:04 -07:00
Marc Horowitz 709baabb62 add to inputs in buildReactNdkLib so gradle will rebuild on more changes
Summary: This make iteration work better without needing to clean as much

Reviewed By: willholen

Differential Revision: D15018285

fbshipit-source-id: 034f5529e2e51711aeaa75360ad10bb1f85c7fb8
2019-05-01 18:44:26 -07:00
Marc Horowitz 7486c77ab5 make prepareGlog idempotent
Summary:
The path to copy log_severity.h could refer to the
destination, which would result in an empty file being copied on some
rebuilds.

Reviewed By: willholen

Differential Revision: D15018283

fbshipit-source-id: 0081526a9686de8c74753738c165753de6dda18d
2019-05-01 18:44:26 -07:00
Dulmandakh bb6f316c87 Gradle KTS (#24631)
Summary:
Convert root Gradle script to Kotlin DSL, and cleanup. Currently, there is not much benefit or advantage over Groovy scripts, except IDE support and it'll cache compiled KTS scripts on first run.

[Android] [Changed] - Convert root Gradle script to Kotlin DSL, and cleanup.
Pull Request resolved: https://github.com/facebook/react-native/pull/24631

Differential Revision: D15120190

Pulled By: cpojer

fbshipit-source-id: 86691db5c7746e71bb243ebc263c1a3075ee9a9e
2019-04-29 02:41:05 -07:00
Kudo Chien 040502b5d9 Fix jsc-android not found if building from source (#24547)
Summary:
If an app [builds from RN source](https://facebook.github.io/react-native/docs/building-from-source), there was an error for jsc-android not found.
It is a side effect of my previous [JSC as node dependency change](8e375850de)
For building from RN source case, the jsc-android is located at `/path/to/app/node_modules/jsc-android`.
Original gradle task will try to find it at `/path/to/app/node_modules/react-native/ReactAndroid/../node_modules/jsc-android`, as ReactAndroid project path was being override inside node_modules.
The change fixes the building from source case.

N/A
This change does not need to publish into changelog, as it is a master branch building fix.
Pull Request resolved: https://github.com/facebook/react-native/pull/24547

Differential Revision: D15044703

Pulled By: cpojer

fbshipit-source-id: a7d824b1a14064d46c4a2ec9ea28255179174c83
2019-04-23 02:27:44 -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 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
David Vacca 8d5ac8de76 Migration of RN-Android OSS tests to Android X
Summary:
This diff migrates RN to AndroidX.
As part of this diff I disabled few tests in RNAndroid OSS that will be re-enabled this week. As part of the refactor of BUCK files in OSS

Reviewed By: shergin

Differential Revision: D14200097

fbshipit-source-id: 932fcae251d1553e672acd67ecd0e703dcb364aa
2019-03-17 08:13:30 -07: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 8ccc55fbd3 Prepare Groovy scripts for Kotlin DSL migration (#23355)
Summary:
Using Kotlin DSL in Gradle instead of Groovy will help detect problems early on using static typing, and it has advanced IDE support. This PR prepares Groovy script for Kotlin DSL migration per **Migrating build logic from Groovy to Kotlin** guide. Here is the excerpt:

>As a first migration step, it is recommended to prepare your Groovy build scripts by
> - unifying quotes using double quotes,
> - disambiguating function invocations and property assignments (using respectively parentheses and assignment operator).

See: https://guides.gradle.org/migrating-build-logic-from-groovy-to-kotlin/

[Android] [Changed] - Prepare Gradle scripts for Kotlin DSL migration
Pull Request resolved: https://github.com/facebook/react-native/pull/23355

Differential Revision: D14018504

Pulled By: mdvacca

fbshipit-source-id: 909982c715b640f102cbe723df578c9af7bae08e
2019-02-09 10:18:07 -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
Dulmandakh 07d1075f37 bump soloader to 0.6.0 (#23239)
Summary:
Bump soloader to 0.6.0, which added support for App Bundling and help reduce app size.

[Android] [Changed] - Bump Soloader to 0.6.0

CI is green and everything works just fine.
Pull Request resolved: https://github.com/facebook/react-native/pull/23239

Differential Revision: D13915901

Pulled By: cpojer

fbshipit-source-id: 917705326b76fc3356828e5d00e6148e292bd12a
2019-02-01 03:40:37 -08:00
Michel dos Santos Kuguio 5be50d4820 - update to gradle 4.10.1 or high (#23103)
Summary:
Add suport to gradle 4.10.1 or high!
The new version of android studio 3.3 recommendete to update gradle project to 4.10.1

> To take advantage of the latest features, improvements, and security fixes, we strongly recommend that you update the Android Gradle plugin to version 3.3.0 and Gradle to version 4.10.1. [Release notes ](https://developer.android.com/studio/releases/gradle-plugin)

>Android plugin 3.2.0 and higher now support building the Android App Bundle—a new upload format that defers APK generation and signing to compatible app stores, such as Google Play. With app bundles, you no longer have to build, sign, and manage multiple APKs, and users get smaller, more optimized downloads. [Learn more](https://developer.android.com/guide/app-bundle/?utm_source=android-studio)

but if the upgrade to the new Android gradle many warnings come up, becouse meny things was obsoleted

> WARNING: API 'variant.getMergeResources()' is obsolete and has been replaced with 'variant.getMergeResourcesProvider()'.

> WARNING: API 'variant.getPackageApplication()' is obsolete and has been replaced with 'variant.getPackageApplicationProvider()'.

> WARNING: API 'variant.getMergeAssets()' is obsolete and has been replaced with 'variant.getMergeAssetsProvider()'.

> It will be removed at the end of 2019.
> For more information, [see ](https://d.android.com/r/tools/task-configuration-avoidance.)
> To determine what is calling variant.getMergeAssets(), use -Pandroid.debug.obsoleteApi=true on the command line to display a stack trace.

Changelog:
----------
[Android] [Deprecated] - fix warinings obsolete to update to gradle 4.10.1 or high
Pull Request resolved: https://github.com/facebook/react-native/pull/23103

Differential Revision: D13817123

Pulled By: cpojer

fbshipit-source-id: 9816e20145a5fded2702cf9317cfb6862f3ebd8b
2019-01-25 03:26:32 -08:00
David Vacca fe6f6cd46f Upgrade Android support library to version 28 in RN
Summary: This diff upgrades the Android Support Library to use version 28.0.0

Reviewed By: cpojer

Differential Revision: D13737512

fbshipit-source-id: 7b3d9c384df0b25e5ce48e769e1ff0ac9be9f104
2019-01-22 10:44:53 -08:00
Kudo Chien e3ff15052a Remove unused files and code for old JSC and gcc build (#23014)
Summary:
----------

1. Unused prebuilt old JSC for 64bits.
2. Folly patch for gcc build.
Pull Request resolved: https://github.com/facebook/react-native/pull/23014

Differential Revision: D13690139

Pulled By: cpojer

fbshipit-source-id: 64555f5b9a5fbd4156e42eeff13da721846c2521
2019-01-16 04:01:53 -08:00
Dulmandakh 64de0c0aef bump okhttp to 3.12.1 (#22877)
Summary:
Bump OkHTTP to 3.12.1.

Changelog:
----------
[Android] [Changed] - bump OkHTTP 3.12.1
Pull Request resolved: https://github.com/facebook/react-native/pull/22877

Differential Revision: D13639172

Pulled By: hramos

fbshipit-source-id: 780d10207877637592ea3eb25eff445bc2986f91
2019-01-14 10:34:30 -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
Dulmandakh 9d00d4d5bb Bump Android SDK to 28, Build Tools to 28.0.2, Gradle to 4.7, Gradle Plugin to 3.2.0 (#21632)
Summary:
This PR is bumping compileSdkVersion to 28, buildToolsVersion to 28.0.2, Gradle to 4.7, Android Gradle plugin to 3.2.0.

Gradle 4.7 added support for Java 10 and 11.

allow-large-files

Release Notes:
--------------
[ANDROID] [ENHANCEMENT] [SDK] - bump to 28

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

Reviewed By: mdvacca

Differential Revision: D13084836

Pulled By: hramos

fbshipit-source-id: e0f493881e80e87faf8c3ef1ac77044495966a49
2018-12-05 09:06:31 -08:00
Nick Novitski 4514041b44 - Resolve two gradle deprecation warnings (#22360)
Summary:
> Configure project :ReactAndroid
> The Task.leftShift(Closure) method has been deprecated. This is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.

> Task :ReactAndroid:buildReactNdkLib
> A problem was found with the configuration of task ':ReactAndroid:buildReactNdkLib'. Registering invalid inputs and outputs via TaskInputs and TaskOutputs methods has been deprecated and is scheduled to be removed in Gradle 5.0.
> - File '[...]/react-native/ReactAndroid/src/main/jni/react' specified for property '$1' is not a file.
Pull Request resolved: https://github.com/facebook/react-native/pull/22360

Differential Revision: D13176269

Pulled By: hramos

fbshipit-source-id: cf6d498049b955d3920d356f2d68f3bc43008c56
2018-11-22 18:36:59 -08:00
Kudo Chien 0a293a014b Fix ReactAndroid build break. (#22377)
Summary:
During C++ build, we need the libjsc.so.
  But arm64-v8a and x86_64 libjsc.so are in different path and this error raised:

    Android NDK: ERROR:/home/circleci/react-native/ReactAndroid/build/third-party-ndk/jsc/Android.mk:jsc: LOCAL_SRC_FILES points to a missing file
    /opt/ndk/android-ndk-r17c/build/core/prebuilt-library.mk:45: *** Android NDK: Aborting    .  Stop.
    Android NDK: Check that /home/circleci/react-native/ReactAndroid/build/third-party-ndk/jsc/jni/arm64-v8a/libjsc.so exists  or that its path is correct

  The commit moves prebuilt libjsc.so into
  ReactAndroid/src/main/jni/third-party/jsc/jni and let ndkbuild script find the prebuilt libjsc.so.
  For AAR packaging, modify the jniLibs so that gradle android library plugin could find the prebuilt libjsc.so as well.
Pull Request resolved: https://github.com/facebook/react-native/pull/22377

Differential Revision: D13166556

Pulled By: hramos

fbshipit-source-id: 61daaede7defbc66491a3e2f20058e7d248ba13e
2018-11-21 21:34:36 -08:00
gengjiawen f22473e9e9 Fix jsc regression.Fixes #22274 (#22293)
Summary:
My silly mistake when tinkering with the jsc lib. Also you have this patch first https://github.com/facebook/react-native/pull/22295.
Kudo plz review.

![image](https://user-images.githubusercontent.com/3759816/48561684-758f6f00-e92b-11e8-905b-e394f72349f7.png)
Pull Request resolved: https://github.com/facebook/react-native/pull/22293

Differential Revision: D13153931

Pulled By: hramos

fbshipit-source-id: 8a6efa0cd8abbff359f082d5ea7713933b6e7ac6
2018-11-21 14:36:33 -08:00
Kudo Chien a316dc6ec3 Upgrade folly to v2018.10.22.00 for Android (#21977)
Summary:
Fixes #20302 (For Android)

Note:
------
1. New folly will have build break for a gcc-4.9 and gcc-4.9 seems to be deprecated for latest folly.
    As we only use partial folly implementations, I just fixed the build break part.
    To support building RN on Windows, the patches are written by gradle ReplaceTokens.

2. The change for glog copying header into exported/ is to prevent build break for folly.
    `folly/detail/Demangle.h` will try to use libstdc++'s demangle.h. Unfortunately, glog also has a demangle.h in source code. So I copy exported headers and only search headers in exported/ folder during build.
Pull Request resolved: https://github.com/facebook/react-native/pull/21977

Reviewed By: hramos

Differential Revision: D12818133

Pulled By: fkgozali

fbshipit-source-id: 2c1f6f012663204581a86141d0c9ed0eb9d8c698
2018-10-29 12:06:37 -07:00
Marc Horowitz 6370b86c1f Get RNTester to compile and run
Summary:
This diff includes a few changes:
1. Move the headers inside `jsiexecutor` into `jsiexecutor/jsireact`. As far as I'm aware, the Android ndk build system isn't flexible enough to support header namespaces, so we can't just expose the headers inside the `jsiexecutor` directory under the `jsireact` namespace. Therefore, I moved the headers to `jsiexecutor/jsireact`, and added `jsiexecutor` to the header search path.  This was the easiest way to simulate `jsireact` namespace.
2. Setup the Android.mk files to get RNTester compiling and running.
3. Introduce a `jscexecutor` module to make `JSCExecutor.java` execute without throwing.

**Note:** Moving the header files inside `jsiexecutor` probably breaks the iOS builds and internal builds. I'll fix those in subsequent diffs on this stack.

Reviewed By: shergin

Differential Revision: D9995429

fbshipit-source-id: 418a4ee91f585842c5e317af2f300227a51e9ba8
2018-10-18 01:06:24 -07:00
Lorenzo Sciandra 15c05988e9 Update to Detox 9 (#21570)
Summary:
Updating to Detox 9 - this should help with better Xcode 10 support, and should fix https://github.com/facebook/react-native/issues/21539.

I've updated to fixed `9.0.4` since it seems that each version is fairly different from the next, and I've followed the [migration guide](https://github.com/wix/detox/blob/master/docs/Guide.Migration.md#migrating-from-detox-8xx-to-9xx) for the android native dependencies.

Release Notes:

[INTERNAL] [ENHANCEMENT] [DETOX] - Update to version 9.0.4

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

Reviewed By: TheSavior

Differential Revision: D10242373

Pulled By: RSNara

fbshipit-source-id: bd29d554e0972f16d96b9b39b86c7143941d5b7c
2018-10-10 10:01:21 -07:00
gengjiawen 0a2825f8b3 add x86_64 arm64-v8a support. Fixes #2814 (#18754)
Summary:
add arm64 support, related issue : https://github.com/facebook/react-native/issues/2814.
If we are okay with binary aar android-jsc, then the pr can be directly merged. Otherwise merge facebook/android-jsc#30 first and do a new release.

RNTester all variant works. You can also test the apk from here: https://github.com/gengjiawen/react-native/releases/tag/v0.56beta.

https://github.com/facebook/android-jsc/pull/30.

 [ANDROID] [ENHANCEMENT] [ABI] - add x86_64 arm64-v8a support.

Differential Revision: D9491481

Pulled By: hramos

fbshipit-source-id: d6ec6992768eb0c0866a0317273e09fae5b8935e
2018-09-24 11:32:56 -07:00
Héctor Ramos 5068dfcad3 Use Android SDK 27 in React Native
Summary:
Upgrade React Native to Android SDK 27 again, following the reversal in D9886607 (68c7999c25).

The SDK 27 is actually available internally in an alternate location that is suitable for use cases like React Native's. For future reference, SDK 28 is also available for use in this location.

Reviewed By: axe-fb

Differential Revision: D9929066

fbshipit-source-id: 9413f891d5587293a30544351340e9407a2dce55
2018-09-20 07:56:23 -07:00
Héctor Ramos 68c7999c25 Downgrade to compileSdkVersion 26
Summary:
Go back to using compileSdkVersion 26 and targetSdkVersion 26, temporarily. We can re-add this once Android SDK 27 becomes available in Facebook's internal repository.

The Android SDK Build Tools 27.0.3 **are** available, so we can continue using those.

Reviewed By: axe-fb

Differential Revision: D9886607

fbshipit-source-id: 6c1c9c1e1309c3a0483cc4c0bd8dcb4a5f29fc7e
2018-09-18 08:02:50 -07:00
gengjiawen 4f49404e15 bump android target version to 27 (#20843)
Summary:
bump target version to 27
pass all current ci.
none
[GENERAL] [ANDROID] [FEATURE] - bump android target version to 27
Pull Request resolved: https://github.com/facebook/react-native/pull/20843

Differential Revision: D9845999

Pulled By: hramos

fbshipit-source-id: 3c532a2d5a2b7d201bacab54cf3d60e1efffb653
2018-09-15 05:47:09 -07:00
Dulmandakh ba608a2db7 Consolidate native dependencies versions (#20742)
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
2018-09-13 15:49:00 -07:00
Héctor Ramos 1151c096da Update copyright headers to yearless format
Summary: This change drops the year from the copyright headers and the LICENSE file.

Reviewed By: yungsters

Differential Revision: D9727774

fbshipit-source-id: df4fc1e4390733fe774b1a160dd41b4a3d83302a
2018-09-11 15:33:07 -07:00
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
Felix Oghina 37ab1c8844 Remove dependency on launcher from instrumentation tests
Reviewed By: bestander

Differential Revision: D3736847

fbshipit-source-id: d39a227fe8753f3766521fd23440933adba9e8c7
2016-08-19 06:58:43 -07:00
Aaron Chiu 1feb462f44 Add LazyReactPackage
Summary:
LazyReactPackage is an extension of ReactPackage that allows us to lazily construct native modules.
It's a separate class to avoid breaking existing packages both internally and in open source.

Reviewed By: astreet

Differential Revision: D3334258

fbshipit-source-id: e090e146adc4e8e156cae217689e2258ab9837aa
2016-08-10 17:13:27 -07:00
Think Wu 37df151562 fix cleanReactNdkLib task failure caused by module not found
Summary:
The `clean` task always fail due to the failure of the `cleanReactNdkLib` task, error messages:

```
:ReactAndroid:cleanReactNdkLib
Android NDK: /my/react-native/ReactAndroid/src/main/jni/react/jni/Android.mk: Cannot find module with tag 'react' in import path
Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?
Android NDK: The following directories were searched:
Android NDK:
make: Entering directory `/my/react-native/ReactAndroid/src/main/jni/react/jni'
make: Leaving directory `/my/react-native/ReactAndroid/src/main/jni/react/jni'
/my/react-native/ReactAndroid/src/main/jni/react/jni/Android.mk:31: *** Android NDK: Aborting.    .  Stop.
:ReactAndroid:cleanReactNdkLib FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':ReactAndroid:cleanReactNdkLib'.
> Process 'command '/usr/local/opt/android-ndk/ndk-build'' finished with non-zero exit value 2

* Try:
Run with --stacktrace option to get the stack trace. Run with --info
Closes https://github.com/facebook/react-native/pull/7935

Differential Revision: D3646120

Pulled By: bestander

fbshipit-source-id: c869ff4a2d3407643fdeec431f454071747eb429
2016-07-29 17:58:26 -07:00
Andrew Jack c47f7457c0 Update OkHttp to 3.4.0 and Okio to 1.9.0
Summary:
- 3.3.1 wasn't compatible with Robolectric 3.0, however 3.4.0 [fixes](https://github.com/square/okhttp/issues/2533#issuecomment-230198063) this issue.
- Few other fixes to OkHttp mentioned in the [CHANGELOG.md](https://github.com/square/okhttp/blob/master/CHANGELOG.md)

> Fixes: #7743
>
- Android apps can recover from a `REFUSED_STREAM` in HTTP/2.
- A few other fixes mentioned in the [CHANGELOG.md](https://github.com/square/okhttp/blob/master/CHANGELOG.md)

- CircleCi
- Test with `/Examples` 
Closes https://github.com/facebook/react-native/pull/8672

Reviewed By: alsutton

Differential Revision: D3541293

Pulled By: bestander

fbshipit-source-id: 76429861b4f4df15cb9c18ab0f177daee3e1459d
2016-07-20 06:43:33 -07:00
Michał Gregorczyk dd06b74157 Make SoLoader an external dependency
Reviewed By: bestander

Differential Revision: D3535233

fbshipit-source-id: 9fddb654123a7606d46069a98e2f68dec7f520fa
2016-07-08 16:48:13 -07:00
Marc Horowitz 7f790dc0de Pull an updated version of fbjni into RN OSS
Differential Revision: D3521227

fbshipit-source-id: 57db97ea2af2b2c9e55f380ce05d9e78a5f9d48c
2016-07-06 12:58:42 -07:00
Chris Hopman c1f7aa3824 Change gradle ndk build inputs back to what they were
Reviewed By: bestander

Differential Revision: D3442666

fbshipit-source-id: 735cb7e908670fa9b1ec58a533a2c59008ccc154
2016-06-30 14:28:23 -07:00
leeight 658acba0b6 Add missing `java` directory in ReactAndroid/build.gradle
Summary:
Fix Android Studio warnings for https://github.com/facebook/SoLoader package.
Closes https://github.com/facebook/react-native/pull/8221

Differential Revision: D3492863

Pulled By: bestander

fbshipit-source-id: 984c24f3a3bc084adf1b79e24b33da0c01a6e4c6
2016-06-28 04:28:23 -07:00
Andrei Coman 675c55e8ad Update fresco from 0.10.0 to 0.11.0
Summary: Updating to new release from 16.06.2016.

Reviewed By: bestander

Differential Revision: D3444598

fbshipit-source-id: d8c14b3d088bab6c08effcdacde9bf2eccb20d68
2016-06-17 02:58:24 -07:00
Konstantin Raev 192f6ddf82 another fix to OSS tests
Summary: Closes https://github.com/facebook/react-native/pull/8151

Differential Revision: D3444091

fbshipit-source-id: a8a43a56332c66b0af84695aa54fb1e4c5d659f6
2016-06-16 04:14:28 -07:00
Chris Hopman d344963123 Invert native dependency of new bridge -> old bridge
Reviewed By: mhorowitz

Differential Revision: D3409230

fbshipit-source-id: 541309ec953843477197e5a2b13730b8a38f608d
2016-06-13 18:43:42 -07:00
Chris Hopman 5e8f1716fc Build new bridge with gradle
Reviewed By: bestander

Differential Revision: D3324351

fbshipit-source-id: 41fa18a23c8661440a7deff244c93278f418e1d9
2016-05-27 16:13:37 -07:00
Andrew Jack 6bbaff2944 Upgrade to OkHttp3
Summary:
Update to [OkHttp](https://github.com/square/okhttp) to [OkHttp3](https://publicobject.com/2015/12/12/com-squareup-okhttp3/)

We must also update:
- Fresco to 0.10.0
- okio to 1.8.0

**Motivation**
Reasons for upgrading:
* Issue #4021
* "We discovered that RN Android sometimes fails to connect to the latest stable version of NGINX when HTTP/2 is enabled. We aren't seeing errors with other HTTP clients so we think it's specific to RN and OkHttp. Square has fixed several HTTP/2 bugs over the past eight months." - ide
* OkHttp3 will be maintained & improved, but OkHttp2 will only receive [security fixes](https://publicobject.com/2016/02/11/okhttp-certificate-pinning-vulnerability/)
* Cleaner APIs - "Get and Set prefixes are avoided"
* Deprecated/Removed - HttpURLConnection & Apache HTTP
* React Native apps are currently being forced to bundle two versions of OkHttp (v2 & v3), if another library uses v3
* Improved WebSocket performance - [CHANGELOG.md](https://github.com/square/okhttp/blob/master
Closes https://github.com/facebook/react-native/pull/6113

Reviewed By: andreicoman11, lexs

Differential Revision: D3292375

Pulled By: bestander

fbshipit-source-id: 7c7043eaa2ea63f95854108b401c4066098d67f7
2016-05-17 12:43:39 -07:00
Andy Street 6a2603745e Fix build break of react native exopackage apps
Reviewed By: lexs

Differential Revision: D3229733

fb-gh-sync-id: e74a2d4fbbdf019f898f87a05bdbd31b4e233463
fbshipit-source-id: e74a2d4fbbdf019f898f87a05bdbd31b4e233463
2016-04-27 08:02:24 -07:00
Martin Konicek bc32e06e56 Add an option to load the Boost library from the filesystem
Summary:Building React Native for Android from source the first time is quite slow. A large part of the time is spent downloading the Boost C++ library. If the code is already present on the system, there's no need to download it.
**Test plan**

CircleCI tests on this pull request. The env variable is not defined on CircleCI so this pull request should have no effect.
Closes https://github.com/facebook/react-native/pull/7116

Differential Revision: D3207397

Pulled By: mkonicek

fb-gh-sync-id: 3454947f6c90fda0d8d2cbb17a1af518e45b47fd
fbshipit-source-id: 3454947f6c90fda0d8d2cbb17a1af518e45b47fd
2016-04-21 06:48:22 -07:00
Konstantin Raev b2ecc83ead fixed test dependency broken in D3168150
Summary:fixes Circle
Closes https://github.com/facebook/react-native/pull/6978

Differential Revision: D3179133

fb-gh-sync-id: 6558168735b4097a68bf7423a7c249a45cc2684a
fbshipit-source-id: 6558168735b4097a68bf7423a7c249a45cc2684a
2016-04-14 07:50:22 -07:00
Saurabh Aggarwal 3c488afb0f Remove stetho dependency in OSS react native's NetworkingModule
Reviewed By: astreet

Differential Revision: D3038280

fb-gh-sync-id: 169e21b9276f928b7144ebf2f3b8487b5e87c073
shipit-source-id: 169e21b9276f928b7144ebf2f3b8487b5e87c073
2016-03-23 12:41:24 -07:00
Michael Lee e4eb84fa70 Upgrade folly dependency
Summary: Folly deprecated the brace initialization for dynamic::array, so point to a more recent tarball and fix it.

Reviewed By: bestander

Differential Revision: D3066402

fb-gh-sync-id: aaf70423886cb0cbc14aba7878a1d4e32bce82b1
shipit-source-id: aaf70423886cb0cbc14aba7878a1d4e32bce82b1
2016-03-18 10:34:26 -07:00
Dave Miller db7a154360 Open source Modal
Summary: This open sources an internal Modal View

Reviewed By: mkonicek

Differential Revision: D3065229

fb-gh-sync-id: 763996aef375883d94f70e617bfc7835a9cecb6f
shipit-source-id: 763996aef375883d94f70e617bfc7835a9cecb6f
2016-03-18 04:21:48 -07:00
Konstantin Raev f827f7b79a instrumentation tests are executed with BUCK
Summary:Added ability to run instrumentation tests with BUCK.

This change uses BUCK to build and run instrumentation tests facebook style.
The gains are that we can execute the same tests internally at FB and in OSS.
Also running tests not via graddle:connect command is 1.5 minutes faster.

I'll keep keep an eye on stability Gradle and BUCK builds for a while.
Closes https://github.com/facebook/react-native/pull/6176

Differential Revision: D2999878

Pulled By: bestander

fb-gh-sync-id: d715ba231769e57100685a1256f2e530c589921c
shipit-source-id: d715ba231769e57100685a1256f2e530c589921c
2016-03-02 06:55:35 -08:00
Konstantin Raev 5112a63953 Added ability to run Movies app with BUCK
Reviewed By: mkonicek

Differential Revision: D2874873

fb-gh-sync-id: 9feface8d9a18742e68206dbafb804de25f53ed8
shipit-source-id: 9feface8d9a18742e68206dbafb804de25f53ed8
2016-02-25 17:15:58 -08:00
Konstantin Raev 6ecfb61147 fixes gradle dependencies for compile and test
Summary: Closes https://github.com/facebook/react-native/pull/5676

Reviewed By: svcscm

Differential Revision: D2886944

Pulled By: androidtrunkagent

fb-gh-sync-id: 9cb68883cd38c31e588222bc746b5e296962c845
2016-02-01 13:23:36 -08:00
Konstantin Raev f6187565ac fixed gradle deps
Summary: Closes https://github.com/facebook/react-native/pull/5670

Reviewed By: svcscm

Differential Revision: D2885815

Pulled By: androidtrunkagent

fb-gh-sync-id: 670f731b0b12ca2f1b31f0a982f109ce4f736836
2016-02-01 09:42:29 -08:00
Martin Konicek 9fea485138 Build React Native with Buck
Reviewed By: bestander

Differential Revision: D2834002

fb-gh-sync-id: ebd5303a05fe9a01545365e4205d4cb8724a77a8
2016-01-18 12:39:16 -08:00
Alexander Blom 57f6cbb3dc Add annotation processor for @ReactProp
Summary:
The annotation processor finds subclasses of ViewManager and ShadowNode and generates classes that can both provide a mapping of property names to their type as well as a way of setting these properties.

This avoids having to do reflection to find the properties.

The annotation processor is currently not working when building with Gradle.

public

Reviewed By: astreet

Differential Revision: D2748958

fb-gh-sync-id: ded5b072d236ebf19fb43eaf704fc7f221a82c26
2016-01-07 03:52:58 -08:00
Konstantin Raev 88baaa1239 increased stability of circleCI e2e tests
Summary:
Out of 57 builds in the 5 days during Christmas only 15 were successful.
15 of the failed ones were caused by `com.android.ddmlib.ShellCommandUnresponsiveException` when running unstrumentation tests.
Another 10 were because of crashes probably related to memory usage.

This PR follows ideas from https://github.com/Originate/guide/blob/master/android/guide/Continuous%20Integration.md

So far I've made 6 successful builds with this setup.
Need to run it for a few more days to get accurate stats.
Closes https://github.com/facebook/react-native/pull/5021

Reviewed By: svcscm

Differential Revision: D2795713

Pulled By: androidtrunkagent

fb-gh-sync-id: 33373fed7ca7c5fb83b35cf551f8501286e33d7b
2015-12-30 11:39:32 -08:00
Konstantin Raev 308612314e added emulator support to circle.ci
Summary: Closes https://github.com/facebook/react-native/pull/4911

Reviewed By: svcscm

Differential Revision: D2789142

Pulled By: androidtrunkagent

fb-gh-sync-id: 9fd9520c27fc9acb7b139de6843a71ca3f918249
2015-12-24 10:40:28 -08:00
Konstantin Raev a99c5160ee Android Instrumentations tests are ready to be run in github/CI open source environment
Reviewed By: mkonicek

Differential Revision: D2769217

fb-gh-sync-id: 7469af816241d8b642753cca21f6542b971e9572
2015-12-21 09:39:57 -08:00
Martin Konicek 3a3af8a385 Open souce the Android Dialog module
Summary:
public

The `DialogModule` requires `android.support.v4.app.FragmentManager` which means
every app that wants to use Dialogs would need to have its Activity extend the legacy
`android.support.v4.app.FragmentActivity`.

This diff makes the `DialogModule` work with both the Support `FragmentManager`
(for AdsManager & potentially other fb apps) and the `android.app.FragmentManager`
(for new apps with no legacy dependencies).

Also wrap the native module in the same `Alert` API that we have on iOS and provide
a cross-platform example. In my opinion the iOS Alert API is quite nice and easy to use.

We still keep `AlertIOS` around because of its `prompt` function which is iOS-specific
and also for backwards compatibility.

Reviewed By: foghina

Differential Revision: D2647000

fb-gh-sync-id: e2280451890bff58bd9c933ab53cd99055403858
2015-12-17 11:11:13 -08:00
Krzysztof Magiera 2f56c0c90a Upgrade gradle to 2.9
Summary:
public

New version of gradle has a better support for zipTree copy task. Since we have a few of those including one for boost library which used to take very long, after upgrading we no longer need 6a656a1.

Also seems like many improvements made to gradle since 2.2 made it perform better on incremental builds (around 10% improvement on my laptop).

Command used to upgrade gradle version:

    gradle wrapper --gradle-version 2.9

Some of the plugins require updating as well since the previous versions were incompatible with gradle 2.9.

Closes https://github.com/facebook/react-native/pull/4462

Reviewed By: mkonicek

Differential Revision: D2754786

Pulled By: mkonicek

fb-gh-sync-id: 92c07d29aec6d5b4b2c55205b42b135c4d9479a9
2015-12-14 06:37:34 -08:00
Konstantin Raev 01983c2f0a Ability to run unit tests in react-android-github via gradle
Reviewed By: mkonicek

Differential Revision: D2699804

fb-gh-sync-id: 7b31287407bacf2e8e3de6ee1c723a11bb2a0f27
2015-11-27 04:20:19 -08:00
Saurabh Aggarwal a7c4ed106b Adds stetho interceptor to the OSS react native networking module
Reviewed By: mkonicek

Differential Revision: D2669416

fb-gh-sync-id: d061711a412348b16ffb877e0178a05460fd95f2
2015-11-20 09:44:27 -08:00
Krzysztof Magiera d8032b1c7d Upgrading okio and fresco.
Reviewed By: foghina

Differential Revision: D2636757

fb-gh-sync-id: 82dee46232ac2654870f727633604c86d569005e
2015-11-11 01:55:30 -08:00
Krzysztof Magiera caf111eb23 Update okhhtp version to 2.5
Reviewed By: andreicoman11

Differential Revision: D2636394

fb-gh-sync-id: 1f4df9ae879e16f13c5343baed85a91469d88cff
2015-11-10 03:20:29 -08:00
Krzysztof Magiera 6a656a1491 Speedup gradle builds by setting explicit deps on prepareBoost task.
Differential Revision: D2625574

fb-gh-sync-id: db0887e184a6d098699c9f84a2c3cb0d3b7e7b0f
2015-11-06 00:22:28 -08:00
Krzysztof Magiera 643769fc8e Fix dependency on recycler view in OSS.
Differential Revision: D2546027

fb-gh-sync-id: 7a2c2298332400fb216c18b8c569a859d1a3e1d0
2015-10-16 03:40:55 -07:00
Bret Johnson 5b0dd6432a Added a more explicit error message when ndk.dir / ANDROID_NDK is set,
Summary: but the NDK build command can't be found in that directory.   This
more explicit error now shows the full NDK path where it's looking
and (importantly) includes a hint that backslashes need to be escaped
on Windows for ndk.dir.   When I built on Windows the first time,
I didn't realize ndk.dir backslashes needed to be escaped and the
generic "not found" error made the root cause harder to track
down.   This change should help others that build on Windows & run into
the same.
Closes https://github.com/facebook/react-native/pull/2960

Reviewed By: @​svcscm

Differential Revision: D2470761

Pulled By: @kmagiera
2015-09-23 05:57:24 -07:00
Martin Konicek 6b733bdcf1 Minor fixes in comments
Reviewed By: @mkonicek

Differential Revision: D2463595

committer: Service User <svcscm@fb.com>
2015-09-21 14:39:36 -07:00
Martin Konicek 27ab039b6a Export latest Android changes 2015-09-17 14:33:28 +01:00
facebook-github-bot-6 6277a88555 Restore unintended sync 2015-09-16 10:38:42 -07:00
facebook-github-bot-6 0d09f22dbf Get back 100% in sync with fb codebase 2015-09-16 10:30:53 -07:00
Martin Konicek 42eb5464fd Release React Native for Android
This is an early release and there are several things that are known
not to work if you're porting your iOS app to Android.

See the Known Issues guide on the website.

We will work with the community to reach platform parity with iOS.
2015-09-14 18:13:39 +01:00