Adapt getBuildPath method