having flatDir in build.gradle breaks eas android build

Greetings

having

buildscript {
  ...
  repositories {
    ...
    flatDir {
       dirs 'libs'
    }
  }
}

in build.gradle causes eas build to fail
possibly related to

Running './gradlew :app:bundleRelease --debug' in /home/expo/workingdir/build/android
Downloading https://services.gradle.org/distributions/gradle-6.8-all.zip
Unzipping /home/expo/.gradle/wrapper/dists/gradle-6.8-all/9emh0d32e025cam7aasxcw002/gradle-6.8-all.zip to /home/expo/.gradle/wrapper/dists/gradle-6.8-all/9emh0d32e025cam7aasxcw002
Set executable permissions for: /home/expo/.gradle/wrapper/dists/gradle-6.8-all/9emh0d32e025cam7aasxcw002/gradle-6.8/bin/gradle
Welcome to Gradle 6.8!
Here are the highlights of this release:
 - Faster Kotlin DSL script compilation
- Vendor selection for Java toolchains
 - Convenient execution of tasks in composite builds
 - Consistent dependency resolution
For more details see https://docs.gradle.org/6.8/release-notes.html
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/6.8/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build
[stderr] FAILURE: Build failed with an exception.
[stderr] * Where:
[stderr] Initialization script '/home/expo/.gradle/init.gradle' line: 45
[stderr] * What went wrong:
[stderr] A problem occurred evaluating root project 'resal_develop_mobile'.
[stderr] > Could not get unknown property 'url' for object of type org.gradle.api.internal.artifacts.repositories.DefaultFlatDirArtifactRepository.
[stderr] * Try:
[stderr] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 32s
Error: Gradle build failed with unknown error. Please see logs for the "Run gradlew" phase.