Skip to content

Commit be96965

Browse files
authored
Merge pull request #38 from garyschulte/test-support-artifact
add test-support artifact
2 parents c663084 + b023ba4 commit be96965

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

build.gradle

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,24 @@ tasks.withType(JavaCompile) {
185185
options.encoding = 'UTF-8'
186186
}
187187

188+
sourceSets {
189+
testSupport {
190+
java {
191+
srcDir 'src/testSupport/java'
192+
}
193+
compileClasspath += sourceSets.main.output
194+
runtimeClasspath += sourceSets.main.output
195+
}
196+
}
197+
198+
configurations {
199+
testSupportImplementation
200+
testSupportRuntimeOnly
201+
}
202+
188203
dependencies {
204+
testImplementation sourceSets.testSupport.output
205+
189206
// annotationProcessor generates the file META-INF/services/org.hyperledger.besu.plugin.BesuPlugin
190207
annotationProcessor 'com.google.auto.service:auto-service'
191208
compileOnly 'com.google.auto.service:auto-service-annotations'
@@ -204,10 +221,11 @@ dependencies {
204221
testImplementation 'org.hyperledger.besu.internal:core'
205222
testImplementation 'org.hyperledger.besu:evm'
206223
compileOnly 'org.hyperledger.besu.internal:core'
224+
compileOnly 'org.hyperledger.besu.internal:core'
207225
compileOnly 'org.hyperledger.besu:evm'
208226
testImplementation "org.hyperledger.besu.internal:testutil"
209227
testImplementation "org.hyperledger.besu.internal:algorithms"
210-
228+
211229
// pull in testSupport
212230
testImplementation "org.hyperledger.besu.internal:core:${besuVersion}:test-support@jar"
213231

@@ -254,6 +272,14 @@ test {
254272
useJUnitPlatform()
255273
}
256274

275+
task testSupportJar(type: Jar) {
276+
archiveClassifier.set("test-support")
277+
from sourceSets.testSupport.output
278+
description = "Packages the test implementation classes"
279+
group = "build"
280+
}
281+
build.dependsOn(testSupportJar)
282+
257283
task plugin(dependsOn: 'jar') {
258284
group 'build'
259285
description 'Alias for the jar task'

0 commit comments

Comments
 (0)