Gradle Plugin 0.11 replaces the default File of source sets with Def
aultAndroidSourceDirectorySet
For example this gradle code below:
project.subprojects.each { submodule -> submodule.android.sourceSets.each {
sourceSet -> sourceSet.java.each { file ->
// This 'file' used to be of type java.io.File now it is
com.android.build.gradle.internal.api.DefaultAndroidSourceDirectorySet
}
}}
Therefore if you made any assumptions about this variable (for instance
using toString() ) they will now be broken. The new
DefaultAndroidSourceDirectorySet
has an overridden toString method that returns the toString of an internal
list. Before you may have got "src/java/main" and now you will get
"[src/java/main]".
https://android.googlesource.com/platform/tools/build/+/master/gradle/src/main/groovy/com/android/build/gradle/internal/api/DefaultAndroidSourceDirectorySet.java
*This was a rough analysis, I'm sure the changelog has better insight.*
On Wednesday, 11 June 2014 11:14:25 UTC+1, Stefan Hoth wrote:
>
> Hi,
>
> just a quick question: In 0.11 of the plugin you changed the directory
> structure of some output files (e.g. build/lint-results.xml to
> build/outputs/lint-results.xml, build/classes to
> build/intermediates/classes etc).
>
> We figured this out and could make our static code analysis tools work
> again but it seems they can't find the source sets anymore and come out
> with empty results or missing classes.
>
> So my question is: Did you also rename
> gradleProject.android.sourceSets*.java.srcDirs or similar fields?
>
> Thanks,
> Stefan
>
--
You received this message because you are subscribed to the Google Groups
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.