Upgrade Android build infra (#3095)

Summary:
This includes a bunch of different things which I wanted to do separately, but it's all a massive Jenga Tower and you cannot remove a single piece.

- Litho upgrade
- Gradle plugin upgrade
- Remove storage permission as it apparently doesn't do anything above Android 10
- Upgraded build target to Android 12 because the new support lib/Kotlin stdlib required this which then caused the issue below to pop up
- Added "export=true" everywhere as this is now a blocking issue if you don't have it
- Upgraded to the LeakCanary2 plugin as version one no longer builds with an Android 12 target for the export reason
- Make CI run on JRE 11 because that's required by the new Gradle plugin
- Update internal CI to no longer define the SDK twice and use Java 11

Pull Request resolved: https://github.com/facebook/flipper/pull/3095

Test Plan: Built Android Sample and Tutorial app, connected to Flipper.

Reviewed By: lblasa

Differential Revision: D32644410

Pulled By: passy

fbshipit-source-id: 8978f158d9c642b3bbd9dbbd7321eb20098a7a53
This commit is contained in:
Pascal Hartig
2021-11-25 12:20:55 -08:00
committed by Facebook GitHub Bot
parent c9daf81098
commit 8ccae8a7ac
10 changed files with 28 additions and 26 deletions

View File

@@ -8,9 +8,9 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.facebook.flipper.sample">
xmlns:tools="http://schemas.android.com/tools"
package="com.facebook.flipper.sample">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:name=".FlipperSampleApplication"
@@ -18,8 +18,10 @@
android:icon="@drawable/ic_launcher"
android:allowBackup="false"
android:theme="@style/NoTitleBarWhiteBG"
android:debuggable="true">
<activity android:name=".MainActivity">
android:debuggable="true"
tools:ignore="HardcodedDebugMode">
<activity android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
@@ -31,7 +33,8 @@
<data android:scheme="flipper" android:host="demo_page" />
</intent-filter>
</activity>
<activity android:name=".DeepLinkActivity">
<activity android:name=".DeepLinkActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
@@ -39,7 +42,8 @@
<data android:scheme="flipper" android:host="deep_link_activity" />
</intent-filter>
</activity>
<activity android:name=".LayoutTestActivity">
<activity android:name=".LayoutTestActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
@@ -47,7 +51,8 @@
<data android:scheme="flipper" android:host="layout_test_activity" />
</intent-filter>
</activity>
<activity android:name=".FragmentTestActivity">
<activity android:name=".FragmentTestActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />