From 930dee09e5b3f23d02d0dc5aae3eeea61974bada Mon Sep 17 00:00:00 2001 From: James Rich <2199651+jamesarich@users.noreply.github.com> Date: Tue, 19 May 2026 13:43:00 -0700 Subject: [PATCH] build: reorder Maven repos to reduce flatpak generator 404s (#5509) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .gitignore | 3 +++ build-logic/settings.gradle.kts | 12 +++++++++--- settings.gradle.kts | 10 ++++++++-- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index faa540dfa..3ec08e5a0 100644 --- a/.gitignore +++ b/.gitignore @@ -79,3 +79,6 @@ feature/docs/src/commonMain/composeResources/files/*/docs/ /.specify/extensions/.cache/ # Jekyll local config (comments out remote_theme for local builds) docs/_config_local.yml + +# Flatpak source manifests (generated by flatpakGradleGenerator) +flatpak-sources-*.json diff --git a/build-logic/settings.gradle.kts b/build-logic/settings.gradle.kts index 32a044ced..65ba80c0b 100644 --- a/build-logic/settings.gradle.kts +++ b/build-logic/settings.gradle.kts @@ -17,9 +17,15 @@ pluginManagement { repositories { - google() mavenCentral() gradlePluginPortal() + google { + content { + includeGroupByRegex("com\\.android.*") + includeGroupByRegex("com\\.google.*") + includeGroupByRegex("androidx.*") + } + } maven { url = uri("../offline-repository") } } } @@ -31,6 +37,8 @@ plugins { dependencyResolutionManagement { repositories { + mavenCentral() + gradlePluginPortal() google { content { includeGroupByRegex("com\\.android.*") @@ -38,8 +46,6 @@ dependencyResolutionManagement { includeGroupByRegex("androidx.*") } } - mavenCentral() - gradlePluginPortal() maven { url = uri("../offline-repository") } } versionCatalogs { diff --git a/settings.gradle.kts b/settings.gradle.kts index da7e1295a..b3aeb19e6 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -18,9 +18,15 @@ pluginManagement { includeBuild("build-logic") repositories { - google() mavenCentral() gradlePluginPortal() + google { + content { + includeGroupByRegex("com\\.android.*") + includeGroupByRegex("com\\.google.*") + includeGroupByRegex("androidx.*") + } + } maven { url = uri("./offline-repository") } } } @@ -37,6 +43,7 @@ dependencyResolutionManagement { repositories { // Only enable mavenLocal for local JitPack testing; never in CI. if (providers.gradleProperty("useMavenLocal").isPresent) mavenLocal() + mavenCentral() google { content { includeGroupByRegex("com\\.android.*") @@ -44,7 +51,6 @@ dependencyResolutionManagement { includeGroupByRegex("androidx.*") } } - mavenCentral() maven { url = uri("https://central.sonatype.com/repository/maven-snapshots/") mavenContent { snapshotsOnly() }