Gradle 1.11 gives a warning about failure:
robert@pferdeapfel:~/prj> gradle --version | grep Gradle
Gradle 1.11
robert@pferdeapfel:~/prj> gradle compileJava
Converting class org.gradle.api.internal.file.DefaultSourceDirectorySet to File using
toString() method has been deprecated and is scheduled to be removed in Gradle 2.0.
Please use java.io.File, java.lang.String, java.net.URL, or java.net.URI instead.
:compileAcctJava
:processAcctResources UP-TO-DATE
:acctClasses
:resources
:acct UP-TO-DATE
:beans UP-TO-DATE
:svninfo UP-TO-DATE
:settings UP-TO-DATE
:compileJava UP-TO-DATE
BUILD SUCCESSFUL
Total time: 10.865 secs
and Gradle 2.0 cannot build:
robert@pferdeapfel:~/prj> /usr/local/gradle-2.0/bin/gradle --version | grep Gradle
Gradle 2.0
robert@pferdeapfel:~/prj> /usr/local/gradle-2.0/bin/gradle -i compileJava
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':compileAcctJava'.
> Cannot convert the provided notation to a File or URI: acct Java source.
The following types/formats are supported:
- A String or CharSequence path, e.g 'src/main/java' or '/usr/include'
- A String or CharSequence URI, e.g 'file:/usr/include'
- A File instance.
- A URI or URL instance.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option
to get more log output.
BUILD FAILED
Total time: 3.676 secs
However, I have no idea why and where in my build the script has a problem.
I defined the source sets as described at http://www.gradle.org/docs/current/userguide/java_plugin.html#sec%3asource_sets , since my project does not comply with the default project standard.
sourceSets {
...
acct {
java {
srcDir "src"
srcDirs("src") {
include "my/program/some/package/Acct.java"
}
}
}
...
}
I have certain dependencies, but not for acct; it's just a simple listing that is used as the basis for code generation. He has no dependencies. Even if I add a dummy dependency as shown below, I get the same error.
dependencies {
...
acctCompile junit
...
}
, ?
Gradle --debug --stacktrace .