All,

  I am new to both gradle and groovy.    I have been reading the user 
documentation and reading the mailing list.  I recently wrote a custom task 
that calls the exec task. Is a better way to accomplish the same thing as the 
custom task below?


class ShowXeTexPath extends  DefaultTask {

    def String ext ='.tex'
    def String texProgram='xelatex'

    def Exec showAction

    ShowXeTexPath() {
        group='xetex utilities'
        description='show the tex path of ' + ext
    }

    @TaskAction
    def showPath() {
        showAction = getProject().task('someAction' + name, type:  Exec )

        showAction.executable ='/usr/texbin/kpsewhich'
        showAction.environment = [ TEXINPUTS:'.:tex:']
        showAction.args = ['--progname='+texProgram, '--show-path='+ext]

        showAction.execute()
    }

    
}

task showPathTex(type:ShowXeTexPath)

task showPathMf(type:ShowXeTexPath) {
    ext ='.mf'
    description='show the tex path of ' + ext
}

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

    http://xircles.codehaus.org/manage_email


Reply via email to