From 532112a7829c911a3c0d81cf69379227c2c91dd2 Mon Sep 17 00:00:00 2001 From: Erik Ghonyan Date: Fri, 12 May 2023 23:42:48 +0200 Subject: [PATCH] Declare dependency repositories in dependencyResolutionManagement block More details https://docs.gradle.org/current/userguide/dependency_management.html#sub:centralized-repository-declaration --- build.gradle.kts | 16 ---------------- settings.gradle.kts | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 599eb6ed63..5f4146c300 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -33,22 +33,6 @@ plugins { } allprojects { - repositories { - google() - mavenCentral() - mavenLocal() - - // Needed when using the 'dev' Compose Compiler - // maven("https://androidx.dev/storage/compose-compiler/repository/") - - // Jetpack Compose SNAPSHOTs if needed - // maven("https://androidx.dev/snapshots/builds/$composeSnapshot/artifacts/repository/") - - // Used for snapshots if needed - // maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") - // maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") - } - apply(plugin = rootProject.libs.plugins.spotless.get().pluginId) configure { kotlin { diff --git a/settings.gradle.kts b/settings.gradle.kts index 8ca37d9ae1..8124592581 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -23,6 +23,26 @@ pluginManagement { } } +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + + repositories { + google() + mavenCentral() + mavenLocal() + + // Needed when using the 'dev' Compose Compiler + // maven("https://androidx.dev/storage/compose-compiler/repository/") + + // Jetpack Compose SNAPSHOTs if needed + // maven("https://androidx.dev/snapshots/builds/$composeSnapshot/artifacts/repository/") + + // Used for snapshots if needed + // maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") + // maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") + } +} + plugins { id("com.gradle.enterprise") version "3.13.2" }