如何应用插件

时间:2019-03-23 17:57:58

标签: gradle sonarqube build.gradle

我正在尝试在gradle项目中应用sonarqube插件,但目前遇到问题

启动失败:   构建文件'C:\ Test \ build.gradle':31:在插件{}块之前,仅允许buildscript {}和其他插件{}脚本块,不允许其他语句

import io.restassured.response.*



ext{
    serenity_version = "2.0.40"
}

buildscript {
    dependencies {

        classpath 'io.rest-assured:rest-assured:3.0.5'
        }
    repositories {
        gradlePluginPortal()
    }
}


plugins {
  id "org.sonarqube" version "2.6.2"
}

description = 'Example of SonarQube Scanner for Gradle Usage'
version = '1.0'

sonarqube {
    properties {
        property 'sonar.projectName', 'Example of SonarQube Scanner for Gradle Usage'
    }
}


apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'net.serenity-bdd.aggregator'
apply plugin: 'maven'



repositories {
    maven {
        credentials {
            username "$nexus_username"
            password "$nexus_password"
        }
        url 'XXX/nexus/content/groups/private'
        url 'https://plugins.gradle.org/m2/'
    }
    mavenCentral()
}

dependencies {


    testCompile ''


    compile(

    )
}

有人可以帮我解决我的问题吗

0 个答案:

没有答案