Skip to content

Commit da1aa80

Browse files
authored
upgrade to AGP7 (firebase#1979)
1 parent 0ab8eac commit da1aa80

File tree

113 files changed

+57
-330
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+57
-330
lines changed

.github/workflows/android.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v2
12-
- name: set up JDK 1.8
12+
- name: set up JDK 11
1313
uses: actions/setup-java@v1
1414
with:
15-
java-version: 1.8
15+
java-version: 11
1616
- name: Build with Gradle
1717
run: ./scripts/build.sh
1818
- name: Print Logs

app/build.gradle.kts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ plugins {
55
}
66

77
android {
8-
compileSdkVersion(Config.SdkVersions.compile)
8+
compileSdk = Config.SdkVersions.compile
99

1010
defaultConfig {
11-
minSdkVersion(Config.SdkVersions.min)
12-
targetSdkVersion(Config.SdkVersions.target)
11+
minSdk = Config.SdkVersions.min
12+
targetSdk = Config.SdkVersions.target
1313

1414
versionName = Config.version
1515
versionCode = 1
@@ -37,13 +37,15 @@ android {
3737
}
3838
}
3939

40-
lintOptions {
40+
lint {
4141
// Common lint options across all modules
4242
disable(
4343
"IconExpectedSize",
4444
"InvalidPackage", // Firestore uses GRPC which makes lint mad
4545
"NewerVersionAvailable", "GradleDependency", // For reproducible builds
46-
"SelectableText", "SyntheticAccessor" // We almost never care about this
46+
"SelectableText", "SyntheticAccessor", // We almost never care about this
47+
"UnusedIds", "MediaCapabilities" // TODO(rosariopfernandes): remove this once we confirm
48+
// it builds successfully
4749
)
4850

4951
// Module-specific

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
tools:ignore="GoogleAppIndexingWarning,UnusedAttribute"
2020
android:usesCleartextTraffic="true">
2121

22-
<activity android:name=".ChooserActivity">
22+
<activity android:name=".ChooserActivity"
23+
android:exported="false">
2324
<intent-filter>
2425
<action android:name="android.intent.action.MAIN" />
2526

app/src/main/res/values/colors.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<resources>
22
<color name="colorPrimary">#039BE5</color>
3-
<color name="colorPrimaryDark">#0288D1</color>
43
<color name="colorPrimaryVariant">#0288D1</color>
54
<color name="colorSecondary">#FFA000</color>
65

@@ -14,7 +13,6 @@
1413
<color name="material_gray_300">#E0E0E0</color>
1514
<color name="material_gray_500">#9e9e9e</color>
1615

17-
<color name="material_lime_a700">#AEEA00</color>
1816
<color name="material_red_a200">#FF5252</color>
1917

2018
</resources>

auth/build.gradle.kts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@ plugins {
66
}
77

88
android {
9-
compileSdkVersion(Config.SdkVersions.compile)
9+
compileSdk = Config.SdkVersions.compile
1010

1111
defaultConfig {
12-
minSdkVersion(Config.SdkVersions.min)
13-
targetSdkVersion(Config.SdkVersions.target)
12+
minSdk = Config.SdkVersions.min
13+
targetSdk =Config.SdkVersions.target
1414

15-
versionName = Config.version
16-
versionCode = 1
15+
buildConfigField("String", "VERSION_NAME", "\"${Config.version}\"")
1716

1817
resourcePrefix("fui_")
1918
vectorDrawables.useSupportLibrary = true
@@ -31,7 +30,7 @@ android {
3130
targetCompatibility = JavaVersion.VERSION_1_8
3231
}
3332

34-
lintOptions {
33+
lint {
3534
// Common lint options across all modules
3635
disable(
3736
"IconExpectedSize",
@@ -59,9 +58,9 @@ android {
5958
}
6059

6160
testOptions {
62-
unitTests(closureOf<TestOptions.UnitTestOptions> {
61+
unitTests {
6362
isIncludeAndroidResources = true
64-
})
63+
}
6564
}
6665
}
6766

auth/src/main/java/com/firebase/ui/auth/IdpResponse.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
package com.firebase.ui.auth;
1616

17+
import android.annotation.SuppressLint;
1718
import android.content.Intent;
1819
import android.os.Parcel;
1920
import android.os.Parcelable;
@@ -123,7 +124,9 @@ public static IdpResponse from(@NonNull Exception e) {
123124
} else if (e instanceof FirebaseUiUserCollisionException) {
124125
FirebaseUiUserCollisionException collisionException
125126
= (FirebaseUiUserCollisionException) e;
126-
User user = new User.Builder(
127+
// Lint complains about providerId not being
128+
// in the pre-defined set of constants
129+
@SuppressLint("WrongConstant") User user = new User.Builder(
127130
collisionException.getProviderId(),
128131
collisionException.getEmail())
129132
.build();

auth/src/main/res/layout/fui_check_email_layout.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
<LinearLayout
2020
style="@style/FirebaseUI.WrapperStyle"
21-
android:id="@+id/email_top_layout"
2221
android:layout_height="wrap_content"
2322
android:orientation="vertical">
2423

auth/src/main/res/layout/fui_email_link_sign_in_layout.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
android:orientation="vertical">
2525

2626
<TextView
27-
android:id="@+id/sign_in_email_sent_header_text"
2827
style="@style/FirebaseUI.Text.Heading"
2928
android:layout_width="match_parent"
3029
android:layout_height="wrap_content"

auth/src/main/res/layout/fui_email_link_trouble_signing_in_layout.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
android:text="@string/fui_email_link_trouble_getting_email_header" />
3131

3232
<TextView
33-
android:id="@+id/trouble_signing_in_possible_fixes"
3433
style="@style/FirebaseUI.Text.BodyText"
3534
android:layout_width="match_parent"
3635
android:layout_height="wrap_content"
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
<com.google.android.material.button.MaterialButton xmlns:android="http://schemas.android.com/apk/res/android"
2-
android:id="@+id/apple_signin_button"
32
style="@style/FirebaseUI.Button.AccountChooser.AppleButton"
43
android:text="@string/fui_sign_in_with_apple"/>

0 commit comments

Comments
 (0)