Android: Migrate to AndroidX

The Android Support Library is not androidx

https://developer.android.com/jetpack/androidx

This also required me to update each of the dependencies, as the
androidx migrated has resulted in major version changes in most of the
libraries.
This commit is contained in:
Vishesh Handa
2019-05-20 14:37:26 +02:00
parent 9051d1e7dc
commit efa4db5109
5 changed files with 23 additions and 27 deletions

View File

@ -43,7 +43,7 @@ android {
targetSdkVersion 28 targetSdkVersion 28
versionCode flutterVersionCode.toInteger() versionCode flutterVersionCode.toInteger()
versionName flutterVersionName versionName flutterVersionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
externalNativeBuild { externalNativeBuild {
cmake { cmake {
@ -99,19 +99,13 @@ flutter {
dependencies { dependencies {
testImplementation 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1' androidTestImplementation 'androidx.test:runner:1.1.0'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
implementation 'com.jcraft:jsch:0.1.54' implementation 'com.jcraft:jsch:0.1.54'
// For reading a file to string // For reading a file to string
implementation 'commons-io:commons-io:2.5' implementation 'commons-io:commons-io:2.5'
// Check for v11.4.2 or higher
implementation 'com.google.firebase:firebase-core:16.0.6'
// Add dependency
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.8'
} }
configurations { configurations {

View File

@ -11,8 +11,8 @@ buildscript {
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.2.1' classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.2.0' classpath 'com.google.gms:google-services:3.2.1'
classpath 'io.fabric.tools:gradle:1.26.1' classpath 'io.fabric.tools:gradle:1.+'
} }
} }

View File

@ -1 +1,3 @@
android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536M org.gradle.jvmargs=-Xmx1536M

View File

@ -114,7 +114,7 @@ packages:
name: firebase_analytics name: firebase_analytics
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.2.0+1" version: "3.0.1"
flutter: flutter:
dependency: "direct main" dependency: "direct main"
description: flutter description: flutter
@ -126,7 +126,7 @@ packages:
name: flutter_crashlytics name: flutter_crashlytics
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.2.1+1" version: "1.0.0"
flutter_driver: flutter_driver:
dependency: "direct dev" dependency: "direct dev"
description: flutter description: flutter
@ -253,7 +253,7 @@ packages:
name: launch_review name: launch_review
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.1" version: "2.0.0"
markdown: markdown:
dependency: transitive dependency: transitive
description: description:
@ -309,7 +309,7 @@ packages:
name: package_info name: package_info
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.3.2+1" version: "0.4.0+3"
package_resolver: package_resolver:
dependency: transitive dependency: transitive
description: description:
@ -386,7 +386,7 @@ packages:
name: shared_preferences name: shared_preferences
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.4.3" version: "0.5.2"
shelf: shelf:
dependency: transitive dependency: transitive
description: description:
@ -510,7 +510,7 @@ packages:
name: uuid name: uuid
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.3" version: "2.0.1"
vector_math: vector_math:
dependency: transitive dependency: transitive
description: description:

View File

@ -6,19 +6,19 @@ dependencies:
flutter: flutter:
sdk: flutter sdk: flutter
intl: "^0.15.6" intl: "^0.15.6"
path: "^1.5.1" path: ^1.6.2
uuid: "^1.0.0" uuid: ^2.0.1
yaml: "^2.1.13" yaml: ^2.1.15
firebase_analytics: ^1.1.0 firebase_analytics: ^3.0.1
flutter_crashlytics: ^0.2.0 flutter_crashlytics: ^1.0.0
shared_preferences: ^0.4.3 shared_preferences: ^0.5.2
url_launcher: ^5.0.1 url_launcher: ^5.0.2
dots_indicator: ^0.0.3 dots_indicator: ^0.0.3
package_info: ^0.3.2+1 package_info: ^0.4.0+3
http: ^0.12.0+1 http: ^0.12.0+1
badges: ^0.0.6 badges: ^0.0.6
share: ^0.6.0+1 share: ^0.6.1+1
launch_review: ^1.0.1 launch_review: ^2.0.0
device_info: ^0.4.0+1 device_info: ^0.4.0+1
flutter_markdown: ^0.2.0 flutter_markdown: ^0.2.0
flutter_email_sender: ^2.0.2 flutter_email_sender: ^2.0.2