Skip to content

Commit e969d74

Browse files
author
Michael Klimushyn
authored
Migrate remaining plugins to AndroidX (#1115)
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). Fixes flutter/flutter#23995.
1 parent e4c438b commit e969d74

File tree

102 files changed

+381
-180
lines changed

Some content is hidden

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

102 files changed

+381
-180
lines changed

packages/cloud_firestore/CHANGELOG.md

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

310
* Resolved "explicit self reference" and "loses accuracy" compiler warnings.

packages/cloud_firestore/android/build.gradle

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

1111
dependencies {
12-
classpath 'com.android.tools.build:gradle:3.2.1'
12+
classpath 'com.android.tools.build:gradle:3.3.0'
1313
}
1414
}
1515

@@ -24,11 +24,11 @@ allprojects {
2424
apply plugin: 'com.android.library'
2525

2626
android {
27-
compileSdkVersion 27
27+
compileSdkVersion 28
2828

2929
defaultConfig {
3030
minSdkVersion 16
31-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
31+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
3232
}
3333
lintOptions {
3434
disable 'InvalidPackage'

packages/cloud_firestore/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java

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

77
import android.os.AsyncTask;
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.OnFailureListener;
1212
import com.google.android.gms.tasks.OnSuccessListener;
1313
import com.google.android.gms.tasks.Task;

packages/cloud_firestore/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.firebase.firestoreexample'
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/cloud_firestore/example/android/build.gradle

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

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.2.1'
9+
classpath 'com.android.tools.build:gradle:3.3.0'
1010
classpath 'com.google.gms:google-services:4.2.0'
1111
}
1212
}

packages/cloud_firestore/example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66
sdk: flutter
77
cloud_firestore:
88
path: ../
9-
firebase_core: "^0.2.5+1"
9+
firebase_core: "^0.3.0"
1010

1111
flutter:
1212
uses-material-design: true

packages/cloud_firestore/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Flutter plugin for Cloud Firestore, a cloud-hosted, noSQL database
33
live synchronization and offline support on Android and iOS.
44
author: Flutter Team <flutter-dev@googlegroups.com>
55
homepage: https://github.com/flutter/plugins/tree/master/packages/cloud_firestore
6-
version: 0.8.2+3
6+
version: 0.9.0
77

88
flutter:
99
plugin:
@@ -16,7 +16,7 @@ dependencies:
1616
sdk: flutter
1717
meta: "^1.0.5"
1818
collection: "^1.14.3"
19-
firebase_core: "^0.2.5+1"
19+
firebase_core: "^0.3.0"
2020

2121
dev_dependencies:
2222
flutter_test:

packages/cloud_functions/CHANGELOG.md

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

310
* Set iOS deployment target to 8.0 (minimum supported by both Firebase SDKs and Flutter), fixes compilation errors.

0 commit comments

Comments
 (0)