Could not find method implementation() for arguments. Error
11:59 17 Apr 2018

I am getting the following error on my build gradle:

Could not find method implemnetation() for arguments

I tried to clean the gradle cache, clean project, but nothing works. I have seen similar posts, but I couldnt find the answer.

// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply plugin: 'java-library'
buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        implementation 'org.hibernate:hibernate-core:3.6.7.Final'
        api 'com.google.guava:guava:23.0'
        testImplementation 'junit:junit:4.+'
        implementation 'com.amazonaws:aws-android-sdk-mobile-client:2.6.+@aar'

    }
}

allprojects {
    repositories {
        jcenter()
    }
}
android gradle dependencies