0
0
mirror of https://github.com/ankidroid/Anki-Android.git synced 2024-09-20 03:52:15 +02:00
Anki-Android/settings.gradle.kts
lukstbit 7003e0b4d1 Configure dependencies resolution in settings.gradle.kts
Ideally we  would use
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) to enforce
 the repositories declared in settings.gradle.kts but it currently
conflicts with a local maven repository declared in
robolectricDownloader.gradle.

The repositories lambda wasn't deleted from the AnkiDroid module as
the build failed in relation to "com.android.tools:desugar_jdk_libs"(
most likely and issue with the dependency itself) with the error:

Could not resolve all dependencies for configuration ':AnkiDroid:coreLibraryDesugaring'.
The project declares repositories, effectively ignoring the repositories you have declared in the settings.
You can figure out how project repositories are declared by configuring your build to fail on project repositories.
See https://docs.gradle.org/8.1.1/userguide/declaring_repositories.html#sub:fail_build_on_project_repositories for details.
Could not find com.android.tools:desugar_jdk_libs:2.0.3.
Searched in the following locations:
  - file:/home/*/.m2/repository/com/android/tools/desugar_jdk_libs/2.0.3/desugar_jdk_libs-2.0.3.pom
    If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
    project :AnkiDroid
2023-08-31 20:52:04 -05:00

30 lines
958 B
Plaintext

pluginManagement {
repositories {
google()
gradlePluginPortal()
mavenCentral()
maven(url = "https://jitpack.io") // only needed for the "amazonappstorepublisher" plugin
}
resolutionStrategy {
// TODO try to find another plugin for this functionality?
eachPlugin {
if (requested.id.id == "app.brant.amazonappstorepublisher") {
useModule("com.github.BrantApps.gradle-amazon-app-store-publisher:amazonappstorepublisher:master-SNAPSHOT")
}
}
}
}
dependencyResolutionManagement {
// TODO enforce repositories declared here, currently it clashes with robolectricDownloader.gradle
// which uses a local maven repository
// repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven(url = "https://jitpack.io")
}
}
include(":lint-rules", ":api", ":AnkiDroid")