Gradle during its execution phase, adding and executing tasks dynamically -


i have requirement create , execute tasks during gradle's execution phase.

currently, during build task determine , create multiple tasks add taskcontainer, using:

tasks.add([name: "$taskname", type: "$tasktype"], {...})

and after tasks added execute them sequentially, using:

tasks["$taskname"].execute()

on first execution following error:

> task artifact state cache (.../.gradle/1.5/taskartifacts) has not been locked.

what doing wrong, , there better way dynamically add tasks during execution?

all tasks , task dependencies must declared in configuration phase. can't added in execution phase. also, calling task.execute() isn't supported (and lead problems). task can depend on other tasks, cannot call them.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -