React Native OneSignal: For version 4.5.0, do we still need OneSignal Gradle Plugin?

96 Views Asked by At

I'm using OneSignal in my React Native project. I'm upgrading the packages, and I found the following code in android/app/build.gradle:

buildscript {
    repositories {
        maven { url 'https://plugins.gradle.org/m2/' } // Gradle Plugin Portal 
    }
    dependencies {
        classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.1, 0.99.99]'
    }
}

apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'

I don't see any reference to the OneSignal Gradle Plugin in the React Native SDK setup docs. I'm using version 4.5.0. Are these lines of code still necessary, or can I remove them?

1

There are 1 best solutions below

0
Andras On

Yes it is necessary. Since auto linking with newer versions RN should work they didn't include this in the documentation, but still present in the troubleshooting docs.

https://documentation.onesignal.com/docs/troubleshooting-react-native