only buildscript {} and other plugins {} script blocks are allowed before plugins {} blocks, no other statements are allowed Как решить?

введите сюда описание изображенияДелал все по инструкции от сайта onesignal.com, после чего выдает данную ошибку. Скажите как решить, я новичок в этом build.gradle

buildscript {
    repositories {
        maven { url 'https://plugins.gradle.org/m2/'}
    }
    dependencies {
        classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:0.12.8'
    }
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'

repositories {
    maven { url 'https://maven.google.com' }
}
plugins {
    id 'com.android.application'
    id 'com.google.gms.google-services'
}

android {
    compileSdkVersion 30
    buildToolsVersion "30.0.2"

    defaultConfig {
        multiDexEnabled true
        applicationId "com.example.blum"
        manifestPlaceholders = [
                onesignal_app_id: 'PUT_YOUR_ONESIGNAL_APP_ID_HERE',
                // Project number pulled from dashboard, local value is ignored.
                onesignal_google_project_number: 'REMOTE'
        ]
        minSdkVersion 30
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {

    implementation 'com.onesignal:OneSignal:3.15.0'
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'com.google.android.material:material:1.2.1'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'com.google.android.material:material:1.2.1'
    implementation 'com.google.firebase:firebase-auth:19.4.0'
    implementation 'com.google.firebase:firebase-database:19.5.1'
    implementation 'com.google.firebase:firebase-core:17.5.1'
    //add this
    implementation 'com.google.firebase:firebase-storage:19.2.0'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'com.rengwuxian.materialedittext:library:2.1.4'
    //библиотека
    implementation 'de.hdodenhof:circleimageview:3.1.0'
    implementation 'com.github.bumptech.glide:glide:4.11.0'
    implementation 'org.gradle:gradle-core:4.2.1'
    implementation 'org.mockito:mockito-core:1.9.5:javadoc'
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'org.jetbrains:annotations:15.0'
    implementation 'androidx.recyclerview:recyclerview:1.2.0-alpha06'
    //add this libraries
    implementation 'com.squareup.retrofit2:retrofit:2.9.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
    implementation 'com.google.firebase:firebase-messaging:20.3.0'
    implementation 'com.google.firebase:firebase-inappmessaging-display:19.1.1'


    testImplementation 'junit:junit:4.13.1'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}

Ответы (0 шт):