Skip to content

Commit 7972e7b

Browse files
authored
Merge pull request #1500 from OneSignal/dev-env/use_local_sdk
SDK Development Environment - Automatically use local SDK source for example project
2 parents 1953260 + 821bbfe commit 7972e7b

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

Examples/OneSignalDemo/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
21
apply plugin: 'com.android.application'
32

43
android {
@@ -46,6 +45,7 @@ android {
4645
task flavorSelection() {
4746
if (getGradle().getStartParameter().getTaskRequests().toString().contains("Gms")) {
4847
apply plugin: 'com.google.gms.google-services'
48+
googleServices { disableVersionCheck = true }
4949
} else {
5050
apply plugin: 'com.huawei.agconnect'
5151
}

OneSignalSDK/settings.gradle

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,14 @@
11
include ':app', ':onesignal', ':unittest'
2-
project(':app').projectDir = new File(settingsDir, '../examples/OneSignalDemo/app')
2+
project(':app').projectDir = new File(settingsDir, '../examples/OneSignalDemo/app')
3+
4+
// Allows running the :app project above with the local source for development of the SDK.
5+
// This means we can keep the example app as-is so it stays as a real world example.
6+
gradle.rootProject {
7+
allprojects {
8+
configurations.all {
9+
resolutionStrategy.dependencySubstitution {
10+
substitute(module('com.onesignal:OneSignal')).using(project(':onesignal'))
11+
}
12+
}
13+
}
14+
}

0 commit comments

Comments
 (0)