gpt4 book ai didi

gradle - 我的gradle buildScript不起作用

转载 作者:行者123 更新时间:2023-12-03 05:15:04 28 4
gpt4 key购买 nike

1.我不清楚我的项目rootDir上的build.gradle

allprojects{
apply plugin: 'idea'
group = 'com.gridsum'
version = '0.1'
}

subprojects{
apply plugin: 'scala'
//apply from: "$rootDir/gradle/scalastyle.gradle"
apply from: "$rootDir/gradle/scoverage.gradle"
repositories {
mavenCentral()
}



dependencies {
compile 'org.scala-lang:scala-library:2.11.7'
testCompile 'org.scalatest:scalatest_2.11:2.2.4'
testCompile 'junit:junit:4.12'
}

}

2.在gradleDir中清除另一个buildScript“scoverage.gradle”
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.scoverage:gradle-scoverage:1.0-5-g9c68988'
}
}

apply plugin: 'scoverage'

ext {
scalaBinaryVersion = '2.11'
scoverageVersion = '1.0.2'
}

dependencies {
scoverage "org.scoverage:scalac-scoverage-plugin_${scalaBinaryVersion}:${scoverageVersion}",
"org.scoverage:scalac-scoverage-runtime_${scalaBinaryVersion}:${scoverageVersion}"
}
  • 它报出错误“找不到企鹅”,我不知道这是怎么回事?
  • 最佳答案

    不幸的是,这行不通。您应用的脚本中的buildScript块将不会被评估。您需要将buildScript块放入应用scoverage.gradle的脚本中。使它起作用的另一种方法是使用init scripts

    关于gradle - 我的gradle buildScript不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33418058/

    28 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com