All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.stanfy.helium.gradle.SpecificationDslDelegate.groovy Maven / Gradle / Ivy

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