Use Version Catalog & clean up Gradle files (#6728)

This commit is contained in:
Andreas
2022-03-04 15:58:31 +01:00
committed by GitHub
parent d53bb4c337
commit f312936629
8 changed files with 290 additions and 160 deletions

View File

@@ -1,10 +1,10 @@
enableFeaturePreview("VERSION_CATALOGS")
pluginManagement {
resolutionStrategy {
eachPlugin {
if (requested.id.id == "com.android.library") {
useModule("com.android.tools.build:gradle:${requested.version}")
}
if (requested.id.id == "com.android.application") {
val regex = "com.android.(library|application)".toRegex()
if (regex matches requested.id.id) {
useModule("com.android.tools.build:gradle:${requested.version}")
}
}
@@ -16,5 +16,22 @@ pluginManagement {
}
}
dependencyResolutionManagement {
versionCatalogs {
create("kotlinx") {
from(files("gradle/kotlinx.versions.toml"))
}
create("androidx") {
from(files("gradle/androidx.versions.toml"))
}
}
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
google()
maven(url = "https://www.jitpack.io")
}
}
rootProject.name = "Tachiyomi"
include(":app")