Where can i get java-plugin "build" task source code?

I want know the process detail when gradle build command executed。Is anyone can help me to find the java plugin source code that describe “build” task ? Or how can I get Project instance java file according to gradle script file after task executed?
thanks!