I would like to use some library in Gradle build tasks and wrote:
buildScript {
dependencies {
classpath files('lib/matlabcontrol-4.1.0.jar')
}
}
according to https://stackoverflow.com/a/26314875/258483
Unfortunately, it does not work with error:
Could not find method buildScript() for arguments [build_dequiq884i95u7leo8gt9c8xk$_run_closure1@5a63dd5b] on root project
How to fix and why it was answered as working method in referenced answer?