mirror of
https://github.com/corda/corda.git
synced 2024-12-20 21:43:14 +00:00
CORDA-2668 - TestCordapp – minor refactoring in jar building (#4805)
This commit is contained in:
parent
b52c7a09a3
commit
9d04eccc8a
@ -37,7 +37,7 @@ dependencies {
|
||||
compile "org.eclipse.jetty:jetty-webapp:${jetty_version}"
|
||||
compile "javax.servlet:javax.servlet-api:3.1.0"
|
||||
|
||||
compile "org.gradle:gradle-tooling-api:4.10.1"
|
||||
compile "org.gradle:gradle-tooling-api:${gradle.gradleVersion}"
|
||||
|
||||
// Jersey for JAX-RS implementation for use in Jetty
|
||||
compile "org.glassfish.jersey.core:jersey-server:${jersey_version}"
|
||||
|
@ -94,6 +94,7 @@ data class TestCordappImpl(val scanPackage: String, override val config: Map<Str
|
||||
}
|
||||
|
||||
val projectConnection = gradleConnector.connect()
|
||||
projectConnection.use {
|
||||
val build = projectConnection.newBuild().apply {
|
||||
forTasks("jar")
|
||||
addProgressListener { event: ProgressEvent ->
|
||||
@ -102,7 +103,7 @@ data class TestCordappImpl(val scanPackage: String, override val config: Map<Str
|
||||
}
|
||||
// Blocks until the build is complete
|
||||
build.run()
|
||||
projectConnection.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user