Gradle task should not execute automatically

后端 未结 3 530
滥情空心
滥情空心 2020-11-30 08:44

I\'m defining a task in gradle:

task releaseCandidate(type: Exec) {
    commandLine \'git\', \'checkout\', \'develop\'

    // Increment version code in Mani         


        
3条回答
  •  离开以前
    2020-11-30 09:19

    A common pitfall. Add an action to the task otherwise code will run at configuration phase. Sample task with action:

    task sample << {
    }
    

    As I see You'd rather need to write a custom task than using Exec type. I suppose it's not valid to define commandLine twice.

    EDIT

    You can read this post to get the general idea how it all works.

提交回复
热议问题