diff options
author | Christian Williams <christianw@google.com> | 2017-11-06 13:56:59 -0800 |
---|---|---|
committer | Christian Williams <christianw@google.com> | 2017-11-06 13:56:59 -0800 |
commit | 4d3498bf2071db953696336f724020b4e4c56c4f (patch) | |
tree | fe72a240f42d7308c3c9a7b65286f9ab75cfa179 /buildSrc | |
parent | f728473c825c9d287fbb487e5fedfe8391b5a06d (diff) | |
download | robolectric-shadows-4d3498bf2071db953696336f724020b4e4c56c4f.tar.gz |
Include generated sources in javadoc and sources jars.
Diffstat (limited to 'buildSrc')
-rw-r--r-- | buildSrc/src/main/groovy/ShadowsPlugin.groovy | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/buildSrc/src/main/groovy/ShadowsPlugin.groovy b/buildSrc/src/main/groovy/ShadowsPlugin.groovy index ad8eaf5b8..54d672a40 100644 --- a/buildSrc/src/main/groovy/ShadowsPlugin.groovy +++ b/buildSrc/src/main/groovy/ShadowsPlugin.groovy @@ -26,6 +26,10 @@ class ShadowsPlugin implements Plugin<Project> { def aptGeneratedSrcDir = new File(project.buildDir, 'generated/source/apt/main') project.idea.module.generatedSourceDirs << aptGeneratedSrcDir + // include generated sources in javadoc and source jars + project.tasks['javadoc'].source(aptGeneratedSrcDir) + project.tasks['sourcesJar'].from(project.fileTree(aptGeneratedSrcDir)) + // verify that we have the apt-generated files in our javadoc and sources jars project.tasks['javadocJar'].doLast { task -> def shadowPackageNameDir = project.shadows.packageName.replaceAll(/\./, '/') |