apply plugin: 'java'

// Iterable gets an each() method
configurations.runtime.each { File f -> println f }

// Using a getter method
println project.buildDir
println getProject().getBuildDir()

// Using a setter method
project.buildDir = 'target'
getProject().setBuildDir('target')

test.systemProperty 'some.prop', 'value'
test.systemProperty('some.prop', 'value')

// List literal
test.includes = ['org/gradle/api/**', 'org/gradle/internal/**']

List<String> list = new ArrayList<String>()
list.add('org/gradle/api/**')
list.add('org/gradle/internal/**')
test.includes = list

// Map literal
apply plugin: 'java'

Map<String, String> map = new HashMap<String, String>()
map.put('plugin', 'java')
apply(map)

repositories {
    println "in a closure"
}
repositories() { println "in a closure" }
repositories({ println "in a closure" })

dependencies {
    assert delegate == project.dependencies
    compile('junit:junit:4.8.2')
    delegate.compile('junit:junit:4.8.2')
}
