How to set buildSrc directory for Gradle executed by GradleBuild task

I am trying to figure out how to set the buildSrc directory for the Gradle build executed by GradleBuild task:

task clean(type: GradleBuild) {
    buildFile = file('buildLogic/build.gradle')
    tasks     = ['clean']

and the directory structure is:

    - src
        - main
            - groovy
    - build.gradle

Is it even possible?

I found a workaround:

buildscript {
    dependencies {
        classpath files(new File(projectDir.parentFile, 'buildSrc/build/classes/main').toURL())