From 1d01ec0c99c188ec08513773d6cfb4ea51cdc555 Mon Sep 17 00:00:00 2001 From: MxKevinBeqo Date: Wed, 20 May 2026 15:28:26 +0200 Subject: [PATCH 1/3] chore: add native patched library --- package-lock.json | 24 ++++++++++++++++ package.json | 1 + patches/react-native-track-player+4.1.2.patch | 28 +++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 patches/react-native-track-player+4.1.2.patch diff --git a/package-lock.json b/package-lock.json index a9f2362c..11340409 100644 --- a/package-lock.json +++ b/package-lock.json @@ -41,6 +41,7 @@ "react-native-screens": "4.24.0", "react-native-svg": "15.15.4", "react-native-tab-view": "4.3.0", + "react-native-track-player": "4.1.2", "react-native-video": "6.19.2", "react-native-worklets": "0.8.3", "semver": "7.7.4" @@ -8250,6 +8251,29 @@ "react-native-pager-view": ">= 6.0.0" } }, + "node_modules/react-native-track-player": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/react-native-track-player/-/react-native-track-player-4.1.2.tgz", + "integrity": "sha512-cIgMlqVJx/95hirUWPRW8CHxiBFj9Rjl/voKHh2jF/2URYMTQyt76t/m2FKvjeYUW2doKv4QSCBIOUmtyDLtJw==", + "license": "Apache-2.0", + "funding": { + "url": "https://github.com/doublesymmetry/react-native-track-player?sponsor=1" + }, + "peerDependencies": { + "react": ">=16.8.6", + "react-native": ">=0.60.0-rc.2", + "react-native-windows": ">=0.63.0", + "shaka-player": "^4.7.9" + }, + "peerDependenciesMeta": { + "react-native-windows": { + "optional": true + }, + "shaka-player": { + "optional": true + } + } + }, "node_modules/react-native-video": { "version": "6.19.2", "resolved": "https://registry.npmjs.org/react-native-video/-/react-native-video-6.19.2.tgz", diff --git a/package.json b/package.json index da7d3856..6c8c6724 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "@react-native-vector-icons/get-image": "12.3.0", "@react-native-vector-icons/material-icons": "12.4.1", "react-native-video": "6.19.2", + "react-native-track-player": "4.1.2", "semver": "7.7.4" }, "devDependencies": { diff --git a/patches/react-native-track-player+4.1.2.patch b/patches/react-native-track-player+4.1.2.patch new file mode 100644 index 00000000..04e58aa5 --- /dev/null +++ b/patches/react-native-track-player+4.1.2.patch @@ -0,0 +1,28 @@ +diff --git a/node_modules/react-native-track-player/android/src/main/java/com/doublesymmetry/trackplayer/module/MusicModule.kt b/node_modules/react-native-track-player/android/src/main/java/com/doublesymmetry/trackplayer/module/MusicModule.kt +index b2409a09939164c49c0f7a16bb6d3284e8eab8fb..699a6e4f4e2652eca69cd1d3a522c21971fee1b4 100644 +--- a/node_modules/react-native-track-player/android/src/main/java/com/doublesymmetry/trackplayer/module/MusicModule.kt ++++ b/node_modules/react-native-track-player/android/src/main/java/com/doublesymmetry/trackplayer/module/MusicModule.kt +@@ -545,7 +545,7 @@ class MusicModule(reactContext: ReactApplicationContext) : ReactContextBaseJavaM + if (verifyServiceBoundOrReject(callback)) return@launch + + if (index >= 0 && index < musicService.tracks.size) { +- callback.resolve(Arguments.fromBundle(musicService.tracks[index].originalItem)) ++ callback.resolve(musicService.tracks[index].originalItem?.let { Arguments.fromBundle(it) }) + } else { + callback.resolve(null) + } +@@ -584,9 +584,11 @@ class MusicModule(reactContext: ReactApplicationContext) : ReactContextBaseJavaM + if (verifyServiceBoundOrReject(callback)) return@launch + callback.resolve( + if (musicService.tracks.isEmpty()) null +- else Arguments.fromBundle( +- musicService.tracks[musicService.getCurrentTrackIndex()].originalItem +- ) ++ else musicService.tracks[musicService.getCurrentTrackIndex()].originalItem?.let { ++ Arguments.fromBundle( ++ it ++ ) ++ } + ) + } + From a8e3418279b0f2c64a2ec1f7ed2772f8a7b209ef Mon Sep 17 00:00:00 2001 From: MxKevinBeqo Date: Wed, 20 May 2026 15:29:05 +0200 Subject: [PATCH 2/3] fix: refactor and fix build issues with repo order --- android/build.gradle | 63 +++++++++++++++++++++++++++++++++++--------- stale_files | 5 +--- 2 files changed, 52 insertions(+), 16 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index d528f750..70453704 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -58,24 +58,29 @@ project.ext { allprojects { repositories { - all { repo -> - println repo.url.toString() - if (repo.url.toString().contains("jcenter.bintray.com") || repo.url.toString().contains("jitpack.io")) { - project.logger.warn "Repository ${repo.url} removed." - remove repo - google() - mavenCentral() - } - } + google() + mavenCentral() + + // Notifee local libs - ONLY for app.notifee maven { url "$rootDir/../node_modules/@notifee/react-native/android/libs" + content { + includeGroup "app.notifee" + } } - google() + maven { url "https://maven.fabric.io/public" } - maven { url "https://www.jitpack.io" } - maven { url "https://packages.rnd.mendix.com/jcenter" } + + // Mendix ONLY for com.mendix artifacts + maven { + url "https://packages.rnd.mendix.com/jcenter" + content { + includeGroup "com.mendix" + includeGroupByRegex "com\\.mendix\\..*" + } + } // Build all modules with Android 16KB pages enabled plugins.withId('com.android.application') { @@ -104,4 +109,38 @@ allprojects { } } +// Clean up phase: remove auto-added repositories and re-add JitPack correctly +afterEvaluate { project -> + def jitpackRemoved = false + + project.repositories.removeAll { repo -> + def repoUrl = repo.url.toString() + + // Remove deprecated JCenter + if (repoUrl.contains("jcenter.bintray.com")) { + return true + } + + // Remove auto-added JitPack (re-added below) + if (repoUrl.contains("jitpack.io")) { + jitpackRemoved = true + return true + } + + return false + } + + if (jitpackRemoved) { + project.repositories { + maven { + url "https://www.jitpack.io" + content { + includeGroupByRegex "com\\.github\\..*" + } + } + } + } + +} + apply plugin: "com.facebook.react.rootproject" diff --git a/stale_files b/stale_files index 346dc342..782b7c31 100644 --- a/stale_files +++ b/stale_files @@ -1,8 +1,6 @@ patches/@op-engineering+op-sqlite+12.0.2.patch patches/react-native+0.77.3.patch patches/react-native-screens+4.6.0.patch -patches/react-native+0.83.4.patch -patches/react-native-gesture-handler+2.30.0.patch mendix-native-10.2.2.tgz ios/AppDelegate.h ios/AppDelegate.m @@ -15,5 +13,4 @@ ios/SplashScreenPresenter.m ios/StoryBoardSplash.m ios/SwiftInterop.swift ios/Dev/AppDelegate.h -ios/Dev/AppDelegate.m -ios/Dev/MendixApp/MendixReactWindowExtensions.swift \ No newline at end of file +ios/Dev/AppDelegate.m \ No newline at end of file From d720484d34aa639549e17acc1a7cbfc48b26a4be Mon Sep 17 00:00:00 2001 From: MxKevinBeqo Date: Thu, 21 May 2026 10:28:44 +0200 Subject: [PATCH 3/3] chore: remove filtered group from gradle repos --- android/build.gradle | 8 -------- 1 file changed, 8 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 70453704..fb373556 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -73,13 +73,8 @@ allprojects { url "https://maven.fabric.io/public" } - // Mendix ONLY for com.mendix artifacts maven { url "https://packages.rnd.mendix.com/jcenter" - content { - includeGroup "com.mendix" - includeGroupByRegex "com\\.mendix\\..*" - } } // Build all modules with Android 16KB pages enabled @@ -134,9 +129,6 @@ afterEvaluate { project -> project.repositories { maven { url "https://www.jitpack.io" - content { - includeGroupByRegex "com\\.github\\..*" - } } } }