Tweak and document gradle setup for adding transport modules to integ-test-zip
This commit is contained in:
parent
c463083537
commit
e7b3bea8d3
|
@ -51,10 +51,6 @@ task buildModules(type: Sync) {
|
|||
into 'build/modules'
|
||||
}
|
||||
|
||||
task buildTransport(type: Sync) {
|
||||
into 'build/modules'
|
||||
}
|
||||
|
||||
ext.restTestExpansions = [
|
||||
'expected.modules.count': 0,
|
||||
]
|
||||
|
@ -86,18 +82,20 @@ project.rootProject.subprojects.findAll { it.path.startsWith(':modules:') }.each
|
|||
restTestExpansions['expected.modules.count'] += 1
|
||||
}
|
||||
|
||||
project.rootProject.subprojects.findAll { it.path.startsWith(':modules:transport-') }.each { Project module ->
|
||||
buildTransport {
|
||||
dependsOn({ project(module.path).bundlePlugin })
|
||||
into(module.name) {
|
||||
from { zipTree(project(module.path).bundlePlugin.outputs.files.singleFile) }
|
||||
}
|
||||
}
|
||||
module.afterEvaluate({
|
||||
module.integTest.mustRunAfter(':distribution:integ-test-zip:integTest#stop')
|
||||
})
|
||||
// Integ tests work over the rest http layer, so we need a transport included with the integ test zip.
|
||||
// All transport modules are included so that they may be randomized for testing
|
||||
task buildTransportModules(type: Sync) {
|
||||
into 'build/transport-modules'
|
||||
}
|
||||
|
||||
project.rootProject.subprojects.findAll { it.path.startsWith(':modules:transport-') }.each { Project transport ->
|
||||
buildTransportModules {
|
||||
dependsOn({ project(transport.path).bundlePlugin })
|
||||
into(transport.name) {
|
||||
from { zipTree(project(transport.path).bundlePlugin.outputs.files.singleFile) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// make sure we have a clean task since we aren't a java project, but we have tasks that
|
||||
// put stuff in the build dir
|
||||
|
@ -162,10 +160,11 @@ subprojects {
|
|||
from project(':distribution').buildModules
|
||||
}
|
||||
|
||||
transportFiles = copySpec {
|
||||
into 'modules'
|
||||
from project(':distribution').buildTransport
|
||||
transportModulesFiles = copySpec {
|
||||
into "modules"
|
||||
from project(':distribution').buildTransportModules
|
||||
}
|
||||
|
||||
configFiles = copySpec {
|
||||
from '../src/main/resources/config'
|
||||
MavenFilteringHack.filter(it, expansions)
|
||||
|
@ -231,7 +230,7 @@ configure(subprojects.findAll { ['zip', 'tar', 'integ-test-zip'].contains(it.nam
|
|||
if (project.name != 'integ-test-zip') {
|
||||
with modulesFiles
|
||||
} else {
|
||||
with transportFiles
|
||||
with transportModulesFiles
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue