summaryrefslogtreecommitdiffhomepage
path: root/tunnel/publish.gradle
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-03-11 00:28:37 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2020-03-11 00:29:18 -0600
commit56f2dcc07319d870f8ca3497562db543b84bce76 (patch)
tree8df497033df870105812971588d3fffd24b0b04e /tunnel/publish.gradle
parent48739b41412e4328456f05894f2f0ff2a8f80d1c (diff)
tunnel: add javadoc support
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'tunnel/publish.gradle')
-rw-r--r--tunnel/publish.gradle28
1 files changed, 21 insertions, 7 deletions
diff --git a/tunnel/publish.gradle b/tunnel/publish.gradle
index 064a901b..f8d086f8 100644
--- a/tunnel/publish.gradle
+++ b/tunnel/publish.gradle
@@ -52,11 +52,25 @@ bintray {
}
}
-task sourcesJar(type: Jar) {
- from android.sourceSets.main.java.srcDirs
- archiveClassifier = 'sources'
-}
-
-artifacts {
- archives sourcesJar
+android.libraryVariants.all { variant ->
+ if (variant.name == 'release') {
+ task javadoc(type: Javadoc) {
+ source = variant.javaCompiler.source
+ classpath = files((android.bootClasspath.join(File.pathSeparator)))
+ classpath += variant.javaCompiler.classpath
+ title = 'Embeddable WireGuard Tunnel for Android v$wireguardVersionName'
+ }
+ task javadocJar(type: Jar, dependsOn: javadoc) {
+ archiveClassifier = 'javadoc'
+ from javadoc.destinationDir
+ }
+ task sourcesJar(type: Jar) {
+ archiveClassifier = 'sources'
+ from android.sourceSets.main.java.srcDirs
+ }
+ artifacts {
+ archives sourcesJar
+ archives javadocJar
+ }
+ }
}