You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: proposals/0000-out-of-npm-artifacts.md
+13-7
Original file line number
Diff line number
Diff line change
@@ -266,11 +266,20 @@ This will partially mitigate the issue as the `android-prebuilts` package will s
266
266
### Dedicated Maven Repository
267
267
268
268
Ideally we could look into publishing the `/android` folder into a remote Maven Repository (most likely Maven Central).
269
+
We could re-use a Maven Repository to store artifacts which are not Android-specific (e.g. the Hermes iOS Tarball).
270
+
271
+
#### Prototype
272
+
273
+
A prototype of how the storing of the Hermes iOS Tarball on Maven would look like is available on: [react-native#34812](https://github.com/facebook/react-native/pull/34812).
274
+
275
+
This has been tested against RN Tester iOS on `main` and the tarball download is working correctly.
269
276
270
277
#### Pro
271
278
272
-
* Uses a packaging system which is familiar for Android developers and re-uses the already existing caching/perf improvement that are shipping with the platform pipeline.
279
+
*For Android: Uses a packaging system which is familiar for Android developers and re-uses the already existing caching/perf improvement that are shipping with the platform pipeline.
273
280
* A practical benefit of this is that users will have only a local copy of react-native or hermes-engine inside their `~/.gradle` folder instead of having multiple copies, one for every RN project.
281
+
* For iOS: We would have stable URLs which can be easily composed with the release version (e.g. https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.0.1/react-native-artifacts-0.0.1-hermes-ios.tar.gz)
282
+
* We will end up using a single solution for both platforms, resulting in reduced maintainance costs.
274
283
* Users will download the artifact they need at build time only when needed
275
284
* E.g. iOS-only users will benefit of faster `yarn install` and smaller `node_modules` folder.
276
285
* Users which are not using Hermes will benefit similarly as well
@@ -282,7 +291,7 @@ Ideally we could look into publishing the `/android` folder into a remote Maven
282
291
283
292
#### Cons
284
293
285
-
* This solution addressed only the Android/JVM side of the problem.
294
+
*~This solution addressed only the Android/JVM side of the problem~ See the prototype paragraph for a solution that works on both platforms.
286
295
* We will have to publish to remote Maven Repositories as part of our RN release process (i.e. a new step inside the CircleCI config, means yet another thing that can be broken) + we’ll have to maintain GPG keys for publishing.
287
296
* We’ll have to make sure NPM packages and Maven pubblications are syncronized with a version number.
288
297
@@ -334,11 +343,8 @@ We could extend on Github Releases as we’re doing today for the Hermes iOS tar
334
343
335
344
## Preferred solution
336
345
337
-
We're currently investigating the feasibility of the OCI Images solution.
346
+
We've investigated prototype for both the OCI and the Maven solution.
338
347
339
-
At the time of writing we're leaning towards opting for either:
340
-
- Using only the OCI image approach to store all the artifacts
341
-
- Store platform specific artifacts with the platform specific solution (Android on Maven Central, iOS on CocoaPods, etc.)
342
-
- The hybrid solution.
348
+
At this stage the preferred solution is Maven, due to the list of PROs. This solution will make consuming artifacts easier for users and will reduce the maintainance costs on core contributors and release managers.
343
349
344
350
As this change is going to affect contributors, library authors, and developers of tools on top of React Native, we're sharing this RFC publicly to collect consensus and feedback.
0 commit comments