Bug 1667675 - Use sourceSets instead of JavaCompileProvider to generate sources.jar. r=agi

Documentation is lacking but apparently
`variant.javaCompileProvider.get().source` is always empty according to
da34aabdb6.

In that commit, `android.sourceSets.main.java.srcDirs` was the
replacement. However, I used
`variant.sourceSets.collect({ it.java.srcDirs }).flatten()` to be
consistent with an earlier usage in `build.gradle`.

Differential Revision: https://phabricator.services.mozilla.com/D91836
This commit is contained in:
Daniel Le 2020-10-01 00:12:00 +00:00
Родитель 07b9286375
Коммит 657fbf74ca
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -348,7 +348,7 @@ android.libraryVariants.all { variant ->
classifier 'sources'
description = "Generate Javadoc for build variant $name"
destinationDir = new File(destinationDir, variant.baseName)
from files(variant.javaCompileProvider.get().source)
from files(variant.sourceSets.collect({ it.java.srcDirs }).flatten())
}
task("checkstyle${name.capitalize()}", type: Checkstyle) {