Could not find method implementation()

Could not find method implementation() for arguments [directory ‘libs’] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.