Gradle 无法解析配置[自定义配置]的所有依赖项

Gradle 无法解析配置[自定义配置]的所有依赖项,gradle,gradle-plugin,Gradle,Gradle Plugin,拜托,我正在将Gradle2.1项目转换为6.0,但我遇到了这个错误 Could not resolve all dependencies for configuration ':driver'. > Cannot convert the provided notation to a File or URI: classesDirs. The following types/formats are supported: - A String or CharSequence path

拜托,我正在将Gradle2.1项目转换为6.0,但我遇到了这个错误

Could not resolve all dependencies for configuration ':driver'.
> Cannot convert the provided notation to a File or URI: classesDirs.
 The following types/formats are supported:
   - A String or CharSequence path, for example 'src/main/java' or '/usr/include'.
   - A String or CharSequence URI, for example 'file:/usr/include'.
   - A File instance.
   - A Path instance.
   - A Directory instance.
   - A RegularFile instance.
   - A URI or URL instance.
跑步时

configurations.driver.each {File file ->
    loader.addURL(file.toURL())
}
驱动程序是自定义配置,定义为

configurations {
    driver
}

dependencies {
    driver 'org.drizzle.jdbc:drizzle-jdbc:1.3'
}
请告诉我如何修复?

使用

sourceSets.main.output.resourcesDir = sourceSets.main.java.outputDir
sourceSets.test.output.resourcesDir = sourceSets.test.java.outputDir
而不是

sourceSets.main.output.resourcesDir = sourceSets.main.output.classesDirs
sourceSets.test.output.resourcesDir= sourceSets.test.output.classesDirs

Gradle 6.0适合我。除了“驱动程序”配置之外,您还想循环其他配置吗?不,没有其他配置