gradle: Create bisq.java-integration-tests plugin

The bisq.java-integration-tests plugin creates an integrationTest source
set that depends on JUnit. The source set inherits the main source set's
compile classpath, runtime classpath, and the implementation's source
set configuration and runtimeOnly configuration.
This commit is contained in:
Alva Swanson 2024-11-10 22:12:31 +00:00
parent 0f4836e30b
commit ba28806d74
No known key found for this signature in database
GPG Key ID: 004760E77F753090
3 changed files with 41 additions and 8 deletions

View File

@ -0,0 +1,26 @@
sourceSets {
integrationTest {
compileClasspath += sourceSets.main.output
runtimeClasspath += sourceSets.main.output
}
}
configurations {
integrationTestImplementation.extendsFrom implementation
integrationTestRuntimeOnly.extendsFrom runtimeOnly
}
dependencies {
integrationTestImplementation libs.junit.jupiter
}
tasks.register('integrationTest', Test) {
description = 'Runs integration tests.'
group = 'verification'
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
shouldRunAfter test
useJUnitPlatform()
}

View File

@ -99,6 +99,7 @@ jfoenix = { module = "com.jfoenix:jfoenix", version.ref = "jfoenix" }
jopt = { module = "net.sf.jopt-simple:jopt-simple", version.ref = "jopt" }
jsonrpc4j = { module = "com.github.bisq-network:jsonrpc4j", version.ref = "jsonrpc4j" }
junit-jupiter = { module = 'org.junit.jupiter:junit-jupiter', version.ref = 'junit-jupiter' }
junit-jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit-jupiter" }
junit-jupiter-params = { module = "org.junit.jupiter:junit-jupiter-params", version.ref = "junit-jupiter" }
junit-jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junit-jupiter" }

View File

@ -3247,14 +3247,20 @@
<sha256 value="836069ca9e8ee3c56e48376222da291263f137bd3fd16d84fdd47efcc3f286e2" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.junit.jupiter" name="junit-jupiter-api" version="5.10.2">
<artifact name="junit-jupiter-api-5.10.2.jar">
<sha256 value="afff77c186cd317275803872fa5133aa801fd6ac40bd91c78a6cf8009b4b17cc"
origin="Generated by Gradle"/>
</artifact>
<artifact name="junit-jupiter-api-5.10.2.module">
<sha256 value="411b4a96c2a6db0998d6e58e899367f0d1254163f3041c9d98e7aedfca374419"
origin="Generated by Gradle"/>
<component group="org.junit.jupiter" name="junit-jupiter" version="5.7.0">
<artifact name="junit-jupiter-5.7.0.jar">
<sha256 value="f15ebc08c85be1f46cd2aff06d6125e5083da0f527cd434f8b5431b5b0a1abd0" origin="Generated by Gradle"/>
</artifact>
<artifact name="junit-jupiter-5.7.0.module">
<sha256 value="1c8af49c570d53f6c8297591a18f1afb90fae1dcc1c786cd36eac475e070b9e4" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.junit.jupiter" name="junit-jupiter-api" version="5.10.2">
<artifact name="junit-jupiter-api-5.10.2.jar">
<sha256 value="afff77c186cd317275803872fa5133aa801fd6ac40bd91c78a6cf8009b4b17cc" origin="Generated by Gradle"/>
</artifact>
<artifact name="junit-jupiter-api-5.10.2.module">
<sha256 value="411b4a96c2a6db0998d6e58e899367f0d1254163f3041c9d98e7aedfca374419" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.junit.jupiter" name="junit-jupiter-api" version="5.7.0">