mirror of
https://github.com/AsamK/signal-cli.git
synced 2026-07-29 00:59:26 +00:00
Fix use of deprecated API in plugin
This commit is contained in:
parent
dee557a9ad
commit
e8ab01f665
@ -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<Project> {
|
||||
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<Project> {
|
||||
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\"}")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user