New extension methods did not work from within custom code in build.gradle
adamldavis opened this issue · comments
Adam Davis commented
For example:
task css2 doLast {
def config = new Config(prettyPrint: true)
def out = file("$cssDir/out.css")
GrooCSS.process(config) {
table {
border 2.em
}
'formId'.id {
color white
}
}.writeTo(out)
}
OR
task css2 doLast {
GrooCSS.convert(config, file("index.groocss"), file("$cssDir/index2.css"))
}
WORK-AROUND: Call new GrooCSS().initMetaClasses() before the "process" line.
Adam Davis commented
Fixed by setting addMeta=true by default