Determine source roots from external builder


In my external builder I need to access a properties file with some configuration information. By convention I know it is located in the root of the "source root" as it is called in the module settings.

Unfortunately I don't find a way to get a hold on this information.

- The code below almost gets me there but it give the path to the individuals file while I look for the top level source directory
        for (ModuleBuildTarget target : chunk.getTargets()) {
            try {
                final SourceToOutputMapping srcToOut = context.getProjectDescriptor().dataManager.getSourceToOutputMap(target);

- I read about the use of ProjectFileIndex.SERVICE in but that does not do the trick for me

Any help would be much appreciated.



1 comment
Comment actions Permalink


you can get all source roots by calling

Nikolay Chashnikov
Software Developer
"Develop with pleasure!"


Please sign in to leave a comment.