From b2b5cd7c2b1d8f4076aa3ded8ad7cd7a1e0fd9c4 Mon Sep 17 00:00:00 2001 From: Goooler Date: Thu, 19 Dec 2024 09:27:19 +0800 Subject: [PATCH] Extract build-logic dependencies into version catalog --- build-logic/build.gradle.kts | 15 +++++---------- build-logic/settings.gradle.kts | 12 ++++++++++++ gradle/libs.versions.toml | 6 ++++++ 3 files changed, 23 insertions(+), 10 deletions(-) create mode 100644 build-logic/settings.gradle.kts diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts index 2a9ce6c3f..c2c603c1e 100644 --- a/build-logic/build.gradle.kts +++ b/build-logic/build.gradle.kts @@ -2,15 +2,10 @@ plugins { `kotlin-dsl` } -repositories { - mavenCentral() - gradlePluginPortal() -} - dependencies { - implementation("com.gradle.publish:plugin-publish-plugin:1.3.0") - implementation("com.vanniktech:gradle-maven-publish-plugin:0.30.0") - implementation("org.jetbrains.dokka:dokka-gradle-plugin:2.0.0") - implementation("org.ajoberstar.git-publish:gradle-git-publish:5.1.0") - implementation("com.github.node-gradle:gradle-node-plugin:7.1.0") + implementation(libs.pluginPublish) + implementation(libs.mavenPublish) + implementation(libs.gitPublish) + implementation(libs.node) + implementation(libs.jetbrains.dokka) } diff --git a/build-logic/settings.gradle.kts b/build-logic/settings.gradle.kts new file mode 100644 index 000000000..8f0b5dc0b --- /dev/null +++ b/build-logic/settings.gradle.kts @@ -0,0 +1,12 @@ +dependencyResolutionManagement { + versionCatalogs { + create("libs") { + from(files("../gradle/libs.versions.toml")) + } + } + + repositories { + mavenCentral() + gradlePluginPortal() + } +} diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 9b0e5f650..a0cc316d5 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -10,6 +10,12 @@ plexus-utils = "org.codehaus.plexus:plexus-utils:4.0.2" plexus-xml = "org.codehaus.plexus:plexus-xml:4.0.4" xmlunit = "org.xmlunit:xmlunit-legacy:2.10.0" +pluginPublish = "com.gradle.publish:plugin-publish-plugin:1.3.0" +mavenPublish = "com.vanniktech:gradle-maven-publish-plugin:0.30.0" +gitPublish = "org.ajoberstar.git-publish:gradle-git-publish:5.1.0" +jetbrains-dokka = "org.jetbrains.dokka:dokka-gradle-plugin:2.0.0" +node = "com.github.node-gradle:gradle-node-plugin:7.1.0" + androidx-gradlePluginLints = "androidx.lint:lint-gradle:1.0.0-alpha03" assertk-lint = "com.jzbrooks:assertk-lint:1.3.0" # Dummy to get renovate updates, the version is used in rootProject build.gradle with spotless.