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

37 Коммитов

Автор SHA1 Сообщение Дата
Gabriel Donadel Dall'Agnol 200488e87c build: Bump AGP to 7.1.1 and fix bundle inclusion in release mode (#33057)
Summary:
Upgrade Android Gradle to 7.1.0 on template and fix a bug where the bundle was not getting included when building the app in release mode

Closes https://github.com/facebook/react-native/issues/33002
Closes https://github.com/facebook/react-native/issues/33018
Closes https://github.com/facebook/react-native/issues/33046
Potentially fixes https://github.com/facebook/react-native/issues/33029

## Changelog

[Android] [Changed] - Bump AGP to 7.1.0 and fix bundle inclusion in release mode

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

Test Plan:
1. Run `./scripts/test-manual-e2e.sh`
2. Select `A new RN app using the template` and `Android`
3. Test app on the emulator
4. Open Android studio build the app using release variant
4. Check the release apk using Android studio "Analyze APK" tool and ensure the bundle is included

![image](https://user-images.githubusercontent.com/11707729/152700410-3bcb80b0-35b6-4bdc-bf57-98a42a29e5a6.png)

Reviewed By: ShikaSD

Differential Revision: D34076884

Pulled By: cortinico

fbshipit-source-id: da4392af37e08e22dbcafba38476fd712141474a
2022-02-21 06:23:31 -08:00
Michel Kraemer a86cae7aac Update gradle-download-task to 5.0.1 (#32995)
Summary:
This enables concurrent task exection and parallel downloads

See also https://github.com/michel-kraemer/gradle-download-task/issues/138

## Changelog

[General] [Changed] - Update gradle-download-task to 5.0.1 to support concurrent downloads

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

Test Plan: Build runs successfully.

Reviewed By: ShikaSD

Differential Revision: D33892817

Pulled By: cortinico

fbshipit-source-id: 515443573e17a5c2b16a1cf3cea4bf3c5c2d96a7
2022-02-02 10:33:43 -08:00
Lorenzo Sciandra ac206aa814 removing unused Detox (#32907)
Summary:
I realized while checking for a few other things that Detox's presence in the repo is actually not really motivated - since Jul 2020 the few tests that were using it were disabled 120ff7ccde never to be reactivated since.

I noticed this while attempting to updating the Detox version to latest... which made me notice that the repo is still on a 16.x version while latest is 19.x (there are like 10 pages of releases between them: https://github.com/wix/Detox/releases) and I came to the conclusion that it's probably easier to just remove the old dusty code and eventually reintroduce it in the future if we ever consider it necessary.

## 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
-->

[General] [Removed] - Removing Detox from CI.

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

Test Plan: CI - nothing breaks.

Reviewed By: lunaleaps

Differential Revision: D33623199

Pulled By: cortinico

fbshipit-source-id: 7d8d133629b62b66959b309f2ca21852d396c9fc
2022-01-20 08:51:47 -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 cd4c6659d3 Bump Gradle, AGP and Download plugins
Summary:
Let's keep our Gradle infra deps up to date.
I'm bumping Gradle to 7.3.3 which fixes several Log4j CVEs,
AGP to 7.0.4 and the Download Task plugin to 4.1.2

Changelog:
[Android] [Changed] - Bump Gradle to 7.3.3 and AGP to 7.0.4

Reviewed By: mdvacca

Differential Revision: D33430789

fbshipit-source-id: b8f260beb4a9cc962ea3743610bfb4ead004d6cb
2022-01-06 10:37:28 -08:00
Andres Suarez 8bd3edec88 Update copyright headers from Facebook to Meta
Reviewed By: aaronabramov

Differential Revision: D33367752

fbshipit-source-id: 4ce94d184485e5ee0a62cf67ad2d3ba16e285c8f
2021-12-30 15:11:21 -08:00
Nicola Corti fab4752e1f Create a `cleanAll` Top Level Gradle task.
Summary:
This task is supposed to really clean all the files that are generated
as part of a build and bring you to a clean state.

Changelog:
[Internal] [Changed] - Create a `cleanAll` Top Level Gradle task.

Reviewed By: ShikaSD

Differential Revision: D32649942

fbshipit-source-id: 20b72ad4e1c0ef046aaaba94e2331176dca49abf
2021-11-30 01:53:06 -08:00
Dulmandakh 272cfe5d13 draft: bump AGP to 7 (#32589)
Summary:
Bump Android Gradle Plugin to 7.

## Changelog

[Android] [Changed] - Bump Android Gradle Plugin to 7.

This will make Java 11 a requirement for users that are either:
* Cloning react-native to contribute
* Using react-native while building from source.
* Creating new project from the template.

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

Test Plan: CI is green

Reviewed By: ShikaSD

Differential Revision: D32427945

Pulled By: cortinico

fbshipit-source-id: c1ea464d87c3e397616c55154b3d8b1c3ea6c592
2021-11-24 10:58:54 -08:00
Nicola Corti 2f8e52b52a Restrict mavenCentral to exclude react-native older packages
Summary:
This Diff is restricting the scope of `mavenCentral` to do not
include react-native packages. This will make us sure we don't pickup older
versions of react-native.
This specifically is a problem if you're building on a nightly as the version
of RN nightly is `0.0.0.xxx` which is lower than then version on maven central.
More on this here https://github.com/facebook/react-native/pull/32326#issuecomment-933368880

Changelog:
[Internal] [Changed] - Restrict mavenCentral to exclude react-native older packages

Reviewed By: ShikaSD

Differential Revision: D31571803

fbshipit-source-id: d7ce7e82825cbebda2e4e534565d7ab15dba2624
2021-10-13 05:34:40 -07:00
Nicola Corti b4ac21152b Remove `mavenLocal()`
Summary:
Having mavenLocal specified as part of the build is creating confusion as stale artifacts could be used inside the build.

This Diff is attempting to remove. Developers that need it for local development can still re-add it.

Changelog:
[Internal] [Changed] - Remove mavenLocal()

Reviewed By: ShikaSD

Differential Revision: D31057038

fbshipit-source-id: 90335047a0ba5a537ce347e4c1592bfe756d4135
2021-09-22 03:23:00 -07:00
Nicola Corti ae494e7ce1 Bump AGP to 4.2.2
Summary:
This is just a minor bump in the Android Gradle plugin.

Changelog:
[Android][Changed] - Bumped AGP to 4.2.2

allow-large-files

Reviewed By: ShikaSD

Differential Revision: D30220591

fbshipit-source-id: 217a21e4935bcd258ac3bcd45c7fb1ff5c0a1ead
2021-08-12 02:43:16 -07:00
Andrei Shikov 157d5956e2 Fix builds without NDK path env set
Summary:
Gradle cannot find the property, because it is defined conditionally depending on env variable.
We want the default for it to be null instead, so the variable exists but doesn't change default NDK location.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D29634984

fbshipit-source-id: 4cf40a1c8d20b2f9008a637456bf9d228d2959d3
2021-07-09 09:24:42 -07:00
Andrei Shikov 0b40fea60c Fix NDK path propagation
Summary:
Latest Android Gradle plugin doesn't respond to ANDROID_NDK env variable, so I propagated it explicitly and included with recommended `ndkPath` clause.

Changelog: [Internal]

allow-large-files

Reviewed By: fkgozali

Differential Revision: D29593132

fbshipit-source-id: 0785fe92385037d2d4cf290c2462b299800b6928
2021-07-08 13:23:48 -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 70da640946 remove jcenter (#31609)
Summary:
jcenter is read-only now, and newer versions of dependencies will be published to either MavenCentral or Jitpack. This PR removes jcenter to avoid future issues, then uses MavenCentral and Jitpack as replacement. Current flipper depends on Stetho version that is not available on MavenCentral, so had to exclude and bump the version.

Both Gradle and Buck successfully download all the dependencies.

## Changelog

[Android] [Changed] - Remove jcenter

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

Test Plan: rn-tester builds and runs as expected.

Reviewed By: mdvacca

Differential Revision: D28802444

Pulled By: ShikaSD

fbshipit-source-id: 043ef079d0cda77a1f8dd732678452ed712741a4
2021-06-02 09:57:28 -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
Andrei Shikov 6844b8e0d4 Use Maven Central for fbjni artifact
Summary:
FBJNI version have been updated recently and the new version is available on Maven Central, so we can remove this exception.

Changelog: [Internal]

Reviewed By: mdvacca

Differential Revision: D28355443

fbshipit-source-id: 1b3d88b668fed12deb786d36672f07dc98709aa0
2021-05-17 16:45:36 -07:00
Andrei Shikov 1cd9736039 Use trovej dependency from Maven Central
Summary:
JetBrains [republished](https://youtrack.jetbrains.com/issue/IDEA-261387) trovej to Maven Central, so we can now use that dependency instead

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D28355119

fbshipit-source-id: 9dd35b946bf9a09b06d831159be72fa9e5e94837
2021-05-11 09:43:33 -07:00
Andrei Shikov 4170726dfa Move to Maven Central for flipper deps
Summary:
Changelog: [Internal]

Flipper moved to maven central recently, so we can remove exceptions for it.

Reviewed By: fkgozali

Differential Revision: D26915353

fbshipit-source-id: c245e25ecb0eef1e279f197c2717673ec9ce3ca1
2021-03-10 08:38:13 -08:00
Andrei Shikov 704dd2812f Replace jcenter with mavenCentral when possible
Summary:
Changelog:
[Android][Changed] - Initial replacement of jcenter with mavenCentral.

Replaces jcenter with Maven Central in the build files of the repository.

Some dependencies are not resolvable from maven central yet, so for now they are included from jcenter, but limited to specific modules only.

I didn't touch the template for now.

Reviewed By: mdvacca

Differential Revision: D26260977

fbshipit-source-id: 2a65e1195b6367c026089184ad6471bf3573dc37
2021-02-05 05:17:32 -08: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
Dulmandakh dfa9db49e3 bump Android Gradle Plugin to 4.1.0 (#30201)
Summary:
Android Studio 4.1 release with Android Gradle Plugin 4.1.0, thus I expect developers will update to newer version and expect React Native support. Thus release include many fixes and improvements, see[release notes](https://developer.android.com/studio/releases/gradle-plugin#4-1-0), but most importantly Google released it's API documentation at https://developer.android.com/reference/tools/gradle-api. We lacked the API documentation to develop proper React Gradle Plugin.

## Changelog

[Android] [Changed] - bump Android Gradle Plugin to 4.1.0

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

Test Plan: RNTester builds and runs as expected, also my apps.

Reviewed By: cpojer

Differential Revision: D24560213

Pulled By: fkgozali

fbshipit-source-id: 9cf1e2373f278885b35b4f9176c7ad736ec50f6b
2020-10-27 23:35:51 -07:00
Frieder Bluemle 553fb8b28d Update Android Gradle plugin to 4.0.1 (#29013)
Summary:
This is a major version update that needs to be tested thoroughly.

Android Studio 4.0.1 is now available in the stable channel

https://androidstudio.googleblog.com/2020/05/android-studio-40-available-in-stable.html
https://developer.android.com/studio/releases/gradle-plugin#4.0.1

## Changelog

[Android] [Changed] - Update Android Gradle plugin to 4.0.1

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

Test Plan:
Build project

Closes https://github.com/facebook/react-native/issues/29044

Reviewed By: shergin

Differential Revision: D24041233

Pulled By: fkgozali

fbshipit-source-id: 68ef0f313aa773866e65796e323ed0f19f41f834
2020-09-30 22:16:54 -07:00
Frieder Bluemle cf8368f204 Update Android Gradle plugin to 3.6.4 (#28170)
Summary:
Android Studio 3.6.3 is now available in the stable channel

https://androidstudio.googleblog.com/2020/04/android-studio-363-available.html

EDIT: Another patch update to `3.6.4` was released in July 2020:

> This minor update supports compatibility with new default settings and features for package visibility in Android 11.

Details: https://developer.android.com/studio/releases/gradle-plugin#3-6-0

## Changelog

[Android] [Changed] - Update Android Gradle plugin to 3.6.4

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

Test Plan: Build project

Reviewed By: mdvacca

Differential Revision: D23357163

Pulled By: fkgozali

fbshipit-source-id: 45f1bfc8a1b21e60c6da03e60e4fa3b1e30c221c
2020-08-27 16:28:28 -07:00
Chad Smith 29d3dfbd19 add Detox integrations to Android RNTester app
Summary:
This diff adds required Detox integrations to the RNTester app to be able to run Detox end-to-end tests on the Android version of the app.

* Instructions at https://github.com/wix/Detox/blob/master/docs/Introduction.Android.md were followed.
* The `minSdkVersion` version for the app was bumped to 18, as required by Detox.
* I also added build and test configurations in `package.json`
*  The debug app is able to run some of the existing tests, but the release app instacrashes. I do not know the reason for the instacrash at this time.
* CI integrations to build and test the Android app will be added in future diffs

Changelog:
[Internal] add Detox integrations to the RNTester Android app

Reviewed By: TheSavior

Differential Revision: D19566834

fbshipit-source-id: 5dd506bbdbb426a5db18146e5dc7c450a27b1d0c
2020-02-11 10:09:18 -08:00
SAEED e1e081b00e Update Android Gradle plugin to 3.5.3 (#27462)
Summary:
Android Studio 3.5.3 is now available in the stable channel

https://androidstudio.googleblog.com/2019/12/android-studio-353-available.html

## Changelog

[Android] [Changed] - Update Android Gradle plugin to 3.5.3
Pull Request resolved: https://github.com/facebook/react-native/pull/27462

Test Plan: Build project

Differential Revision: D18936678

Pulled By: mdvacca

fbshipit-source-id: 6001a3b23561f249d4690f0f4e41d397e69c7b70
2019-12-11 11:27:04 -08:00
Dulmandakh 088be260b6 bump gradle-download-task to 4.0.2 (#27329)
Summary:
Recently, we bumped Gradle to 6.0.1, and it seems that gradle-download-task has a compatibility issue, thus 4.0.2 fixed and added 6.0.1 in their CI.

## Changelog

[Android] [Changed] - Bump gradle-download-task to 4.0.2
Pull Request resolved: https://github.com/facebook/react-native/pull/27329

Test Plan: RNTester builds and runs as expected.

Differential Revision: D18689039

Pulled By: mdvacca

fbshipit-source-id: 01a1b607a36f3885e6dfa4ee8e8eadc18e9180bc
2019-11-27 11:42:31 -08:00
Frieder Bluemle b41b5ce8ae Update Android Gradle plugin to 3.5.2 (#27125)
Summary:
Android Studio 3.5.2 is now available in the stable channel

https://androidstudio.googleblog.com/2019/11/android-studio-352-available.html

## Changelog

[Android] [Changed] - Update Android Gradle plugin to 3.5.2
Pull Request resolved: https://github.com/facebook/react-native/pull/27125

Test Plan: Build project

Differential Revision: D18346480

Pulled By: cpojer

fbshipit-source-id: 92121406e91dc66146a1ff2125942355d188e6e4
2019-11-06 02:26:55 -08:00
Andres Suarez 10f55e752d Tidy up license headers
Summary: Changelog: [General] [Fixed] - License header cleanup

Differential Revision: D18060535

fbshipit-source-id: f5c07e983c54a055bf3c42662c99f288643aa27c
2019-10-22 07:46:08 -07:00
Andres Suarez 722feeb02b Tidy up license headers [1/n]
Summary: Changelog: [General] [Fixed] - License header cleanup

Reviewed By: yungsters

Differential Revision: D17952695

fbshipit-source-id: 81aa607612ba1357ef7814ef20371335151afe7e
2019-10-16 10:06:33 -07:00
Frieder Bluemle 6aae8e0756 Update Android Gradle plugin to 3.5.1 (#26694)
Summary:
Android Studio 3.5.1 is now available in the stable channel

https://androidstudio.googleblog.com/2019/10/android-studio-351-available.html

## Changelog

[Android] [Changed] - Update Android Gradle plugin to 3.5.1
Pull Request resolved: https://github.com/facebook/react-native/pull/26694

Test Plan: Build project

Differential Revision: D17729849

Pulled By: cpojer

fbshipit-source-id: 0a0ba7a38ff5be096b56a6470c3ea4912a053d94
2019-10-02 17:44:29 -07:00
Dulmandakh 4763000554 bump android gradle plugin to 3.5.0 (#26129)
Summary:
Android Gradle Plugin 3.5.0 released with a lot of improvements and bug fixes. It's important to have this change merged before 0.61 release. See https://developer.android.com/studio/releases/gradle-plugin

## Changelog

[Android] [Changed] - bump android gradle plugin to 3.5.0
Pull Request resolved: https://github.com/facebook/react-native/pull/26129

Test Plan: RNTester builds and runs as expected

Reviewed By: mdvacca

Differential Revision: D17091520

Pulled By: osdnk

fbshipit-source-id: 232b9209526e62a7344d74422fd8471a03dec7f4
2019-08-29 07:35:41 -07:00
Dulmandakh 77ad650faa bump gradle-download-task to 4.0.0 (#25654)
Summary:
bump gradle-download-task to 4.0.0, works best and tests with Gradle 5.x.

## Changelog

[Android] [Changed] - bump gradle-download-task to 4.0.0
Pull Request resolved: https://github.com/facebook/react-native/pull/25654

Test Plan: RNTester builds and runs as expected

Differential Revision: D16263755

Pulled By: mdvacca

fbshipit-source-id: 39f64d5ff554f99d932e0f3696a1ae5fd4528055
2019-07-15 10:28:16 -07:00
Dulmandakh eb48ed1f19 bump Android Gradle Plugin to 3.4.2 (#25652)
Summary:
Bump Android Gradle Plugin to 3.4.2, includes bug fixes and improvements

## Changelog

[Android][Changed] - bump Android Gradle Plugin to 3.4.2
Pull Request resolved: https://github.com/facebook/react-native/pull/25652

Test Plan: RNTester builds and runs as expected

Differential Revision: D16258865

Pulled By: mdvacca

fbshipit-source-id: c20600e3c7fc44793f42a0061bbb22a6ead9f0e4
2019-07-14 23:48:34 -07:00
Dulmandakh fbc6d8caff bump android gradle plugin to 3.4.1 (#24883)
Summary:
bump android gradle plugin to 3.4.1, includes many fixes and improvements.

## Changelog

[Android] [Changed] - bump android gradle plugin to 3.4.1
Pull Request resolved: https://github.com/facebook/react-native/pull/24883

Differential Revision: D15474556

Pulled By: hramos

fbshipit-source-id: 8d1eb91855b9f416ed3380c61f34672deded26c1
2019-05-24 11:53:17 -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
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