Skip to content

Commit 1f72997

Browse files
feat(android): 🌟 add support for React Native 0.73 (#446)
* feat(android): 🌟 add support for React Native 0.73 * Update Android settings to support backwards compatibility * Update AndroidManifest.xml * Update AndroidManifest.xml * code review --------- Co-authored-by: Peter Lazar <peter.lazar@limehome.de>
1 parent 624bfa7 commit 1f72997

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

‎android/build.gradle

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ def DEFAULT_MIN_SDK_VERSION = 16
2727
def DEFAULT_TARGET_SDK_VERSION = 31
2828

2929
android {
30+
def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
31+
if (agpVersion >= 7) {
32+
namespace 'com.proyecto26.inappbrowser'
33+
}
3034
compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION)
3135
buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION)
3236
defaultConfig {
@@ -51,7 +55,8 @@ repositories {
5155
dependencies {
5256
implementation fileTree(dir: 'libs', include: ['*.jar'])
5357
implementation 'com.facebook.react:react-native:+'
54-
implementation 'org.greenrobot:eventbus:3.3.1'
58+
def eventbusVersion = safeExtGet('eventbus', safeExtGet('eventbus', '3.3.1'))
59+
implementation "org.greenrobot:eventbus:$eventbusVersion"
5560
def supportLibVersion = safeExtGet('supportLibVersion', safeExtGet('supportVersion', null))
5661
def androidXAnnotationVersion = safeExtGet('androidXAnnotationVersion', null)
5762
def androidXBrowserVersion = safeExtGet('androidXBrowserVersion', null)

‎android/src/main/AndroidManifest.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="com.proyecto26.inappbrowser">
3+
package="com.proyecto26.inappbrowser">
44

55
<uses-permission android:name="android.permission.INTERNET" />
66

77
<application>
8-
<activity
9-
android:name=".ChromeTabsManagerActivity"
10-
android:exported="false">
8+
<activity android:name=".ChromeTabsManagerActivity"
9+
android:exported="false">
1110
</activity>
1211
</application>
1312
<queries>

0 commit comments

Comments
 (0)