Skip to content

Commit a55ec43

Browse files
authored
Merge pull request #518 from OneSignal/update/android_gradle_entries
Remove dependency on jcenter
2 parents 34bc9b2 + 06f1088 commit a55ec43

File tree

2 files changed

+4
-42
lines changed

2 files changed

+4
-42
lines changed

android/build.gradle

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version '3.2.7'
44
buildscript {
55
repositories {
66
google()
7-
jcenter()
7+
mavenCentral()
88
}
99

1010
dependencies {
@@ -15,7 +15,7 @@ buildscript {
1515
rootProject.allprojects {
1616
repositories {
1717
google()
18-
jcenter()
18+
mavenCentral()
1919
}
2020
}
2121

@@ -36,41 +36,3 @@ android {
3636
dependencies {
3737
api 'com.onesignal:OneSignal:4.6.3'
3838
}
39-
40-
// Adds required manifestPlaceholders keys to allow mainifest merge gradle step to complete
41-
// The OneSignal app id should be set in your JS code.
42-
// Google project number / FCM Sender ID will be pulled in from the OneSignal dashbaord
43-
class DefaultManifestPlaceHolders {
44-
static final MANIFEST_PLACEHOLDERS_DEFAULTS = [
45-
onesignal_app_id: '${onesignal_app_id}',
46-
onesignal_google_project_number: '${onesignal_google_project_number}'
47-
]
48-
49-
static void addManifestToAppProject(Project proj) {
50-
def androidApp = proj.android
51-
MANIFEST_PLACEHOLDERS_DEFAULTS.each { defKey, defValue ->
52-
if (!androidApp.defaultConfig.manifestPlaceholders.containsKey(defKey)) {
53-
androidApp.defaultConfig.manifestPlaceholders[defKey] = defValue
54-
55-
androidApp.buildTypes.each { buildType ->
56-
if (!buildType.manifestPlaceholders.containsKey(defKey))
57-
buildType.manifestPlaceholders[defKey] = defValue
58-
}
59-
}
60-
}
61-
}
62-
}
63-
64-
rootProject.childProjects.each { projName, proj ->
65-
if (projName != 'app' && projName != 'onesignal_flutter')
66-
return
67-
68-
if (proj.hasProperty('android')) {
69-
DefaultManifestPlaceHolders.addManifestToAppProject(proj)
70-
return
71-
}
72-
73-
proj.afterEvaluate {
74-
DefaultManifestPlaceHolders.addManifestToAppProject(proj)
75-
}
76-
}

example/android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
buildscript {
22
repositories {
33
google()
4-
jcenter()
4+
mavenCentral()
55
}
66

77
dependencies {
@@ -12,7 +12,7 @@ buildscript {
1212
allprojects {
1313
repositories {
1414
google()
15-
jcenter()
15+
mavenCentral()
1616
}
1717
}
1818

0 commit comments

Comments
 (0)