Skip to content

Instantly share code, notes, and snippets.

@kpiwko
Last active August 29, 2015 14:13
Show Gist options
  • Save kpiwko/899da5f672c58d6f4517 to your computer and use it in GitHub Desktop.
Save kpiwko/899da5f672c58d6f4517 to your computer and use it in GitHub Desktop.
Spacelift properties/logging/modifiers proposal
spacelift {
logging {[
console: info,
file: fine,
additional: new MyExtraLogger()
]}
properties {
jbossHome(defaultsTo: new File(project.workspace, "jboss-wildfly-8.1"),
// in future version enable ObservableMap behavior and add listener bound to the property
listener: {evt -> println evt.propertyName, evt.newValue, evt.oldValue})
ip(required:true)
whatever { "foobar lazy value" }
}
profiles {
myprofile {
properties(appendsTo:properties) {
profileValue(required:true)
}
// in the future, allow to directly reference test
tests 'test1'
}
}
tools {
adb {
// can't be inherits:loggins as this returns map
logging(appendsTo:logging) {[console: none]}
}
command {
}
}
}
tests {
// denotes abstract value, is not possible to add it to profiles or execute directly
// nor it is listed in "gradle describe"
abstractTest(instantiable:false) {
dataProvider { "a", "b"}
}
test1(inherits:abstractTest) {
execute { a ->
println a
println tools.adb.list().execute().await()
println profileValue
println properties.profileValue
println ip
println properties.ip
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment