Gradle中Task执行顺序

本文记录Java学习过程中遇到的Gradle中Task执行顺序~

Task执行顺序配置方式有:

1.dependsOn强依赖:

task A {
	
}

task B(dependsOn: [A]) {
	
}

B.dependsOn(A)

2.输入输出:

task A {
	output.files this.destfiles
}

task B {
	input.files this.destfiles
}

3.mustRunAfter/shouldRunAfter

task A {
}

task B {
	mustRunAfter A
	shouldRunAfter A
}

标签: none