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

org.dm.gradle.plugins.bundle.BundleExtension.groovy Maven / Gradle / Ivy

There is a newer version: 0.10.0
Show newest version
package org.dm.gradle.plugins.bundle

/**
 * A Bundle plugin extension.
 */
class BundleExtension {
    private final def instructions = [:]

    private final def excludeDependencies = []

    boolean trace = false

    boolean passProjectProperties = true

    boolean includeTransitiveDependencies = false

    org.gradle.internal.Factory jarBuilderFactory = DefaultJarBuilderFactory.INSTANCE

    def instruction(String name, String... values) {
        if (name == null || values == []) {
            return
        }
        String value = values.join(',')
        if (instructions.containsKey(name)) {
            instructions[name] += ",$value"
        } else {
            instructions[name] = value
        }
    }

    def exclude(Map excludeDeps) {
        excludeDependencies << excludeDeps
    }

    def getInstructions() {
        return instructions
    }

    def getExcludeDependencies() {
        return excludeDependencies
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy