Today i decided to see up Groovy source code and to built up my programming muscles in Groovy. I downloaded the Groovy Source code 1.8 from this link. But how do i proceed? In sense which folder first i have to see, so that i can understand better how groovy works(because there are many folders like benchmarks,bootstraps, src etc). May be this seems to be stupid question but i wanna to ask it.
Correct me if am worng.
The source code is inside
src/main.The unit tests all live inside
src/test.I found a good place to start looking was inside the huge class:
This is where a lot of the extra Groovy methods are defined, so you can pick your favourite function (such as
String.capitalizefor example) and find the definition of that method (around line9561, but that might be different in the version of the code you have downloaded)You should then be able to (for example) change how something works, and check that the unit tests still function by calling
from the root folder, then you should see it build and test reports should be created and placed in the
targetfolderI tend to use a combination of
findandgrepto locate the area in the source that I am interested in, then slowly expand out from that class as I find other things that relate to it…Hope this helps…it’s a bit of a big question to try and cover