From 5c38d2d5dc6920b8b19990519feafe1dd01d2293 Mon Sep 17 00:00:00 2001 From: Prerak Mann Date: Sun, 11 Aug 2019 21:27:39 +0530 Subject: [PATCH] save androidx migration --- android/build.gradle | 12 +++++++++++- .../nearby_connections/NearbyConnectionsPlugin.java | 9 ++++----- example/android/app/build.gradle | 6 +++--- example/android/gradle.properties | 2 ++ example/pubspec.lock | 7 ------- example/pubspec.yaml | 1 - 6 files changed, 20 insertions(+), 17 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 3f953a0..388aafa 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -10,6 +10,16 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:3.4.0' } + subprojects { + project.configurations.all { + resolutionStrategy.eachDependency { details -> + if (details.requested.group == 'androidx.core' + && !details.requested.name.contains('androidx') ) { + details.useVersion "1.0.1" + } + } + } + } } rootProject.allprojects { @@ -26,7 +36,7 @@ android { defaultConfig { minSdkVersion 16 - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } lintOptions { disable 'InvalidPackage' diff --git a/android/src/main/java/com/pkmnapps/nearby_connections/NearbyConnectionsPlugin.java b/android/src/main/java/com/pkmnapps/nearby_connections/NearbyConnectionsPlugin.java index cceb1d7..7a552d2 100644 --- a/android/src/main/java/com/pkmnapps/nearby_connections/NearbyConnectionsPlugin.java +++ b/android/src/main/java/com/pkmnapps/nearby_connections/NearbyConnectionsPlugin.java @@ -3,11 +3,10 @@ package com.pkmnapps.nearby_connections; import android.Manifest; import android.app.Activity; import android.content.pm.PackageManager; -import android.net.Uri; -import android.os.ParcelFileDescriptor; -import android.support.annotation.NonNull; -import android.support.v4.app.ActivityCompat; -import android.support.v4.content.ContextCompat; + +import androidx.annotation.NonNull; +import androidx.core.app.ActivityCompat; +import androidx.core.content.ContextCompat; import com.google.android.gms.nearby.Nearby; import com.google.android.gms.nearby.connection.AdvertisingOptions; diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 1e286a1..07be9c6 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -38,7 +38,7 @@ android { targetSdkVersion 28 versionCode flutterVersionCode.toInteger() versionName flutterVersionName - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { @@ -56,6 +56,6 @@ flutter { dependencies { testImplementation 'junit:junit:4.12' - androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' + androidTestImplementation 'androidx.test:runner:1.1.0' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0' } diff --git a/example/android/gradle.properties b/example/android/gradle.properties index 8bd86f6..53ae0ae 100644 --- a/example/android/gradle.properties +++ b/example/android/gradle.properties @@ -1 +1,3 @@ +android.enableJetifier=true +android.useAndroidX=true org.gradle.jvmargs=-Xmx1536M diff --git a/example/pubspec.lock b/example/pubspec.lock index b194038..fafe0b3 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -81,13 +81,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.6.2" - path_provider: - dependency: "direct main" - description: - name: path_provider - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" pedantic: dependency: transitive description: diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 4185d04..2660362 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -11,7 +11,6 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^0.1.2 - path_provider: ^1.2.0 image_picker: ^0.6.1+2 dev_dependencies: