Skip to content

Commit 7892779

Browse files
author
Michael Klimushyn
authored
Migrate independent plugins to AndroidX (#1103)
The original Android support libraries have been deprecated in favor of AndroidX. This migration shouldn't affect behavior in a user noticeable way, but does require plugin users to also migrate their app. See [migrating to AndroidX](https://developer.android.com/jetpack/androidx/migrate). Migrates all of our plugins without pub interdepencies to use the new AndroidX support libraries. At least one followup PR will be required to update the remaining plugins that depend on these after this is pushed to pub. - android_intent - battery - connectivity - device_info - firebase_auth - firebase_core - google_maps_flutter - google_sign_in - image_picker - in_app_purchase - local_auth - location_background - package_info - path_provider - quick_actions - sensors - share - shared_preferences - url_launcher - video_player - webview_flutter
1 parent 58f8439 commit 7892779

File tree

15 files changed

+52
-22
lines changed

15 files changed

+52
-22
lines changed

packages/firebase_auth/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 0.8.0
2+
3+
* **Breaking change**. Migrate from the deprecated original Android Support
4+
Library to AndroidX. This shouldn't result in any functional changes, but it
5+
requires any Android apps using this plugin to [also
6+
migrate](https://developer.android.com/jetpack/androidx/migrate) if they're
7+
using the original support library.
8+
19
## 0.7.0
210

311
* Introduce third-party auth provider classes that generate `AuthCredential`s

packages/firebase_auth/android/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ buildscript {
88
}
99

1010
dependencies {
11-
classpath 'com.android.tools.build:gradle:3.2.1'
11+
classpath 'com.android.tools.build:gradle:3.3.0'
1212
}
1313
}
1414

@@ -22,11 +22,11 @@ rootProject.allprojects {
2222
apply plugin: 'com.android.library'
2323

2424
android {
25-
compileSdkVersion 27
25+
compileSdkVersion 28
2626

2727
defaultConfig {
2828
minSdkVersion 16
29-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
29+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
3030
}
3131
lintOptions {
3232
disable 'InvalidPackage'

packages/firebase_auth/android/src/main/java/io/flutter/plugins/firebaseauth/FirebaseAuthPlugin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
package io.flutter.plugins.firebaseauth;
66

77
import android.net.Uri;
8-
import android.support.annotation.NonNull;
9-
import android.support.annotation.Nullable;
108
import android.util.SparseArray;
9+
import androidx.annotation.NonNull;
10+
import androidx.annotation.Nullable;
1111
import com.google.android.gms.tasks.OnCompleteListener;
1212
import com.google.android.gms.tasks.Task;
1313
import com.google.firebase.FirebaseApiNotAvailableException;

packages/firebase_auth/example/android/app/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
2525
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2626

2727
android {
28-
compileSdkVersion 27
28+
compileSdkVersion 28
2929

3030
lintOptions {
3131
disable 'InvalidPackage'
@@ -34,10 +34,10 @@ android {
3434
defaultConfig {
3535
applicationId "io.flutter.plugins.firebaseauthexample"
3636
minSdkVersion 16
37-
targetSdkVersion 27
37+
targetSdkVersion 28
3838
versionCode flutterVersionCode.toInteger()
3939
versionName flutterVersionName
40-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
40+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
4141
}
4242

4343
buildTypes {
@@ -55,8 +55,8 @@ flutter {
5555

5656
dependencies {
5757
testImplementation 'junit:junit:4.12'
58-
androidTestImplementation 'com.android.support.test:runner:1.0.2'
59-
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
58+
androidTestImplementation 'androidx.test:runner:1.1.1'
59+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
6060
}
6161

6262
apply plugin: 'com.google.gms.google-services'
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
android.enableJetifier=true
2+
android.useAndroidX=true
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

packages/firebase_auth/example/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
}
66

77
dependencies {
8-
classpath 'com.android.tools.build:gradle:3.2.1'
8+
classpath 'com.android.tools.build:gradle:3.3.0'
99
classpath 'com.google.gms:google-services:4.2.0'
1010
}
1111
}

packages/firebase_auth/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Flutter plugin for Firebase Auth, enabling Android and iOS
44
like Google, Facebook and Twitter.
55
author: Flutter Team <flutter-dev@googlegroups.com>
66
homepage: https://github.com/flutter/plugins/tree/master/packages/firebase_auth
7-
version: 0.7.0
7+
version: 0.8.0
88

99
flutter:
1010
plugin:

packages/firebase_core/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 0.3.0
2+
3+
* **Breaking change**. Migrate from the deprecated original Android Support
4+
Library to AndroidX. This shouldn't result in any functional changes, but it
5+
requires any Android apps using this plugin to [also
6+
migrate](https://developer.android.com/jetpack/androidx/migrate) if they're
7+
using the original support library.
8+
19
## 0.2.5+1
210

311
* Bump Android dependencies to latest.

packages/firebase_core/android/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ buildscript {
88
}
99

1010
dependencies {
11-
classpath 'com.android.tools.build:gradle:3.2.1'
11+
classpath 'com.android.tools.build:gradle:3.3.0'
1212
}
1313
}
1414

@@ -22,11 +22,11 @@ rootProject.allprojects {
2222
apply plugin: 'com.android.library'
2323

2424
android {
25-
compileSdkVersion 27
25+
compileSdkVersion 28
2626

2727
defaultConfig {
2828
minSdkVersion 16
29-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
29+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
3030
}
3131
lintOptions {
3232
disable 'InvalidPackage'

0 commit comments

Comments
 (0)