Skip to content

Commit 9c83d4c

Browse files
committed
Add OneSignal with api instead of implementation
* Using api allows the parent :app project can access any of the OneSignal Java if the app dev needs them. - Such as com.onesignal.NotificationExtenderService * Removed the omission of com.android.support, this is required by the OneSignal SDK. - React requires this library too but it's omission isn't necessary. - cardview-v7 entry was also removed as this will now be automatically added as the "com.android.support" group is no longer being excluded.
1 parent f881e8b commit 9c83d4c

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

android/build.gradle

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,9 @@ dependencies {
2222
implementation fileTree(include: ['*.jar'], dir: 'libs')
2323
implementation "com.facebook.react:react-native:${safeExtGet('reactNativeVersion', '+')}"
2424

25-
implementation('com.onesignal:OneSignal:3.11.1') {
26-
// Exclude com.android.support(Android Support library) as the version range starts at 26.0.0
27-
// This is due to compileSdkVersion defaulting to 23 which cant' be lower than the support library version
28-
// And the fact that the default root project is missing the Google Maven repo required to pull down 26.0.0+
29-
exclude group: 'com.android.support'
30-
// Keeping com.google.android.gms(Google Play services library) as this version range starts at 10.2.1
31-
}
32-
33-
implementation 'com.android.support:cardview-v7:27.1.1'
25+
// api is used instead of implementation so the parent :app project can access any of the OneSignal Java
26+
// classes if needed. Such as com.onesignal.NotificationExtenderService
27+
api 'com.onesignal:OneSignal:3.11.1'
3428

3529
testImplementation 'junit:junit:4.12'
3630
}

0 commit comments

Comments
 (0)