Skip to content

Commit 4be31d0

Browse files
committed
Correctly omit Huawei from example when not used
Since Gradle / AGP 8 upgrade the example doesn't work for Huawei builds, however this uncovered we were not correctly omitting it for all tasks. We will fix Huawei in the example project not building in follow up commit.
1 parent 007b9b3 commit 4be31d0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Examples/OneSignalDemo/app/build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,11 @@ android {
6262
}
6363

6464
task flavorSelection() {
65-
if (getGradle().getStartParameter().getTaskRequests().toString().contains("Gms")) {
65+
def tasksList = gradle.startParameter.taskRequests.toString()
66+
if (tasksList.contains('Gms')) {
6667
apply plugin: 'com.google.gms.google-services'
6768
googleServices { disableVersionCheck = true }
68-
} else {
69+
} else if (tasksList.contains('Huawei')) {
6970
apply plugin: 'com.huawei.agconnect'
7071
}
7172
}

0 commit comments

Comments
 (0)