@@ -58,24 +58,29 @@ project.ext {
5858
5959allprojects {
6060 repositories {
61- all { repo ->
62- println repo. url. toString()
63- if (repo. url. toString(). contains(" jcenter.bintray.com" ) || repo. url. toString(). contains(" jitpack.io" )) {
64- project. logger. warn " Repository ${ repo.url} removed."
65- remove repo
66- google()
67- mavenCentral()
68- }
69- }
61+ google()
62+ mavenCentral()
63+
64+ // Notifee local libs - ONLY for app.notifee
7065 maven {
7166 url " $rootDir /../node_modules/@notifee/react-native/android/libs"
67+ content {
68+ includeGroup " app.notifee"
69+ }
7270 }
73- google()
71+
7472 maven {
7573 url " https://maven.fabric.io/public"
7674 }
77- maven { url " https://www.jitpack.io" }
78- maven { url " https://packages.rnd.mendix.com/jcenter" }
75+
76+ // Mendix ONLY for com.mendix artifacts
77+ maven {
78+ url " https://packages.rnd.mendix.com/jcenter"
79+ content {
80+ includeGroup " com.mendix"
81+ includeGroupByRegex " com\\ .mendix\\ ..*"
82+ }
83+ }
7984
8085 // Build all modules with Android 16KB pages enabled
8186 plugins. withId(' com.android.application' ) {
@@ -104,4 +109,38 @@ allprojects {
104109 }
105110}
106111
112+ // Clean up phase: remove auto-added repositories and re-add JitPack correctly
113+ afterEvaluate { project ->
114+ def jitpackRemoved = false
115+
116+ project. repositories. removeAll { repo ->
117+ def repoUrl = repo. url. toString()
118+
119+ // Remove deprecated JCenter
120+ if (repoUrl. contains(" jcenter.bintray.com" )) {
121+ return true
122+ }
123+
124+ // Remove auto-added JitPack (re-added below)
125+ if (repoUrl. contains(" jitpack.io" )) {
126+ jitpackRemoved = true
127+ return true
128+ }
129+
130+ return false
131+ }
132+
133+ if (jitpackRemoved) {
134+ project. repositories {
135+ maven {
136+ url " https://www.jitpack.io"
137+ content {
138+ includeGroupByRegex " com\\ .github\\ ..*"
139+ }
140+ }
141+ }
142+ }
143+
144+ }
145+
107146apply plugin : " com.facebook.react.rootproject"
0 commit comments