Commit Graph

20 Commits

Author SHA1 Message Date
Nicola Corti
0e5ea28905 Bump AGP to 8.1.1 (#39392)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39392

This fixes a warning that would fire for all the users on 0.73 and is not actionable in any form: https://issuetracker.google.com/issues/295235385

Changelog:
[Internal] [Changed] - Bump AGP to 8.1.1

Reviewed By: luluwu2032

Differential Revision: D49155866

fbshipit-source-id: 05201b834d00b018f8680d74fe4a40884a8c5eb9
2023-09-12 09:21:08 -07:00
Nicola Corti
606e14552d Set android.suppressUnsupportedCompileSdk=34 for the root project
Summary:
Android is currently raising a warning as we're using AGP 8.1 with SDK 34.
I'm suppressing this warning that we can remove once we bump to AGP 8.2

Changelog:
[Internal] [Changed] - Set android.suppressUnsupportedCompileSdk=34 for the root project

Reviewed By: mdvacca

Differential Revision: D48437747

fbshipit-source-id: 6d2ed5f4f021052934206fd9149c048cdd5350df
2023-08-18 03:07:41 -07:00
Nicola Corti
54033fd334 Introduce react.internal.useHermesNightly (#38886)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38886

This change introduces a property called `react.internal.useHermesNightly`

This allows users building RN-Tester or just ReactAndroid to fetch Hermes from the latest
nightly, without having to build it from source.

The change could be useful to speedup local development, but it should not be enabled on CI or when doing releases.

Changelog:
[Internal] [Changed] - Introduce react.internal.useHermesNightly

Reviewed By: mdvacca, cipolleschi

Differential Revision: D48188769

fbshipit-source-id: cb4330cb9082e9db0c7ba82e48b2d10030637353
2023-08-14 00:45:07 -07:00
Nicola Corti
28dd1bbe0f Enable local caching for Gradle (#38882)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38882

This turns on local caching for Gradle builds.
From now on, some of the tasks of the build will be cached inside the `.gradle` folder.

This will benefit 'clean builds' and builds happening after branch/context switch.
CI will also benefit from this improvement as we're storing the cache folder on CircleCI.

After this we'll have to follow-up and enabling `Cacheable` on each of our task as
they're currently all disabled.

Changelog:
[Internal] [Changed] - Enable local caching for Gradle

Reviewed By: mdvacca

Differential Revision: D48187656

fbshipit-source-id: 25734ed692a69874721e86c50498b075af0fda19
2023-08-09 17:32:43 -07:00
Nicola Corti
1982c4722f Attempt to enable the Gradle Daemon for CI (#38814)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38814

This change enables the Gradle Daemon on CI.
We noticed some flakyness with the Daemon disabled, so we'll give it a try with the daemon enabled which is the default for Gradle.

Changelog:
[Internal] [Changed] - Enable the Gradle Daemon for CI

Reviewed By: cipolleschi

Differential Revision: D48112363

fbshipit-source-id: 4a7f9bbaad33935a97e4e0ea28ea8f2f22c67d0f
2023-08-07 09:31:35 -07:00
Nicola Corti
bfc39353d1 Do not specify a Kotlin version in the RN rootProject (#33589)
Summary:
As we introduced KGP inside `ReactAndroid` (cc ShikaSD), we now need to specify a version for it (as users will consume that build on Android New Architecture.

Currently, the version is loaded in the RN `rootProject` which is not available on user's project. I'm cleaning this up.

## Changelog

[Internal] - Do not specify a Kotlin version in the RN rootProject

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

Test Plan:
Tested on a nightly version with

```
npx react-native init RNNightly --version nightly
```

Reviewed By: mdvacca

Differential Revision: D35476777

Pulled By: cortinico

fbshipit-source-id: 5a819ef5fa9a6886d7b7b683f31d59cb05a49f29
2022-04-08 03:44:56 -07:00
Nicola Corti
8200f91598 Disable prefab publishing if REACT_NATIVE_HERMES_SKIP_PREFAB is set. (#33439)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33439

This allows us to toggle the publishing of prefab if the `REACT_NATIVE_HERMES_SKIP_PREFAB`
env variable is set. With this we can control how big is the .aar of hermes-engine, reducing
the size from ~200Mb right now to 8Mb.

Changelog:
[Internal] [Changed] - Disable prefab publishing if REACT_NATIVE_HERMES_SKIP_PREFAB is set

Reviewed By: ShikaSD

Differential Revision: D34929265

fbshipit-source-id: eb710b72ee4e17ac04c2924ffdac7a542928e9f8
2022-03-16 12:24:55 -07:00
Nicola Corti
a3d9892ed9 Build Hermes from Source (#33396)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33396

This commit fully unplugs the `ReactAndroid` from using hermes from the NPM package and plugs the usage of Hermes via the `packages/hermes-engine` Gradle build.

I've used prefab to share the .so between the two builds, so we don't need any extra machinery to make this possible.

Moreover, I've added a `buildHermesFromSource` property, which defaults to false when RN is imported, but is set to true when RN is opened for local development. This should allow us to distribute the `react-native` NPM package and users could potentially toggle which source to use (but see below).

Changelog:
[Android] [Changed] - Build Hermes from Source

Reviewed By: hramos

Differential Revision: D34389875

fbshipit-source-id: 107cbe3686daf7607a1f0f75202f24cd80ce64bb
2022-03-11 15:23:36 -08:00
Andrei Shikov
09e418ef8e Increase max heap size for template gradle build
Summary:
Updates maximum heap size for the gradle build to account for building RN from source when new architecture is enabled.

Changelog: [Changed][Android] - Use 2g as a default heap size for gradle builds

Reviewed By: cortinico

Differential Revision: D33947090

fbshipit-source-id: 2f551e688f2d92c3092e053086f6933779cd6f63
2022-02-02 12:56:54 -08:00
AKB48
d0f0234656 Bump Kotlin version to 1.6.10 (#32936)
Summary:
Bump Kotlin version to 1.6.10 with changes:

https://kotlinlang.org/docs/whatsnew16.html

Primarily:

- stabilization to several language features
- various type inference improvements
- support for annotations on class type parameters

## Changelog

[Android] [Changed] - Bump Kotlin version to 1.6.10

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

Reviewed By: ShikaSD

Differential Revision: D33708397

Pulled By: cortinico

fbshipit-source-id: a09b4504c194676d18a749c5e297b7598e5f32b4
2022-01-21 07:46:30 -08:00
Nicola Corti
bd7caa64f5 Use side-by-side NDK for Android (#32848)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32848

If we leverage the side-by-side configuration of the NDK
(see https://developer.android.com/studio/projects/configure-agp-ndk#agp_version_41)
we will not have to specify the NDK Path or Version at all.

We will automatically pick the best NDK version selected by AGP.

Changelog:
[Android] [Changed] - Use side-by-side NDK for Android

Reviewed By: ShikaSD

Differential Revision: D33475818

fbshipit-source-id: 16aa4acfc44b94e2f92df89d71e104bf46d7f162
2022-01-11 10:00:54 -08:00
Nicola Corti
0f39a1076d Make the reactNativeArchitectures property more discoverable
Summary:
I've unified the function that is responsible of getting the `reactNativeArchitectures` property
to a single one (ideally we could move it inside the Gradle Plugin in the future).
I've also added a property in the `gradle.properties` file. This makes easier for users to customize the
architecture to build without having to specify a CLI flag or edit multiple gradle files.

Changelog:
[Android] [Added] - Make the `reactNativeArchitectures` property more discoverable

Reviewed By: ShikaSD

Differential Revision: D32244997

fbshipit-source-id: 33180544400f9abe63e9b539ff16fefa17a024ba
2021-11-08 07:21:08 -08:00
svbutko
9ae3367431 Bump Kotlin and Gradle versions (#32319)
Summary:
Bump Kotlin version to 1.5.31 to include following changes:

https://kotlinlang.org/docs/whatsnew15.html
https://kotlinlang.org/docs/whatsnew1520.html
https://kotlinlang.org/docs/whatsnew1530.html

Primarily:
- Native support for Apple silicon
- Kotlin/JS IR backend reaches Beta
- Improved Gradle plugin experience
- Performance improvements

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[Android] [Changed] - Bump Kotlin version to 1.5.31
[Android] [Changed] - Bump Gradle version to 7.2

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

Reviewed By: yungsters

Differential Revision: D31365479

Pulled By: cortinico

fbshipit-source-id: 1ffaef1222a6ada8ebc746267b2a22561c3c770f
2021-10-13 06:02:18 -07:00
Nicola Corti
6a2b6c2f3e Bump Kotlin to 1.4.32 (#32137)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32137

Bumping the minor version of Kotlin. I don't expect any major breakage.

Changelog:
[Android] [Changed] - Bumped Kotlin to 1.4.32

Reviewed By: ShikaSD

Differential Revision: D30698315

fbshipit-source-id: e1de6251c1c17c490700298540dea5b48d034e3c
2021-09-02 04:31:42 -07:00
Dulmandakh
aa43aab77c Bump NDK to 21.4.7075529 (#31731)
Summary:
This PR bumps NDK_VERSION to 21.4.7075529, and patches FileUtil.cpp from folly based on patch from https://github.com/facebook/folly/pull/1593. We can remove the patch once PR lands in Folly and bump Folly version in RN.

FYI, NDK 20 is deprecated and 21 is LTS release.

## Changelog

[Android] [Changed] - Bump NDK to 21.4.7075529

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

Reviewed By: mdvacca

Differential Revision: D29166690

Pulled By: ShikaSD

fbshipit-source-id: 0792691404f718aaf5af1369f66f0cba046b4e20
2021-06-17 04:21:50 -07:00
Dulmandakh
9a5e22650a RN project wide Kotlin version (#31645)
Summary:
This PR sets project wide Kotlin version to 1.4.21, supported in Buck https://github.com/facebook/buck/tree/dev/third-party/java/kotlin.

We had to specify version for both kotlin-dsl and kotlin('jvm') plugins to remove version mismatch warnings in **react-native-gradle-plugin**. Also I expect more Kotlin code in RN, so instead of specifying version for each sub-project it's better to have project wide setting.

We don't need to load Kotlin in react-native-gradle-plugin because Kotlin is available RN project wide.

## Changelog

[Internal] [Changed] - Project wide Kotlin version set to 1.4.21

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

Test Plan: Everything works as expected, no visible change for developers.

Reviewed By: yungsters

Differential Revision: D28991440

Pulled By: ShikaSD

fbshipit-source-id: 971fa6f50c12d916a56d0dcde7c65299496fb68a
2021-06-10 00:46:15 -07:00
Dulmandakh
547b4c92e4 Gradle 6.9, Android Gradle Plugin 4.2.1 (#31593)
Summary:
Bump Gradle to 6.9 which supports Apple Silicon, also Android Gradle Plugin 4.2.1 which defaults to Java 1.8 so no additional config required.

## Changelog

[Android] [Changed] - Bump Gradle to 6.9, Android Gradle Plugin to 4.2.1

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

Test Plan: rn-tester builds and runs as expected

Reviewed By: mdvacca

Differential Revision: D28711942

Pulled By: ShikaSD

fbshipit-source-id: 2a4616cd0f17db7616ab29dea1652717f2cd0f6d
2021-06-01 11:29:51 -07:00
Agastya Darma
5b34c98fa2 WIP: Add an explicit NDK version to RNTester and ReactAndroid (#29987)
Summary:
When I try to run RNTester with Gradle the RNTester Required me to use **NDK 20.0.5594570**. I can't seem to find an explicit NDK version anywhere in ReactAndroid and RNTester. This PR Aims to add an explicit NDK version to RNTester and ReactAndroid.

![Screenshot from 2020-09-19 21-13-17](https://user-images.githubusercontent.com/8868908/93669563-444fcf00-fabf-11ea-8822-93264c5bb736.png)

## Changelog
[Android] [Added] - Add an explicit NDK version to RNTester and ReactAndroid.

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

Test Plan: Build manually from RNTester

Reviewed By: fkgozali

Differential Revision: D23911371

Pulled By: ShikaSD

fbshipit-source-id: 2f297c73890c0eb0bfec0e2ba7ec5755b4d84243
2021-01-04 09:15:08 -08:00
Kevin Gozali
5acf7c9616 Android Gradle: remove configureondemand property
Summary:
It looks like this config in gradle.properties caused the :packages:rn-tester:android:app:dependencies task to fail. This was reported here: https://github.com/gradle/gradle/issues/9645#issuecomment-530746758 -- it's likely related to using Kotlin build.gradle.kts?

For now comment these out.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D23521954

fbshipit-source-id: 9997f4950d89e5fc57036b05db5518b39d47737b
2020-09-03 19:13:00 -07:00
Kevin Gozali
b7d6b325c2 OSS Gradle: increase JVM heap size
Summary:
Increasing memory for building RNTester in Gradle.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D23078460

fbshipit-source-id: 733246a44bd88532796cd40be59aeee366db8ab0
2020-08-12 10:18:07 -07:00