Skip to content

Commit a8e3418

Browse files
committed
fix: refactor and fix build issues with repo order
1 parent 1d01ec0 commit a8e3418

2 files changed

Lines changed: 52 additions & 16 deletions

File tree

android/build.gradle

Lines changed: 51 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,24 +58,29 @@ project.ext {
5858

5959
allprojects {
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+
107146
apply plugin: "com.facebook.react.rootproject"

stale_files

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
patches/@op-engineering+op-sqlite+12.0.2.patch
22
patches/react-native+0.77.3.patch
33
patches/react-native-screens+4.6.0.patch
4-
patches/react-native+0.83.4.patch
5-
patches/react-native-gesture-handler+2.30.0.patch
64
mendix-native-10.2.2.tgz
75
ios/AppDelegate.h
86
ios/AppDelegate.m
@@ -15,5 +13,4 @@ ios/SplashScreenPresenter.m
1513
ios/StoryBoardSplash.m
1614
ios/SwiftInterop.swift
1715
ios/Dev/AppDelegate.h
18-
ios/Dev/AppDelegate.m
19-
ios/Dev/MendixApp/MendixReactWindowExtensions.swift
16+
ios/Dev/AppDelegate.m

0 commit comments

Comments
 (0)