I would rather stay more closely to the current syntax and merge some of your
suggestions to make it more like groovy instead of a java builder:

configurations {
    newConf extends:compile, ...
    // and alternatively
    newConf {
        extends = compile
        ...
    }
}

repositories {
    // like spring DSL in grails the first parameter is the class
    publishRepo(OfficialMavenResolver)
    otherRepo(FlatFileResolver) {
        dir = '/some/path/to/the/resolver/directory'
        ...
    }
    // and as alternative format specify all setters map-like after the
first parameter
    otherRepo2 FlatFileResolver, dir:'/some/path'
}

dependencies {
    // unchanged
    compile 'junit:junit:4.+'
    // extended syntax to specify (nearly) all possible ivy descriptors
(including configuration!)
    compile [org:'my.org', name:'myname', version:'1.+', conf:'myConf'],
               [org:'my.org', name:'myothername', version:'0.+',
conf:['myConf', 'myConf2'], ... ]
    // for specifying recursive dependencies
    compile [org:...] {
        compile [org:...]
        compile 'junit:junit:...'
        runtime '...'
    }
    // multiple configurations at once (if it's possible?):
    [compile, runtime] 'org.apache:log4j:1.+'
}

// instead of archive tasks still use libs, dists:
libs {
    myJar {
        type = Jar // class name?
        name = ...
        dependsOn something
        // no publication, if no publishTo statement
        publishTo repo1, repo2
        withConf master, conf1
    }

}



hdockter wrote:
> 
> we are working intensely on Gradle 0.6. One focus is to make our DSL  
> more intuitive. To achieve this we are improving the syntax of the DSL  
> as well as how the different elements play together.
> 
> Here is a link to the current draft of the new DSL:
> http://docs.codehaus.org/display/GRADLE/Dependencies
> 
> 

-- 
View this message in context: 
http://www.nabble.com/New-DSL-for-0.6-tp22224115p22226102.html
Sent from the gradle-user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to