Customize location of Generated .java files in gradle project

I have project with following multi module structure

  • super-integration
    • build.gradle
    • first-integration
      … prj files
      - .graphql files
      - schema.json
      • build.xml
    • build
    • … other files

Here first-integration is ant project and super-integration is gradle project.
build folder with apollo generated files is getting created in super-integration/ location. Due to which it is not accessible to first-integration.
Is there any way to change location in gradle file through any config, so that build folder gets generated in /super-integration/first-integration/ location.

Please need help urgently regrading the same.

Thanks in advance

use : outputDir.set(file(“location to generate”)) in apollo config