Skip to content

Commit 44c3709

Browse files
authored
[maintenance] migrate deps to libs.versions.toml (#8923)
Fixes: #8921. --- Review the contribution guidelines below: <details> <summary>Contribution guidelines:</summary><br> - See our [contributor guide](../CONTRIBUTING.md) and the [Flutter organization contributor guide]([https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md) for general expectations for PRs. - Larger or significant changes should be discussed in an issue before creating a PR. - Dart contributions to our repos should follow the [Dart style guide](https://dart.dev/guides/language/effective-dart) and use `dart format`. - Java and Kotlin contributions should strive to follow Java and Kotlin best practices ([discussion](#8098)). </details>
1 parent 5ba28ee commit 44c3709

2 files changed

Lines changed: 50 additions & 15 deletions

File tree

build.gradle.kts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ plugins {
4040
// https://plugins.gradle.org/plugin/org.jetbrains.intellij.platform
4141
// https://plugins.gradle.org/plugin/org.jetbrains.kotlin.jvm
4242
id("java") // Java support
43-
id("org.jetbrains.intellij.platform") version "2.12.0" // IntelliJ Platform Gradle Plugin
44-
id("org.jetbrains.kotlin.jvm") version "2.2.0" // Kotlin support
45-
id("org.jetbrains.changelog") version "2.2.0" // Gradle Changelog Plugin
46-
id("org.jetbrains.kotlinx.kover") version "0.9.4"
43+
alias(libs.plugins.intellij.platform) // IntelliJ Platform Gradle Plugin
44+
alias(libs.plugins.kotlin.jvm) // Kotlin support
45+
alias(libs.plugins.changelog) // Gradle Changelog Plugin
46+
alias(libs.plugins.kover)
4747
idea // IntelliJ IDEA support
4848
}
4949

@@ -239,13 +239,13 @@ dependencies {
239239
pluginVerifier()
240240
}
241241

242-
compileOnly("org.jetbrains:annotations:24.0.0")
243-
testImplementation("org.jetbrains:annotations:24.0.0")
244-
compileOnly("com.google.guava:guava:32.0.1-android")
245-
compileOnly("com.google.code.gson:gson:2.10.1")
246-
testImplementation("com.google.guava:guava:32.0.1-jre")
247-
testImplementation("com.google.code.gson:gson:2.10.1")
248-
testImplementation("junit:junit:4.13.2")
242+
compileOnly(libs.jetbrains.annotations)
243+
testImplementation(libs.jetbrains.annotations)
244+
compileOnly(libs.guava.android)
245+
compileOnly(libs.gson)
246+
testImplementation(libs.guava.jre)
247+
testImplementation(libs.gson)
248+
testImplementation(libs.junit)
249249
implementation(
250250
fileTree(
251251
mapOf(
@@ -256,12 +256,12 @@ dependencies {
256256
)
257257

258258
// UI Test dependencies
259-
integrationImplementation("org.kodein.di:kodein-di-jvm:7.26.1")
260-
integrationImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0")
259+
integrationImplementation(libs.kodein.di)
260+
integrationImplementation(libs.kotlinx.coroutines)
261261

262262
// JUnit 5 is required for UI tests
263-
integrationImplementation("org.junit.jupiter:junit-jupiter:5.11.4")
264-
integrationRuntimeOnly("org.junit.platform:junit-platform-launcher")
263+
integrationImplementation(libs.junit.jupiter)
264+
integrationRuntimeOnly(libs.junit.platform.launcher)
265265
}
266266

267267
intellijPlatform {

gradle/libs.versions.toml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Copyright 2026 The Chromium Authors. All rights reserved.
2+
# Use of this source code is governed by a BSD-style license that can be
3+
# found in the LICENSE file.
4+
5+
[versions]
6+
jetbrains-annotations = "24.0.0"
7+
guava-android = "32.0.1-android"
8+
guava-jre = "32.0.1-jre"
9+
gson = "2.10.1"
10+
junit = "4.13.2"
11+
kodein-di = "7.26.1"
12+
kotlinx-coroutines = "1.9.0"
13+
junit-jupiter = "5.11.4"
14+
junit-platform = "1.11.4"
15+
intellij-platform-plugin = "2.12.0"
16+
kotlin = "2.2.0"
17+
changelog = "2.2.0"
18+
kover = "0.9.4"
19+
20+
[libraries]
21+
jetbrains-annotations = { group = "org.jetbrains", name = "annotations", version.ref = "jetbrains-annotations" }
22+
guava-android = { group = "com.google.guava", name = "guava", version.ref = "guava-android" }
23+
guava-jre = { group = "com.google.guava", name = "guava", version.ref = "guava-jre" }
24+
gson = { group = "com.google.code.gson", name = "gson", version.ref = "gson" }
25+
junit = { group = "junit", name = "junit", version.ref = "junit" }
26+
kodein-di = { group = "org.kodein.di", name = "kodein-di-jvm", version.ref = "kodein-di" }
27+
kotlinx-coroutines = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }
28+
junit-jupiter = { group = "org.junit.jupiter", name = "junit-jupiter", version.ref = "junit-jupiter" }
29+
junit-platform-launcher = { group = "org.junit.platform", name = "junit-platform-launcher", version.ref = "junit-platform" }
30+
31+
[plugins]
32+
intellij-platform = { id = "org.jetbrains.intellij.platform", version.ref = "intellij-platform-plugin" }
33+
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
34+
changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" }
35+
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }

0 commit comments

Comments
 (0)