From e8ab01f6650f4fe33a6759c002f88fba325339dd Mon Sep 17 00:00:00 2001 From: AsamK Date: Sat, 24 Jan 2026 15:20:55 +0100 Subject: [PATCH] Fix use of deprecated API in plugin --- buildSrc/src/main/kotlin/CheckLibVersionsPlugin.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/buildSrc/src/main/kotlin/CheckLibVersionsPlugin.kt b/buildSrc/src/main/kotlin/CheckLibVersionsPlugin.kt index ae8ae4de..1dc96678 100644 --- a/buildSrc/src/main/kotlin/CheckLibVersionsPlugin.kt +++ b/buildSrc/src/main/kotlin/CheckLibVersionsPlugin.kt @@ -1,5 +1,3 @@ -@file:Suppress("DEPRECATION") - import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.api.Task @@ -8,7 +6,7 @@ import javax.xml.parsers.DocumentBuilderFactory class CheckLibVersionsPlugin : Plugin { override fun apply(project: Project) { - project.task("checkLibVersions") { + project.tasks.register("checkLibVersions") { description = "Find any 3rd party libraries which have released new versions to the central Maven repo since we last upgraded." doLast { @@ -28,7 +26,7 @@ class CheckLibVersionsPlugin : Plugin { try { val dbf = DocumentBuilderFactory.newInstance() val db = dbf.newDocumentBuilder() - val doc = db.parse(metaDataUrl); + val doc = db.parse(metaDataUrl) val newest = doc.getElementsByTagName("latest").item(0).textContent if (version != newest.toString()) { println("UPGRADE {\"group\": \"$group\", \"name\": \"$name\", \"current\": \"$version\", \"latest\": \"$newest\"}")