带有名称的Gradle |配置';complileClasspath';没有找到。用于多级项目构建
我正在尝试使用Kotlin DSL在Gradle中构建一个多项目构建 Root带有名称的Gradle |配置';complileClasspath';没有找到。用于多级项目构建,gradle,build.gradle,gradlew,gradle-kotlin-dsl,Gradle,Build.gradle,Gradlew,Gradle Kotlin Dsl,我正在尝试使用Kotlin DSL在Gradle中构建一个多项目构建 Rootbuild.gradle.kts: allprojects { repositories { jcenter() google() } } subprojects{ version = "1.0" } plugins { java application } repositories { jcenter() } dependencies {
build.gradle.kts
:
allprojects {
repositories {
jcenter()
google()
}
}
subprojects{
version = "1.0"
}
plugins {
java
application
}
repositories {
jcenter()
}
dependencies {
implementation("com.google.guava:guava:27.0.1-jre")
testImplementation("junit:junit:4.12")
}
application {
mainClassName = "gradle.youtube.series.App"
}
gitutils子项目的build.gradle.kts
plugins {
`java-library`
}
repositories {
mavenCentral()
}
dependencies {
implementation("org.sl4j:sl4j-api:1.7.2")
implementation("org.eclipse.jgit:org.eclipse.jgit:5.3.0.201903130848-r")
testImplementation("org.junit.jupiter:junit-jupiter:5.4.1")
testRuntimeOnly("org.sl4j:sl4j-simple:1.7.2")
}
tasks.test {
useJUnitPlatform()
}
我正在尝试使用以下命令下载gradeutil的依赖项:
./gradlew gitutils:dependencies --configuration complileClasspath
我得到以下错误:
Configuration with name 'complileClasspath' not found.
多层gradle项目是否需要compileClassPath?它的用途是什么?在
--configuration complileClasspath
中有一个拼写错误。compileClasspath-FileCollection默认值:${name}compileClasspath配置编译此源集的源文件时要使用的类路径