【发布时间】:2021-01-11 17:43:26
【问题描述】:
我正在尝试使用 gradle 构建我的项目。 我有 de build.gradle 文件如下:
plugins {
id "fr.putnami.gwt" version "0.4.0"
id "info.solidsoft.pitest" version "1.3.0"
}
buildscript {
repositories {
mavenCentral()
maven {
url 'https://plugins.gradle.org/m2/'
}
}
dependencies {
testCompile 'junit:junit:4.12'
testCompile 'org.easymock:easymock:2.5.2'
testCompile 'com.google.gwt:gwt-dev:2.8.1'
compile 'net.sourceforge.plantuml:plantuml:8001'
classpath 'gradle.plugin.de.fntsoftware.gradle:markdown-to-pdf:1.1.0'
}
}
apply plugin: 'war'
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'jacoco'
apply plugin: 'de.fntsoftware.gradle.markdown-to-pdf'
当我尝试执行构建任务时,我总是得到:
所有 buildscript {} 块必须出现在脚本中的任何 plugins {} 块之前
我已经尝试将第一块插件放在 buildscript 中,但没有任何效果。有人可以帮帮我吗?
谢谢
【问题讨论】:
标签: gradle build.gradle