diff --git a/android/app/build.gradle b/android/app/build.gradle index d15e76b9787..433e9f3ec94 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -207,12 +207,12 @@ dependencies { implementation project(':react-native-vector-icons') implementation fileTree(dir: "libs", include: ["*.jar"]) implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}" + implementation 'androidx.appcompat:appcompat:1.0.0' implementation "com.google.firebase:firebase-messaging:17.3.4" implementation "me.leolin:ShortcutBadger:1.1.16@aar" implementation "com.facebook.react:react-native:+" // From node_modules implementation 'com.facebook.fresco:animated-gif:1.10.0' // For animated GIF support - implementation "com.android.support:customtabs:${rootProject.ext.supportLibVersion}" + implementation 'androidx.browser:browser:1.0.0' addUnimodulesDependencies() testImplementation 'junit:junit:4.12' diff --git a/android/app/src/main/java/com/zulipmobile/CustomTabsAndroid.java b/android/app/src/main/java/com/zulipmobile/CustomTabsAndroid.java index dc6df3c98c7..d034613c0f6 100644 --- a/android/app/src/main/java/com/zulipmobile/CustomTabsAndroid.java +++ b/android/app/src/main/java/com/zulipmobile/CustomTabsAndroid.java @@ -3,7 +3,7 @@ import android.content.Intent; import android.content.pm.ResolveInfo; import android.net.Uri; -import android.support.customtabs.CustomTabsIntent; +import androidx.browser.customtabs.CustomTabsIntent; import android.widget.Toast; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReactContextBaseJavaModule; diff --git a/android/app/src/main/java/com/zulipmobile/CustomTabsHelper.java b/android/app/src/main/java/com/zulipmobile/CustomTabsHelper.java index 29b7161596b..c38f70c9bf1 100644 --- a/android/app/src/main/java/com/zulipmobile/CustomTabsHelper.java +++ b/android/app/src/main/java/com/zulipmobile/CustomTabsHelper.java @@ -3,7 +3,7 @@ import android.content.Context; import android.content.Intent; import android.content.pm.ResolveInfo; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import java.util.List; /** diff --git a/android/app/src/main/java/com/zulipmobile/notifications/NotificationsModule.java b/android/app/src/main/java/com/zulipmobile/notifications/NotificationsModule.java index 89c0fdf3120..2d4b1b6098c 100644 --- a/android/app/src/main/java/com/zulipmobile/notifications/NotificationsModule.java +++ b/android/app/src/main/java/com/zulipmobile/notifications/NotificationsModule.java @@ -1,7 +1,7 @@ package com.zulipmobile.notifications; import android.os.Bundle; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import android.util.Log; import com.facebook.react.bridge.*; import com.google.firebase.iid.FirebaseInstanceId; diff --git a/android/build.gradle b/android/build.gradle index ce37b70b41d..bb9da6f2e78 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -21,8 +21,6 @@ buildscript { // https://developer.android.com/studio/releases/platforms // Do edit .travis.yml when updating this. compileSdkVersion = 29 - - supportLibVersion = "28.0.0" } repositories { google() diff --git a/android/gradle.properties b/android/gradle.properties index 89e0d99e217..c2d20e32b34 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -16,3 +16,6 @@ # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true + +android.enableJetifier=true +android.useAndroidX=true diff --git a/package.json b/package.json index 4dc8ac05ef8..607a722a839 100644 --- a/package.json +++ b/package.json @@ -114,6 +114,7 @@ "jest-environment-jsdom": "^24.9.0", "jest-environment-jsdom-global": "^1.2.0", "jest-extended": "^0.11.2", + "jetifier": "^1.6.5", "lolex": "^5.1.1", "metro-react-native-babel-preset": "^0.54.1", "prettier": "^1.18.2", diff --git a/tools/postinstall b/tools/postinstall index 0e92cf16682..7dc0145cc59 100755 --- a/tools/postinstall +++ b/tools/postinstall @@ -21,6 +21,12 @@ EOF pod install --project-directory="$ROOT_DIR/ios" } +jetify() { + node_modules/.bin/jetify +} + pod_install +jetify + echo "tools/postinstall finished with no errors!" diff --git a/yarn.lock b/yarn.lock index dba02bcaa2d..9657e7150b0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5568,6 +5568,11 @@ jest@^24.9.0: import-local "^2.0.0" jest-cli "^24.9.0" +jetifier@^1.6.5: + version "1.6.5" + resolved "https://registry.yarnpkg.com/jetifier/-/jetifier-1.6.5.tgz#ea87324a4230bef20a9651178ecab978ee54a8cb" + integrity sha512-T7yzBSu9PR+DqjYt+I0KVO1XTb1QhAfHnXV5Nd3xpbXM6Xg4e3vP60Q4qkNU8Fh6PHC2PivPUNN3rY7G2MxcDQ== + js-levenshtein@^1.1.3: version "1.1.6" resolved "https://registry.yarnpkg.com/js-levenshtein/-/js-levenshtein-1.1.6.tgz#c6cee58eb3550372df8deb85fad5ce66ce01d59d"