diff --git a/build.gradle b/build.gradle index 5f20639e..5ccdee8b 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ buildscript { repositories { - jcenter() + mavenCentral() maven { url "https://plugins.gradle.org/m2/" } @@ -14,6 +14,8 @@ plugins { id 'java' id 'groovy' id 'maven-publish' + + alias(libs.plugins.gradle.versions) } ext { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 00000000..a6e08583 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,42 @@ +[versions] +groovy-version = "3.0.20" + +[libraries] +# Use Groovy which corresponds to Gradle version (of hsc build) +groovy-all = { module = "org.codehaus.groovy:groovy-all", version.ref = "groovy-version" } +# Since Groovy 2.5 it is necessary to import dateutil separately +groovy-dateutil = { module = "org.codehaus.groovy:groovy-dateutil", version.ref = "groovy-version" } +jsoup = "org.jsoup:jsoup:1.17.2" +junit = "junit:junit:4.13.2" +slf4j-api = "org.slf4j:slf4j-simple:2.0.7" +slf4j-simple = "org.slf4j:slf4j-simple:2.0.7" +spock = "org.spockframework:spock-core:2.3-groovy-3.0" + +[plugins] +gradle-versions = { id= "com.github.ben-manes.versions", version = "0.50.0" } + +# Copyright Gerd Aschemann and aim42 contributors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. diff --git a/htmlSanityCheck-core/build.gradle b/htmlSanityCheck-core/build.gradle index 3462ec86..82e1a27d 100644 --- a/htmlSanityCheck-core/build.gradle +++ b/htmlSanityCheck-core/build.gradle @@ -1,20 +1,16 @@ dependencies { - testImplementation( - 'junit:junit:4.13.1', - 'org.spockframework:spock-core:2.3-groovy-3.0', - 'org.slf4j:slf4j-simple:2.0.7' + libs.junit, + libs.spock, + libs.slf4j.simple ) -// implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.17.1' - implementation "org.slf4j:slf4j-api:2.0.7" + implementation libs.slf4j.api // jsoup is our awesome html parser, see jsoup.org - implementation group: 'org.jsoup', name: 'jsoup', version: '1.16.1' - // Use Groovy which corresponds to Gradle version (of hsc build) - implementation 'org.codehaus.groovy:groovy-all:3.0.17' - // Since Groovy 2.5 it is necessary to import dateutil separately - implementation 'org.codehaus.groovy:groovy-dateutil:3.0.17' + implementation libs.jsoup + implementation libs.groovy.all + implementation libs.groovy.dateutil } apply plugin: 'groovy' diff --git a/htmlSanityCheck-gradle-plugin/build.gradle b/htmlSanityCheck-gradle-plugin/build.gradle index 1f713a62..ac05b353 100755 --- a/htmlSanityCheck-gradle-plugin/build.gradle +++ b/htmlSanityCheck-gradle-plugin/build.gradle @@ -1,11 +1,12 @@ dependencies { testImplementation( - 'junit:junit:4.13.1', - 'org.spockframework:spock-core:2.3-groovy-3.0', + libs.junit, + libs.spock, + gradleTestKit() ) - implementation group: 'org.jsoup', name: 'jsoup', version: '1.16.1' + implementation libs.jsoup implementation gradleApi() implementation project(":htmlSanityCheck-core") }