From 59378e19b4ed416cf72f5b50ce37041e6138a520 Mon Sep 17 00:00:00 2001 From: Chimaa123 Date: Mon, 16 Oct 2023 15:52:01 +0900 Subject: [PATCH 1/2] update: build gradle --- android/build.gradle | 8 ++++---- .../android/reactnative/customtabs/CustomTabsModule.java | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 53a1a73..b86ef55 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,12 +1,12 @@ apply plugin: "com.android.library" android { - compileSdkVersion 25 - buildToolsVersion "25.0.1" + compileSdkVersion rootProject.ext.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 33 + buildToolsVersion rootProject.ext.hasProperty('buildToolsVersion') ? rootProject.ext.buildToolsVersion : "33.0.0" defaultConfig { - minSdkVersion 16 - targetSdkVersion 23 + minSdkVersion rootProject.ext.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 23 + targetSdkVersion rootProject.ext.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 33 versionCode 1 versionName "1.0" } diff --git a/android/src/main/java/com/github/droibit/android/reactnative/customtabs/CustomTabsModule.java b/android/src/main/java/com/github/droibit/android/reactnative/customtabs/CustomTabsModule.java index 957c3ca..2739759 100644 --- a/android/src/main/java/com/github/droibit/android/reactnative/customtabs/CustomTabsModule.java +++ b/android/src/main/java/com/github/droibit/android/reactnative/customtabs/CustomTabsModule.java @@ -6,7 +6,7 @@ import android.content.Intent; import android.os.Bundle; import android.provider.Browser; -import android.support.customtabs.CustomTabsIntent; +import androidx.browser.customtabs.CustomTabsIntent; import android.text.TextUtils; import com.droibit.android.customtabs.launcher.CustomTabsLauncher; @@ -180,7 +180,7 @@ public void openURL(String url, ReadableMap option, Promise promise) { customTabsIntent.intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY); customTabsIntent.intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); } - + return customTabsIntent; } From 5709a41a896e04ccb2e5b472634e7e00d7e4f547 Mon Sep 17 00:00:00 2001 From: Chimaa123 Date: Mon, 16 Oct 2023 16:01:34 +0900 Subject: [PATCH 2/2] fix: android build --- android/build.gradle | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index b86ef55..41aa015 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -13,11 +13,7 @@ android { } dependencies { - compile "com.facebook.react:react-native:+" // From node_modules - compile 'com.android.support:customtabs:25.0.1' - compile ('com.github.droibit.customtabslauncher:launcher:1.0.8') { - exclude module: 'customtabs' - } - - testCompile 'junit:junit:4.12' -} \ No newline at end of file + implementation 'com.facebook.react:react-native:+' + implementation 'androidx.browser:browser:1.5.0' + implementation 'com.github.droibit.customtabslauncher:launcher:1.0.8' +}