
com.darylteo.vertx.gradle.deployments.DeploymentItem.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vertx-gradle-plugin Show documentation
Show all versions of vertx-gradle-plugin Show documentation
A Gradle Plugin for building, assembling and running Vert.x projects.
The newest version!
package com.darylteo.vertx.gradle.deployments
import groovy.json.JsonBuilder
class DeploymentItem {
final Deployment deployment
final Map config
final def module
DeploymentItem(Deployment deployment, def module, Closure closure = null) {
this.deployment = deployment
this.module = module
this.config = [:] as Map
this.config << closureToMap(closure)
}
def config(Map data) {
this.config << (data as Map)
}
def getEffectiveConfig() {
def map = [:]
map << this.deployment.config
map << this.config
}
private Map closureToMap(Closure closure) {
if (!closure) {
return [:]
}
JsonBuilder builder = new JsonBuilder()
return builder.call(closure)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy