Created
November 5, 2021 09:24
-
-
Save olshevski/4ca7be0a30be9d9b93fbd83381b52e0d to your computer and use it in GitHub Desktop.
Example of resolutionStrategy in pluginManagement block
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pluginManagement { | |
repositories { | |
gradlePluginPortal() | |
google() | |
mavenCentral() | |
} | |
resolutionStrategy { | |
eachPlugin { | |
when { | |
requested.id.namespace == "com.android" -> { | |
useModule("com.android.tools.build:gradle:7.0.3") | |
} | |
requested.id.namespace == "org.jetbrains.kotlin" || requested.id.id.startsWith("kotlin-") -> { | |
useModule("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31") | |
} | |
} | |
} | |
} | |
plugins { | |
id("com.github.ben-manes.versions") version "0.39.0" | |
} | |
} | |
@Suppress("UnstableApiUsage") | |
dependencyResolutionManagement { | |
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) | |
repositories { | |
google() | |
mavenCentral() | |
} | |
} | |
rootProject.name = "Compose Blueprint" | |
include(":app") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment