Include outside groovy class into sourceset

Hi!

I am trying to add a single groovy class (just an enum) that lives in the project root to my simple java/groovy module. I want the class to be accessible in my module’s java classes, but I also plan to add it to other (outside of the module) groovy scripts. I’m not having any luck though. So far I’ve tried various expressions:

sourceSets {
    main {
        groovy {
            setIncludes(new HashSet(["$projectDir/foo.groovy"]))
//            from projectDir
//            include "foo.groovy"
//            include "$projectDir/foo.groovy"
        }
    }
}

Is there any way I can accomplish this?