Commit Graph

4400 Commits

Author SHA1 Message Date
David Vacca 1663f27f95 Integrate Activity Indicator into RN Tester Android OSS app
Summary:
This diff integrates Activity Indicator into RN Tester Android OSS app

changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D23198641

fbshipit-source-id: 93614a3f856b4fc162d4618b168d9c82d18a91eb
2020-08-21 14:18:48 -07:00
David Vacca a76c55e0f5 Integrate AndroidDrawerLayout component into RN Tester Android OSS APP
Summary:
This diff registers the AndroidDrawerLayout component into RN Tester Android OSS APP

Changelog: [internal]

Reviewed By: fkgozali

Differential Revision: D23198359

fbshipit-source-id: 4033c7e968a993a7f8fcaa3f57e7dd78bf84fe57
2020-08-21 14:18:48 -07:00
David Vacca 3790569a71 Integrate Modal into RN Tester Fabric OSS APP
Summary:
This diff integrates Modal into RN Tester Fabric OSS APP

changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D23183507

fbshipit-source-id: bc2513c39c783d387a985c86a12b04dadac49933
2020-08-21 14:18:48 -07:00
David Vacca 9b811fb0bf Integrate ScrollView in RN Tester Android OSS APP
Summary:
This diff integrates ScrollView in RN Tester Android OSS APP

changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D23179883

fbshipit-source-id: 8e892ae613a1f44c8d6cfb837bfdbc0771a89176
2020-08-21 14:18:48 -07:00
David Vacca 60a5223ff7 Integrate AndroidTextInput in RN Tester OSS App
Summary:
This diff integrates AndroidTextInput in RN Tester OSS App

changelog: [internal] Internal

Reviewed By: fkgozali

Differential Revision: D23179389

fbshipit-source-id: 709d71343ca374ca2ece00774f4f273145bffd20
2020-08-21 14:18:48 -07:00
David Vacca 8f306cd66a Update directory hierarchy of AndroidTextInput C++ files
Summary:
This diff updates the directory hierarchy of AndroidTextInput C++ files to be compatible with Android OSS build system

changelog: [internal] Internal

Reviewed By: PeteTheHeat

Differential Revision: D23179390

fbshipit-source-id: 1c52e4f882853799a58d44876cadd392b4a35050
2020-08-19 19:22:23 -07:00
Sahil Jain 3fd8a5bac5 Remove unnecessary comment in BUCK files saying to change the contact field to the oncall of your team
Summary:
This comment shouldn't be committed, and should just be part of the template that generates new BUCK files.

Changelog: [Internal]

Differential Revision: D23225700

fbshipit-source-id: a1728e1a4ac0f3f94c4d1330d489bfae7a76a82d
2020-08-19 19:09:05 -07:00
David Vacca 2e88b25242 Integrate Image Fabric component into OSS
Summary:
This diff integrates image Fabric component into RN Tester app

changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D23177896

fbshipit-source-id: 008e86e82a262827a31b9df74a50b58a97f2e1b7
2020-08-18 19:55:51 -07:00
David Vacca 50af304b3f Integrate Fabric Text in RN Tester OSS
Summary:
This diff integrates Text component into RN OSS

changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D23177414

fbshipit-source-id: 0a415f8dd8339b84465a7c8d73f3d8abd80fbecc
2020-08-18 19:55:51 -07:00
David Vacca 19695ed6a9 Integrate UnimplementedView into RNTester OSS
Summary:
This diff integrates and render UnimplementedView into RNTester OSS

changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D23170052

fbshipit-source-id: 9306311d114c280fdeeb20d545ef244369040e96
2020-08-18 17:00:02 -07:00
David Vacca d6ef2598bc Integrate Android C++ components files into RN Tester OSS
Summary:
This diff integrates Android C++ components files into RN Tester OSS

changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D23170053

fbshipit-source-id: 3ba9d289e026359d83580fbddfd8caf8c226a29a
2020-08-18 17:00:01 -07:00
David Vacca 29513ac989 Fix output files generated by oss-android-codegen script
Summary:
This diff filters the iOS C++ friles that are generated by the oss-android-codegen script
Also, as part of this diff I'm inlcuding .cpp files into the output.

These files are only used and compiled in Android

changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D23169268

fbshipit-source-id: 404607f3cd6e59197291ea67701774c9c492a282
2020-08-18 17:00:01 -07:00
Ramanpreet Nara 3f77367883 Delay turbomodulejsijni so load until we need it in TurboModulePerfLogger
Summary:
Twilight doesn't have TMPerfLogging enabled. However, the TurboModule infra uses the TMPerfLogger java class everywhere, which loads the turbomodulejsijni library on class load. For some reason, this class load doesn't work, and causes Twilight prod to crash.

To mitigate that crash, this diff delays the so load until it's absolutely necessary, which is by the time we call jniEnableCppLogging. This should never be called in Twilight, because it doesn't have TMPerfLogging enabled. Therefore, the crash should disappear on Twilight.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D23192072

fbshipit-source-id: b73ece580e4345dbf835b0fc2f7d43b90f202411
2020-08-18 12:13:35 -07:00
David Vacca 0e442d1c02 Build RN Tester with fabric enabled in sandcastle
Summary:
This diff extends test-react-native-oss-android-legocastle to test the build of RNTester with fabric enabled in Sandcastle

changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D23141524

fbshipit-source-id: 396dae1c0a23ce03db1053de1627eacb09a6df94
2020-08-17 16:40:00 -07:00
David Vacca c291265508 Reintroduce CoreComponentsRegistry class
Summary:
This diff reintroduces the CoreComponentsRegistry class to register core components in the RN Tester app.

This class was previously deleted as part of D23091020 (https://github.com/facebook/react-native/commit/7fb1afae7f4b78970463e272b7d4f3230e84887d). Different from a past approach, this diff doesn't use inheritance for Hybrid classes (which seems to bring problems in Android 4 devices)

I'm planning to land this diff after I verify that D23091020 (https://github.com/facebook/react-native/commit/7fb1afae7f4b78970463e272b7d4f3230e84887d) fixed RC (maybe I will wait until sunday's cut)

changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D23109856

fbshipit-source-id: 5220e522e197f701c782ab5089f9f1036ec90c19
2020-08-17 14:18:57 -07:00
David Vacca 4720ad95a4 Unify type and values of USE_FABRIC env variable with USE_CODEGEN
Summary:
This diff unifies the type and value of USE_FABRIC env variable  exposed in Gradle  with the USE_CODEGEN env variable

changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D23145658

fbshipit-source-id: 9575f6b50c7a977254e364037d1417b3b1cdb607
2020-08-14 18:17:26 -07:00
Kevin Gozali 3f1a4535d9 Codegen Gradle: add toggle to activate JavaGenerator implementation
Summary:
JavaGenerator is a Java-based implementation for generating codegen output from the parsed schema file. Right now the output is a hardcoded Java file. In the next commits, proper JavaGenerator impl will be added.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D23100171

fbshipit-source-id: 1bef23e3dba4d8c222ebdece0edeb4435d388cd4
2020-08-13 14:52:09 -07:00
David Vacca 7fb1afae7f Remove CoreComponentsRegistry class
Summary:
This diff removes the CoreComponentsRegistry class that was recently created to expose Fabric components in OSS

changelog: [internal] internal

Reviewed By: JoshuaGross, shergin

Differential Revision: D23091020

fbshipit-source-id: 9d851608ed0eddb98367265b5e346d5298f5f732
2020-08-12 22:52:20 -07:00
David Vacca 9d33b588f6 Exclude Fabric from RN OSS by default
Summary:
This diff adds a new mechanism to enable or disable the build of Fabric in RN OSS

changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D23084586

fbshipit-source-id: b7b0b842486392ec4ccb91ad1e6441ba3a1f48b2
2020-08-12 14:53:56 -07:00
David Vacca 03cc849e30 Simplify reactnativejni Android.mk file
Summary:
This diff removes unnecessary shared library dependencies from reactnativejni module

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D23080052

fbshipit-source-id: b914a5a6d5d8d6ab93ee903820dbb779e6817312
2020-08-12 14:53:56 -07:00
Kevin Gozali e8c1eeeb06 codegen Gradle: introduce com.facebook.react.codegen plugin to replace architecture.gradle script
Summary:
Instead of applying configs from gradle scripts, this introduces a proper Gradle plugin to enable Codegen in an application or library project. In the build.gradle, one enables it by:

```
plugins {
    id("com.android.application")
    id("com.facebook.react.codegen") // <---
}

// ...

react { // <--- the new plugin extension
    enableCodegen = System.getenv("USE_CODEGEN")
    jsRootDir = file("$rootDir/RNTester")
    reactNativeRootDir = file("$rootDir")
}
```

The plugin supports `react` plugin extension as demonstrated above. Adding this:
* automatically generates all TurboModule Java files via react-native-codegen **before the `preBuild` Gradle task**
* automatically adds the files to the `android {}` project configuration
* is done per project (build.gradle)

This will be the foundation for future React Native gradle plugin beyond just for react-native-codegen.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D23065685

fbshipit-source-id: 4ea67e48fab33b238c0973463cdb00de8cdadfcc
2020-08-12 11:12:43 -07:00
David Vacca 79f305e563 Remove ndk.moduleName from build.gradle
Summary:
This diff removes the ndk.moduleName configuration from build.gradle. This seems to be unnecessary

The motivation is to reduce confusion and extra configuration that is not being used by the build system

changelog: [internal] internal change to cleanup ndk configuration in gradle

Reviewed By: fkgozali

Differential Revision: D23068404

fbshipit-source-id: 07bb68906286531efaa9dc0036704c4b3ee1faf5
2020-08-11 18:37:59 -07:00
Jiawei Lv 7e0824027e Assign ownership for unowned open sourced robolectric tests in fbandroid
Summary: Changelog: [Internal]

Reviewed By: IanChilds

Differential Revision: D22983828

fbshipit-source-id: d0f48760d7a96cfe290ef44addacaf2c0f712b65
2020-08-11 11:25:57 -07:00
David Vacca c03b7dd772 Fix NoSuchMethodError in CoreComponentsRegistry class
Summary:
This diff fixes a NoSuchMethodError in CoreComponentsRegistry class.

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D23043627

fbshipit-source-id: bd87ba560cc57ca345bf694b457be09097c433fe
2020-08-10 18:42:05 -07:00
Joshua Gross 73242b45a9 NativeAnimatedModule: allow JS to control queueing of Animated operations
Summary:
In the past I tried a few heuristics to guess when a batch of Animated Operations were ready, and none of these were super reliable. But it turns out we can safely allow JS to manage that explicitly.

Non-Fabric still uses the old behavior which seems fine.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D23010844

fbshipit-source-id: 4c688d3a61460118557a4971e549ec7457f3eb8f
2020-08-09 01:39:29 -07:00
Joshua Gross 0af275e3be Diagnostics for non-Fabric ViewCommand crash
Summary:
Add additional logging.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D22980132

fbshipit-source-id: ab98d9aebe47dc65780ffbf6648e9341e1750121
2020-08-09 01:39:29 -07:00
David Vacca 0416f77ce4 Extend 'fabric' module to compile in OSS
Summary:
This diff extends fabric module to compile in OSS

NOTE: As a side effect of this diff, Fabric will be included into "reactnativejni" which is used by RN OSS.

I'm planning to remove this dependency in the near future - T71320460

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D22991877

fbshipit-source-id: 0ab3ee410dd448bbd87130114bec27c6e6bc65c6
2020-08-07 19:49:19 -07:00
David Vacca bb15437db9 Create CoreComponentsRegistry
Summary:
This diff introduces the class CoreComponentsRegistry that is responsible of registering core components in fabric.
This is required to make RN Tester to work in Fabric, in the future we'll extract this registry into another module (once we figure it out what's the best way to do this)

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D22991876

fbshipit-source-id: 15e85e15aac5dd981161d9eae35eb2cee4fa66b6
2020-08-07 19:49:19 -07:00
David Vacca f441fe6d45 Refactor ComponentFactoryDelegate class
Summary:
This diff refactors the ComponentFactoryDelegate class. It also introduces a new class called ComponentRegistry that will be used to register components into fabric

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D22985313

fbshipit-source-id: e33a3d4fcb3a1c509b80c6ff1f43889480b1c2c3
2020-08-07 19:49:19 -07:00
David Vacca 7d5383eea8 Extend 'textlayoutmanager' module to compile in OSS
Summary:
This diff extends the 'textlayoutmanager' module to compile in OSS
As part of this diff I also moved Android files in order to make the module compatible with Android.mk system

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D22963706

fbshipit-source-id: 14a7309f589fe12c21131c7d5cef02b4323d4a93
2020-08-07 19:49:19 -07:00
David Vacca 61a16fe1b6 Refactor Runnable C++ class to compile in OSS
Summary:
This diff refactors the class Runnable into a struct to make it work in OSS

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D22963704

fbshipit-source-id: 2212c8f1e4a62b2bcad5c061709e29b247454fc1
2020-08-07 19:49:19 -07:00
David Vacca d1d42475e9 Extend 'imagemanager' module to compile in OSS
Summary:
This diff extends the 'imagemanager' module to compile in OSS

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D22963701

fbshipit-source-id: 5034cf9801efa01cc39003b2060a84864c46d18e
2020-08-07 19:49:19 -07:00
David Vacca 48e9f0a1c0 Extend 'animations' module to compile in OSS
Summary:
This diff extends the 'animations' module to compile in OSS

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D22963702

fbshipit-source-id: e432e2f98b47a4b0456fd5e3d0f5263631782b29
2020-08-07 11:12:02 -07:00
David Vacca 6486b8cffd Extend 'scheduler' module to compile in OSS
Summary:
This diff extends the 'scheduler' module to compile in OSS

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D22963705

fbshipit-source-id: ea2b6a4fce49c4d9552deb30e89fcba165cfe772
2020-08-07 11:12:02 -07:00
David Vacca e20df93082 Extend 'templateprocessor' module to compile in OSS
Summary:
This diff extends the 'templateprocessor' module to compile in OSS

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D22963703

fbshipit-source-id: c898d846a59a065c0bbfd443303e125e6b9bcba7
2020-08-07 11:12:02 -07:00
David Vacca 2fa8829305 Extend 'uimanager' module to compile in OSS
Summary:
This diff extends the 'uimanager' module to compile in OSS

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D22918206

fbshipit-source-id: 2783ec6d9e53cdafab5c77a3f217b32c1c7f0b41
2020-08-07 11:12:02 -07:00
Oleg Lokhvitsky 7e5cf51117 Back out "Remove complex NativeAnimated queueing mechanisms"
Summary:
changelog: [internal]
Original commit changeset: 9241fff84376

Reviewed By: JoshuaGross

Differential Revision: D22987878

fbshipit-source-id: e7fb8f51ab911ff881ed543f39b65afbe076a7aa
2020-08-06 17:13:56 -07:00
David Vacca 5c9c52275f Extend 'attributedstring' module to compile in OSS
Summary:
This diff extends the 'attributedstring' module to compile in OSS

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D22918207

fbshipit-source-id: 35710789d2aa71826e10c29c27e9ac34b73e5344
2020-08-06 11:53:04 -07:00
David Vacca 459eabbef2 Extend 'better' module to compile in OSS
Summary:
This diff extends the 'better' module to compile in OSS

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D22918208

fbshipit-source-id: 11cf7c093bd1d50bbb53c6b6a740a3db41971fc0
2020-08-06 11:53:04 -07:00
David Vacca 8fdb3decda Extend components/scrollview module to compile in OSS
Summary:
This diff extends components/scrollview module to compile in OSS

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D22918203

fbshipit-source-id: 6a67213bdcb4b4b2d47a2ee2a9796a134d744956
2020-08-06 11:53:03 -07:00
David Vacca 99ee0309be Extend components/root module to compile in OSS
Summary:
This diff extends components/root module to compile in OSS

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D22918209

fbshipit-source-id: 9ce9558f689d0a9b3b8cb7edeb891e8f4bafba6c
2020-08-06 11:53:03 -07:00
David Vacca ba195e878e Extend component/unimplementedview to compils in OSS
Summary:
This diff extends component/unimplementedview to compils in OSS

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D22918204

fbshipit-source-id: 85b2338b6135aadcdd00bb798f6aaa2fdf03d81e
2020-08-06 11:53:03 -07:00
David Vacca 5d5524b266 Extend react/renderer/component/view module to compile in OSS
Summary:
This diff extends react/renderer/component/view module to compile in OSS

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D22918210

fbshipit-source-id: b92e8701ac6ec93ba8f2cdbfdcc5e34cade0f218
2020-08-06 11:53:03 -07:00
David Vacca d2bb73d568 Extend react/renderer/componentregistry module to compile in OSS
Summary:
This diff extends react/renderer/componentregistry module to compile in OSS

changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D22908223

fbshipit-source-id: 6cc053262fbe2bb0f631ac40cd57959267ae95fa
2020-08-06 11:53:03 -07:00
Joshua Gross cd372b1b06 Mechanisms to workaround certain Fabric crashes in prod
Summary:
New mechanism to soft-crash, or crash, and collect diagnostics in the mounting layer.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D22971260

fbshipit-source-id: 860cde3effa4a187f10f5dd1488dd41ace65e363
2020-08-06 11:18:05 -07:00
David Vacca 5f03e7ef41 Make react/renderer/mapbuffer module to compile in OSS
Summary:
This diff extends the react/renderer/mapbuffer module to compile in OSS
changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D22908221

fbshipit-source-id: d2a6da04ea73efc35e862839563262d4e89a2c56
2020-08-06 00:09:12 -07:00
David Vacca 886d1bad74 Make react/core module to compile in OSS
Summary:
Make react/core module to compile in OSS

This is necessary to make fabric compile in OSS

changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D22908222

fbshipit-source-id: a37b87d02ecf77bb25693ce32cd0f3432be5daa7
2020-08-06 00:09:12 -07:00
David Vacca b97619e0aa Make graphics module to compile in OSS
Summary:
This diff creates the Android.mk file for the fabric graphics module
This is necessary to enable fabric in RN OSS
changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D22908219

fbshipit-source-id: 70ef1d06053b0ca07a71c0a2d36e4edd617b2a25
2020-08-06 00:09:12 -07:00
David Vacca 8e996487e1 Create Android MK file for debug module
Summary:
This diff creates the Android.mk file for the fabric debug module

This is necessary to enable fabric in RN OSS

changelog: [internal] internal

Reviewed By: fkgozali

Differential Revision: D22908220

fbshipit-source-id: f970fa1d8534a6043f60f362740bfc3e5199b511
2020-08-06 00:09:11 -07:00
Joshua Gross 0713246e7b Switch to using safer UpdateState mechanism
Summary:
Update FabricViewStateManager so that the caller can bail out of updates by returning null.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D22966024

fbshipit-source-id: 31cd9ec8a9a9918fbb94844e30ed1a2fcc61997d
2020-08-05 22:01:19 -07:00