Possible to access project enum within buildScript?

I have an enum in our project that specifies our api versions. Is there a way I could access this enum in the build script? It would be useful to get the values when generating our api docs.