mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-27 22:10:40 +02:00
Gradle: Migrate top-level build files to Kotlin DSL
Migrate the top-level build files to the new Kotlin DSL and use the new pluginManagement block instead of the old buildscript.
This commit is contained in:
+4
-4
@@ -1,10 +1,10 @@
|
||||
import java.nio.file.Files
|
||||
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'com.google.protobuf'
|
||||
id 'kotlin-android'
|
||||
id 'kotlin-parcelize'
|
||||
alias(libs.plugins.android.application)
|
||||
alias(libs.plugins.kotlin.android)
|
||||
alias(libs.plugins.kotlin.parcelize)
|
||||
alias(libs.plugins.protobuf)
|
||||
}
|
||||
|
||||
tasks.withType(Test).configureEach {
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '2.3.20'
|
||||
repositories {
|
||||
mavenCentral()
|
||||
google()
|
||||
maven {
|
||||
url = 'https://plugins.gradle.org/m2/'
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath 'com.android.tools.build:gradle:8.13.2'
|
||||
|
||||
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.10.0'
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
url = 'https://jitpack.io'
|
||||
content {
|
||||
includeGroupByRegex "com\\.github\\..*"
|
||||
}
|
||||
}
|
||||
google()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.android.application) apply false
|
||||
alias(libs.plugins.kotlin.android) apply false
|
||||
alias(libs.plugins.kotlin.parcelize) apply false
|
||||
alias(libs.plugins.protobuf) apply false
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
include ':app', ':GBDaoGenerator'
|
||||
@@ -0,0 +1,36 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
google {
|
||||
content {
|
||||
includeGroupByRegex("com\\.android.*")
|
||||
includeGroupByRegex("com\\.google.*")
|
||||
includeGroupByRegex("androidx\\..*")
|
||||
}
|
||||
}
|
||||
gradlePluginPortal()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
dependencyResolutionManagement {
|
||||
repositoriesMode = RepositoriesMode.FAIL_ON_PROJECT_REPOS
|
||||
repositories {
|
||||
google {
|
||||
content {
|
||||
includeGroupByRegex("com\\.android.*")
|
||||
includeGroupByRegex("com\\.google.*")
|
||||
includeGroupByRegex("androidx\\..*")
|
||||
}
|
||||
}
|
||||
mavenCentral()
|
||||
maven("https://jitpack.io") {
|
||||
content {
|
||||
includeGroupByRegex("com\\.github\\..*")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "Gadgetbridge"
|
||||
|
||||
include(":app")
|
||||
include(":GBDaoGenerator")
|
||||
Reference in New Issue
Block a user