
com.stanfy.helium.gradle.SpecificationDslDelegate.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-plugin Show documentation
Show all versions of gradle-plugin Show documentation
DSL and Java API for REST API specification
The newest version!
package com.stanfy.helium.gradle
import com.stanfy.helium.utils.DslUtils
/**
* DSL for per-specification rules:
*
* specification(file) {
* ...
* }
*
*/
class SpecificationDslDelegate {
/** Specification. */
private final File specification
/** User config to edit. */
private final UserConfig config
SpecificationDslDelegate(final File spec, final UserConfig config) {
this.specification = spec
this.config = config
}
void sourceGen(Closure action) {
SourceGenDslDelegate delegate = new SourceGenDslDelegate(action.owner)
DslUtils.runWithProxy(delegate, action)
config.set specification, delegate
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy