Browse Source

upgrading to sdk 28 and androidx

Greg Alexander 5 years ago
parent
commit
e83f84f132

+ 4
- 4
android/build.gradle View File

@@ -14,16 +14,16 @@ buildscript {
14 14
         google()
15 15
     }
16 16
     dependencies {
17
-        classpath 'com.android.tools.build:gradle:3.1.4'
17
+        classpath 'com.android.tools.build:gradle:3.2.1'
18 18
     }
19 19
 }
20 20
 
21 21
 android {
22
-    compileSdkVersion safeExtGet('compileSdkVersion', 26)
23
-    buildToolsVersion safeExtGet('buildToolsVersion', '26.0.3')
22
+    compileSdkVersion safeExtGet('compileSdkVersion', 28)
23
+    buildToolsVersion safeExtGet('buildToolsVersion', '28.0.3')
24 24
     defaultConfig {
25 25
         minSdkVersion safeExtGet('minSdkVersion', 16)
26
-        targetSdkVersion safeExtGet('targetSdkVersion', 26)
26
+        targetSdkVersion safeExtGet('targetSdkVersion', 28)
27 27
         versionCode 1
28 28
         versionName "1.0"
29 29
     }

+ 2
- 0
android/gradle.properties View File

@@ -0,0 +1,2 @@
1
+android.enableJetifier=true
2
+android.useAndroidX=true

+ 1
- 1
android/src/main/AndroidManifest.xml View File

@@ -24,7 +24,7 @@
24 24
     <application android:label="@string/app_name">
25 25
 
26 26
         <provider
27
-            android:name="android.support.v4.content.FileProvider"
27
+            android:name="androidx.core.content.FileProvider"
28 28
             android:authorities="${applicationId}.provider"
29 29
             android:exported="false"
30 30
             android:grantUriPermissions="true">

+ 1
- 2
android/src/main/java/com/RNFetchBlob/RNFetchBlob.java View File

@@ -6,7 +6,7 @@ import android.content.Intent;
6 6
 import android.content.pm.PackageManager;
7 7
 import android.net.Uri;
8 8
 import android.os.Build;
9
-import android.support.v4.content.FileProvider;
9
+import androidx.core.content.FileProvider;
10 10
 import android.util.SparseArray;
11 11
 
12 12
 import com.facebook.react.bridge.ActivityEventListener;
@@ -28,7 +28,6 @@ import okhttp3.OkHttpClient;
28 28
 import okhttp3.JavaNetCookieJar;
29 29
 
30 30
 import java.io.File;
31
-import java.util.HashMap;
32 31
 import java.util.Map;
33 32
 import java.util.concurrent.LinkedBlockingQueue;
34 33
 import java.util.concurrent.ThreadPoolExecutor;

+ 1
- 1
android/src/main/java/com/RNFetchBlob/RNFetchBlobBody.java View File

@@ -1,6 +1,6 @@
1 1
 package com.RNFetchBlob;
2 2
 
3
-import android.support.annotation.NonNull;
3
+import androidx.annotation.NonNull;
4 4
 import android.util.Base64;
5 5
 
6 6
 import com.facebook.react.bridge.Arguments;

+ 1
- 2
android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java View File

@@ -8,7 +8,7 @@ import android.content.IntentFilter;
8 8
 import android.database.Cursor;
9 9
 import android.net.Uri;
10 10
 import android.os.Build;
11
-import android.support.annotation.NonNull;
11
+import androidx.annotation.NonNull;
12 12
 import android.util.Base64;
13 13
 
14 14
 import com.RNFetchBlob.Response.RNFetchBlobDefaultResp;
@@ -16,7 +16,6 @@ import com.RNFetchBlob.Response.RNFetchBlobFileResp;
16 16
 import com.facebook.common.logging.FLog;
17 17
 import com.facebook.react.bridge.Arguments;
18 18
 import com.facebook.react.bridge.Callback;
19
-import com.facebook.react.bridge.ReactApplicationContext;
20 19
 import com.facebook.react.bridge.ReadableArray;
21 20
 import com.facebook.react.bridge.ReadableMap;
22 21
 import com.facebook.react.bridge.ReadableMapKeySetIterator;

+ 1
- 2
android/src/main/java/com/RNFetchBlob/Response/RNFetchBlobFileResp.java View File

@@ -1,7 +1,6 @@
1 1
 package com.RNFetchBlob.Response;
2 2
 
3
-import android.support.annotation.NonNull;
4
-import android.util.Log;
3
+import androidx.annotation.NonNull;
5 4
 
6 5
 import com.RNFetchBlob.RNFetchBlobConst;
7 6
 import com.RNFetchBlob.RNFetchBlobProgressConfig;