lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 17/11/2010 10:07, steve donovan wrote:
The manual does show how Lake can also do rake-like programming:

     task = target

     task('codeGen',nil,function()
       print 'codeGen'
     end)

     task('compile','codeGen',function()
       print 'compile'
     end)

     task('dataLoad','codeGen',function()
       print 'dataLoad'
     end)

     task('test','compile dataLoad',function()
       print 'test'
     end)

As I mention, the anonymous function stuff is more noisy in Lua which
is less syntactically flexible than Ruby for DSL creation.

Well, it is not so bad...
For the record, Gradle syntax is:

task codeGen << {
  println 'codeGen'
}

task compile(dependsOn: codeGen) << {
  println 'compile'
}

// Forward dependency -> name in quotes
task test(dependsOn: [ compile, 'dataLoad' ]) << {
  println 'test'
}

task dataLoad(dependsOn: codeGen) << {
  println 'dataLoad'
}

There is a family look...
Note that Gradle is firmly anchored in the JVM world while Lake is strongly in the C/C++ world, so they are more complementary than concurrent... (for now...)

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --