Skip to content

Commit

Permalink
WIP Move test libraries for CLI to libs
Browse files Browse the repository at this point in the history
  • Loading branch information
ascheman committed Jan 15, 2024
1 parent 234b94e commit d5969f6
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
7 changes: 6 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[versions]
groovy-version = "3.0.20"
picocli-version = "4.7.5"
jupiter-version = "5.10.1"

[libraries]
# Use Groovy which corresponds to Gradle version (of hsc build)
Expand All @@ -9,11 +10,15 @@ groovy-all = { module = "org.codehaus.groovy:groovy-all", version.ref = "groovy-
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"
jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "jupiter-version" }
jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "jupiter-version" }
mockito = "org.mockito:mockito-junit-jupiter:5.9.0"
picocli-impl = { module = 'info.picocli:picocli', version.ref = "picocli-version" }
picocli-annotationprocessor = { module = 'info.picocli:picocli-codegen', version.ref = "picocli-version" }
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"
spock-core = "org.spockframework:spock-core:2.3-groovy-3.0"
spock-reports = "com.athaydes:spock-reports:2.5.0-groovy-3.0"

[plugins]
gradle-versions = { id= "com.github.ben-manes.versions", version = "0.50.0" }
Expand Down
10 changes: 5 additions & 5 deletions htmlSanityCheck-cli/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ dependencies {

implementation project(":htmlSanityCheck-core")

testImplementation 'org.spockframework:spock-core:2.3-groovy-3.0'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.1'
testImplementation 'org.mockito:mockito-junit-jupiter:3.11.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.1'
testImplementation( "com.athaydes:spock-reports:2.5.0-groovy-3.0" )
testImplementation libs.spock.core
testImplementation libs.jupiter.api
testImplementation libs.mockito
testRuntimeOnly libs.jupiter.engine
testImplementation libs.spock.reports
}

compileGroovy {
Expand Down
6 changes: 4 additions & 2 deletions htmlSanityCheck-core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import org.apache.tools.ant.filters.ReplaceTokens

dependencies {
testImplementation(
libs.junit,
libs.spock,
libs.spock.core,
libs.slf4j.simple
)

Expand All @@ -27,7 +29,7 @@ processResources {

exclude '**/*.png'
inputs.property "version", project.version
filter(org.apache.tools.ant.filters.ReplaceTokens, tokens: [version: project.version])
filter(ReplaceTokens, tokens: [version: project.version])
println "after processResources config, version= ${project.version}"
}

Expand Down
2 changes: 1 addition & 1 deletion htmlSanityCheck-gradle-plugin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dependencies {
testImplementation(
libs.junit,
libs.spock,
libs.spock.core,

gradleTestKit()
)
Expand Down

0 comments on commit d5969f6

Please sign in to comment.