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

com.admc.gradle..JavaPropFile.groovy.swp Maven / Gradle / Ivy

There is a newer version: 0.6.0
Show newest version
b0VIM 7.3?I?Np??blainebeyla~blaine/gradle-javaPropFile-plugin/src/main/groovy/com/admc/gradle/JavaPropFile.groovyutf-8
3210#"! UtpQad?Q??????uS! ?????FB?
?
}
g
L
'


???v/??`'?
?
m
=

?	?	?	?	V		?~G??~YG9??m??ZC5???p1????=}    }        strict = originalStrictness        if (localPropertiesFile.exists()) load(localPropertiesFile)        strict = false;        if (appPropertiesFile.exists()) load(appPropertiesFile)        strict = true;        // Unlike Ant, the LAST loaded properties will override.        File localPropertiesFile = gp.file('local.properties')        File appPropertiesFile = gp.file('app.properties')        boolean originalStrictness = strict;    void traditionalPropertiesInit() {    }        }            prevCount = props.size()            }                return                        + '\ndue to unresolved references to: ' + unresolveds)                        'Unable to resolve top-level properties: ' + props.keySet()                gp.logger.error(                        + '\ndue to unresolved references to: ' + unresolveds)                        'Unable to resolve top-level properties: ' + props.keySet()                    throw new GradleException(                if (strict)            if (prevCount == props.size()) {            }                }                    props.remove(pk)                    gp.setProperty(pk, newVal)                    }                            "Property setting '$pk' attempts to override non-String property value: ${gp.property(pk).class.name}")                            throw new GradleException(                        if (!(gp.property(pk) instanceof String))                            "Property setting '$pk' attempts to override null property value")                            throw new GradleException(                        if (gp.property(pk) == null)                    if (gp.hasProperty(pk)) {                if (haveNewVal) {                })                    return matchGrps[0]                    haveNewVal = false                    unresolveds << matchGrps[1]                        return System.properties[matchGrps[1]]                            && System.properties.containsKey(matchGrps[1]))                    if (expandSystemProperties                        return gp.property(matchGrps[1])                            && (gp.property(matchGrps[1]) instanceof String))                    if (gp.hasProperty(matchGrps[1])                    // This block resolves ${references} in property values                newVal = pv.replaceAll(/\$\{([^}]+)\}/, { matchGrps ->                haveNewVal = true            new HashMap(props).each() { pk, pv ->            unresolveds.clear()        while (prevCount > 0) {        def unresolveds = []        int prevCount = props.size()        boolean haveNewVal        String newVal                'Loaded ' + props.size() + ' from ' + propFile.absolutePath)        gp.logger.info(        propFile.withInputStream { props.load(it) }        Properties props = new Properties()"""            """Specified properties file inaccessible:  $propFile.absolutePath        assert propFile.isFile() && propFile.canRead():    void load(File propFile) {    }        gp = p    JavaPropFile(Project p) {    private boolean expandSystemProperties = true    private boolean strict = true    private Project gpclass JavaPropFile {import org.gradle.api.GradleExceptionimport org.gradle.api.Projectpackage com.admc.gradle;




© 2015 - 2024 Weber Informatics LLC | Privacy Policy