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

ai.digital.integration.server.util.PropertyUtil.groovy Maven / Gradle / Ivy

The newest version!
package ai.digital.integration.server.util

import org.gradle.api.Project

class PropertyUtil {

    static def resolveValue(Project project, String propertyName, def defaultValue) {
        if (project.hasProperty(propertyName)) {
            project.property(propertyName)
        } else {
            defaultValue
        }
    }

    static def resolveIntValue(Project project, String propertyName, def defaultValue) {
        def value = resolveValue(project, propertyName, defaultValue)
        if (value == null) {
            null as Integer
        } else Integer.parseInt(value as String)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy