mirror of
https://github.com/corda/corda.git
synced 2024-12-18 20:47:57 +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,15 +94,16 @@ data class TestCordappImpl(val scanPackage: String, override val config: Map<Str
|
||||
}
|
||||
|
||||
val projectConnection = gradleConnector.connect()
|
||||
val build = projectConnection.newBuild().apply {
|
||||
forTasks("jar")
|
||||
addProgressListener { event: ProgressEvent ->
|
||||
log.info(event.description)
|
||||
projectConnection.use {
|
||||
val build = projectConnection.newBuild().apply {
|
||||
forTasks("jar")
|
||||
addProgressListener { event: ProgressEvent ->
|
||||
log.info(event.description)
|
||||
}
|
||||
}
|
||||
// Blocks until the build is complete
|
||||
build.run()
|
||||
}
|
||||
// Blocks until the build is complete
|
||||
build.run()
|
||||
projectConnection.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user