./gradlew genSources error - Build Failed

Hi, completely new to all this so sorry if this is repeating something else, but I’m just starting out trying to use this software/code with it and I keep running into a Build Failed result after using the ./gradlew genSources input. It says the error is in the second line of build.gradle, with two results

  1. ‘id’ in ‘org.gradle.plugin.use.PluginDependenciesSpec’ cannot be applied to ‘(java.lang.String)’
  2. ‘version’ in ‘org.gradle.plugin.use.PluginDependencySpec’ cannot be applied to ‘(java.lang.String)’

I’m not finding an answer anywhere, or at least not one I understand