1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-22 04:11:14 +00:00

Update dependency resolution management (#2000)

## Changes
* get rid of the JCenter repository
* centralize repository declaration for all projects in project settings
* refactor `build.gradle` and `settings.gradle` from Groovy syntax to
Kotlin DSL (thus replacing those files with `build.gradle.kts` and
`settings.gradle.kts` respectively)

The remaining `build.gradle` files are refactored in:
https://github.com/syncthing/syncthing-android/pull/2022
This commit is contained in:
Adam Szewera 2024-01-03 09:35:19 +01:00 committed by GitHub
parent 58e02308aa
commit 5c249ae6d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 16 deletions

View file

@ -1,32 +1,27 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules. // Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript { buildscript {
ext { extra.apply {
// Cannot be called "ndkVersion" as that leads to naming collision // Cannot be called "ndkVersion" as that leads to naming collision
// Changes to this value must be reflected in `./docker/Dockerfile` // Changes to this value must be reflected in `./docker/Dockerfile`
ndkVersionShared = '25.2.9519653' set("ndkVersionShared", "25.2.9519653")
} }
repositories { repositories {
gradlePluginPortal()
google() google()
jcenter() mavenCentral()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:7.3.1' classpath("com.android.tools.build:gradle:7.3.1")
classpath 'com.github.ben-manes:gradle-versions-plugin:0.36.0' classpath("com.github.ben-manes:gradle-versions-plugin:0.36.0")
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
} }
} }
allprojects { tasks.register<Delete>("clean") {
repositories { delete(rootProject.buildDir)
google()
jcenter()
maven { url = "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
} }

View file

@ -1 +0,0 @@
include ':app', ':syncthing'

21
settings.gradle.kts Normal file
View file

@ -0,0 +1,21 @@
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url = java.net.URI("https://jitpack.io") }
}
}
include(
":app",
":syncthing"
)