Skip to content

Commit

Permalink
feat: support for android gradle plugin 8 (#258)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrehan27 committed Apr 18, 2024
1 parent 1d38f2e commit 3544e66
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 8 deletions.
3 changes: 2 additions & 1 deletion Apps/APN/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ buildscript {

allprojects {
repositories {
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
Expand All @@ -52,5 +51,7 @@ allprojects {
}
google()
maven { url 'https://www.jitpack.io' }
mavenLocal() // Only required for using locally deployed versions of the SDK
maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' } // Only required for using SNAPSHOT versions of the SDK
}
}
13 changes: 13 additions & 0 deletions Apps/FCM/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,19 @@
</intent-filter>
</activity>

<!-- Register Customer.io Firebase Messaging Service as we want our SDK to handle all push
notifications. This is not required. However, if you have multiple services added for
handling push notifications, you might need to add this service to ensure all
notifications are handled by Customer.io. Read more:
https://www.customer.io/docs/sdk/react-native/push-notifications/multiple-push-providers/ -->
<service
android:name="io.customer.messagingpush.CustomerIOFirebaseMessagingService"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>

<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_notification" />
Expand Down
2 changes: 2 additions & 0 deletions Apps/FCM/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@ buildscript {
allprojects {
repositories {
google() // Google's Maven repository
mavenLocal() // Only required for using locally deployed versions of the SDK
maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' } // Only required for using SNAPSHOT versions of the SDK
}
}
5 changes: 3 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def getExtOrIntegerDefault(name) {
}

android {
namespace 'io.customer.reactnative.sdk'
compileSdkVersion getExtOrIntegerDefault('compileSdkVersion')
defaultConfig {
minSdkVersion getExtOrIntegerDefault('minSdkVersion')
Expand All @@ -40,8 +41,8 @@ android {
disable 'GradleCompatible'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}

Expand Down
6 changes: 3 additions & 3 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
customerio.reactnative.kotlinVersion=1.7.21
customerio.reactnative.compileSdkVersion=30
customerio.reactnative.targetSdkVersion=30
customerio.reactnative.compileSdkVersion=33
customerio.reactnative.targetSdkVersion=33
customerio.reactnative.minSdkVersion=21
customerio.reactnative.cioSDKVersionAndroid=3.9.2
customerio.reactnative.cioSDKVersionAndroid=3.10.0
3 changes: 1 addition & 2 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.customer.reactnative.sdk">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />

Expand Down

0 comments on commit 3544e66

Please sign in to comment.