在构建生命周期中添加Gradle的钩子时? [英] When Gradle's hooks are added in build lifecycle?
问题描述
从文档中,我发现了构建和项目的钩子:
addListener(listener)
project.beforeEvaluate() )
所以我试图从书中的Gradle in Action( Muschko,Benjamin。建立生命周期。Gradle in Action。Np:np,2014. 100. Print。)可以更好地了解整个图片的时间和地点。 b
所以当钩子被添加时,如果还有其他的构建,项目钩子?
看起来是正确的。 (我假设问题是回调被执行。) gradle.projectsLoaded
需要在初始化和配置阶段之间进行。 gradle.beforeProject
发生在配置阶段的某些点。在 Gradle构建语言参考中查看 Gradle
对于其他回调。
In Gradle there are plenty of hooks. But I can't understand exactly when they are applied. From the docs I found hooks for the build and for a project:
For project
So I tried to make representation of figure from the book Gradle in Action (Muschko, Benjamin. "Hooking into the Build Lifecycle." Gradle in Action. N.p.: n.p., 2014. 100. Print.) to receive better idea for the whole picture when and where the hooks are apply?
So when the hook are added and if there other build, project hooks?
Looks about right. (I assume the question is when callbacks are executed.) gradle.projectsLoaded
needs to go between initialization and configuration phase. gradle.beforeProject
happens at certain points during the configuration phase. Check out Gradle
in the Gradle Build Language Reference for other callbacks.
这篇关于在构建生命周期中添加Gradle的钩子时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!